April 30, 2003

Alright! Shellscript for automatic rebuilding of PhonoPhoto done!

Since I am still developing PhonoPhoto, all emails containing photos are kept on the server, so I can change my script, empty out the PhonoPhoto-repository and then do a full import of all PhonoPhoto-emails rebuilding the repository from scratch every time. Tedious work...

Manually it involved cleaning out all entries in MySQL, cleaning out all original files and then running the PhonoPhoto-script to pop all the emails and import everything again.

Continue doing it manually would mean that I never could use the DynaMaster publishing tool for anything else but PhonoPhoto since I kept deleting all imported / uploaded images (regardless of origin) from the image archive in order to run the PhonoPhoto-script.

What I have done now is automate the commands for emptying the relevant tables in MySQL and use another of the great DynaMaster utility tools to clean out the relevant files stored by DynaMaster.

The "clean_dynamaster" utility runs on command line and cleans out only the files and images that are not referenced from the database. So emptying the PhonoPhoto tables in MySQL means that all the PhonoPhoto images in the image archive in DynaMaster suddenly have no references from published articles... ...and are then swiftly removed by the clean_dynamaster utility.

Then I run the PhonoPhoto-script rebuilding PhonoPhoto from scratch.

As an added bonus, the clean_dynamaster utility also cleans out old cached objects. Excellent stuff.

From 10 (dangerous and nervously keyed in) commands in three different places in the file system I now only need one. Getting it right every time.

Happy, happy, joy, joy.

Posted by manne at April 30, 2003 05:30 PM

Random fortune brought to you by www.fortunes.nu:

:: ()

Comments

Post a comment









Remember personal info?






Extreme Tracking