投稿

11月, 2020の投稿を表示しています

PowerShell 配列を順次 クリップボードへ 

Quick Edit Pencil
ステップ
  1. HTMLソースのimgタグのalt属性値を配列に格納
  2. 順次クリップボードにセットする

肝として
  1. 一時中断してクリップボードの値を使う方法
    • $in = Read-Host "Press ENTER KEY, then next"
  2. クリップボードユーティリティの履歴にため込む方法
    • Start-Sleep -s 1

#Windows PowerShell
#Investigating template tags in Blogger theme XML

##テンプレート捜査フィールド
$path = "D:\WindowsPowerShell Scripts\Bloggerポスト画像ALT走査"

#XMLを捜査対象サブフォルダも対象(ブロガーテーマ)
$targets = Get-ChildItem $path -recurse -Include 捜索ソース.html | Select-Object | Where-Object {-not $_.PSIsContainer}

#捜査対象ファイルをリスト
$targets

#対象タグを格納
$tags = @()
$targets | ForEach-Object {
  $tags += [regex]::Matches((Get-Content $_),"img (alt="".*?"")")  | foreach{$_.Groups[1].Value.TrimEnd()}
}

#重複を削除し並べ替え
#$tags | Select-Object –Unique | Sort-Object

#クリップボードに代入
$tags | ForEach-Object {
  $_  
  $_  | clip
  Start-Sleep -s 1
  #$in = Read-Host "Press ENTER KEY, then next"

}

参考にしたサイト様

ADOBE FIREWORKS マスクで透明 抜き

Quick Edit Pencil
マスク適用オブジェクトを選択 メニュー 変更 マスク すべてを表示 ブラシツール(黒色) https://www.japanism.info/fireworks-mask.html