"The Purple Tiger" <Jon@tigersden.demon.co.uk> writes:
I don't want to have to go through the directory and convert each file every time. What would be your suggestions to enable it to do "only new pictures" and then build the html file?
Write a Makefile and use the command "make", e.g. if originals are in the org subdirectory: $ cat Makefile org = $(shell find org -name '*.jpg' -print) new = $(notdir $(org)) %.jpg : org/%.jpg convert $< $@ # put some params here index.html : $(new) echo $(new) > $@ # put your routine here .PHONY : clean new info new : $(new) clean : rm -f $(new) index.html info: @echo -n "Remains: " @make -n | grep convert | wc -l $ make info # to see how many files will be processed $ make # to create updated index.html $ make clean # to remove everything except original files Note 1: "watch -n 5 make info" can be started in another terminal window and monitor the progress. Note 2: Commands in the Makefile are indented by the '\t' character. Copy and paste converts them to spaces and "make" complains then. -- Alexandr.Malusek@imv.liu.se