我有幾個圖像文件夾,並且想創建一個包含文件名稱和文件夾名稱的plist。使用Automator/AppleScript/Perl創建Plist
例如:
YELLOW
MARKIN.PNG
MARKOUT.PNG
BLUE
ARROW.PNG
RAZOR.PNG
我想一個plist中,以與陣列根節點,含有字典使得:
<plist version="1.0">
<array>
<dict>
<key>name</key>
<string>MARKIN</string>
<key>colour</key>
<string>YELLOW</string>
</dict>
</array>
</plist>
這是可以實現的使用AppleScript或自動機或其他編程語言?我在7個文件夾中有大約60個圖像,並且手動輸入所有內容將是一件非常痛苦的事情。
謝謝
數據::的plist :: XMLWriter不會在我的系統上建立。使測試保持失敗。我相信你的解決方案的作品我會繼續嘗試。 – joec 2010-11-16 10:36:29