我正在寻找一个使用 BBEdit 的 Applescript——遍历大量 HTML 文件并自动格式化它们(这样缩进更容易阅读)。
到目前为止,我有:
tell application "BBEdit"
activate
open {file "Macintosh HD:TEST DIRECTORY:testfile copy 2.html"} with LF translation
(format mode hierarchical)
beep
display alert "Finished!"
end tell
这会将转换应用于单个文件,但是有人对如何将其应用于未知数量的 HTML 文件有任何建议吗?