[OS X TeX] Who Wrote These, Please?

Themis Matsoukas matsoukas at psu.edu
Mon Mar 20 15:24:45 CET 2006


Herb,

if you are referring to the script below, I had written the initial  
code to delete files, then Jean-Claude de Soza added the recursive  
feature. Below is the version I have on my machine. It works with all  
the files in the directory, not only those associated with a root  
name, so perhaps you are referring to a different script.

Themis


(*This script cleans up tex clutter; it acts recursively on all  
folders inside the original
Original Script by Themis Matsoukas; Recursive code by Jean-Claude DE  
SOZA *)

(* the on-run handler is activated when the icon of the script is  
double-cicked *)
on run
	set my_folder to (choose folder with prompt "Please choose a  
folder") as alias
	GoCleanUp(my_folder)
end run

(* the on-open handler is activated when a folder is dropped onto the  
script icon *)
on open (drop_folder)
	set my_folder to drop_folder as alias
	GoCleanUp(my_folder)
end open

(* this handler does the actual job *)
on GoCleanUp(my_folder)
	tell application "Finder"
		delete (every file of my_folder whose name ends with ".aux")
		delete (every file of my_folder whose name ends with ".log")
		delete (every file of my_folder whose name ends with ".toc")
		delete (every file of my_folder whose name ends with ".out")
		delete (every file of my_folder whose name ends with ".pdfsync")
		delete (every file of my_folder whose name ends with ".tui")
		delete (every file of my_folder whose name ends with ".top")
		delete (every file of my_folder whose name ends with ".tup")
		
		(* do the same with all folders inside the original folder*)
		set myFolderList to (every folder of my_folder)
		repeat with myFolder in myFolderList
			my GoCleanUp(myFolder)
		end repeat
		
	end tell
end GoCleanUp

On Mar 20, 2006, at 8:45 AM, Herbert Schulz wrote:

> Howdy,
>
> Quite a while ago there was lots of activity writing macros  
> (Applescript [direct]) for TeXShop. In particular there were a  
> couple that I use all the time (with variations): Delete Auxiliary  
> Files and Open Selection.
>
> I know that TeXShop has a Trash Aux Files command but I tend to use  
> the macro mentioned above since it's so easy to configure the  
> extension list. I even have two versions; one to delete most  
> auxiliary files and one to also delete .pdf and .bbl files for a  
> complete cleanup. It only cleans up the auxiliary files associated  
> with the root file name.
>
> The Open Selection macro is nice because it gets the extension from  
> the surrounding context (\usepackage, \input, etc.) and searches  
> for the file using the kpsewhich. Very nice for examining included  
> package files, etc.
>
> I am trying to put together a little BOF workshop on customizing  
> TeXShop for the PracTeX 2006 conference and would like to include  
> these macros (at least as examples) so I'd like to get ion touch  
> with their authors. I have no name for the author of the Delete  
> Auxiliary Files and only know the author of Open Selection as mdh.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest.com)
>
>
> ------------------------- Info --------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>          & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
>
>

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list