balthisar / tidy

Balthisar Tidy for macOS HTML Cleaner
https://www.balthisar.com/software/tidy
23 stars 7 forks source link

Apple script examples #2

Closed maxfancourt closed 7 years ago

maxfancourt commented 8 years ago

I totally understand that the scripts supplied are meant as starting points for Developers but I thought I would post this here just in case anyone else has an updated script which tackles the same problem. At the moment the folder script works really well unless what's moved into that folder are not either html,php files for example other folders containing html/php files. What happens is the Folder scripts processes everything and so folder/structures become ruined. Trying to work out how to add a file extension filter and the ability to look within subfolders is a bit beyond me unfortunately so I don't have a solution. max

balthisar commented 8 years ago

I'll get to it, I promise, but no promise date yet. Sorry!

Max knows from emails that I've moved home to the USA after five years in China, so that's occupying 100% of my non-work time right now.

I wonder how clever Mac OS X is; would using Smart Folders with only the HTML or PHP files you want work?

balthisar commented 8 years ago

The attached file (once unzipped and put in the right location) will process only HTML and PHP files when they are dropped into a folder for which this script is enabled as a folder action.

Balthisar Tidy Folder Action - HTML.scpt.zip

If anyone has requirements for other file types, simply change the list on line 26 of the script.

The script itself is also now in the dev branch, but as it's supposed to be part of the disk image, it needs a little bit of cleanup before including it in a new Balthisar Tidy release. Hence I will leave this issue open pending a new release of Balthisar Tidy (which will have additional improvements).

balthisar commented 7 years ago

I'll close this, since the updated scripts are now on the disk image.

maxfancourt commented 7 years ago

Cheers Jim kind regards max