Archive for April, 2009

Merged branch phtagr-media-schema

April 25th, 2009 Comments off

The branch phtagr-media-schema was merged to the trunk successfully. The new database schema fits more the database relation between files and media and changes the model Image to the model Media.

Upgrade your phTagr instance

The database must be upgraded to the new schema. However, the new merged trunk comes with a handy shell script upgradeMediaSchema which handles the database upgrade and data migration. Update your phtagr code of trunk via svn and change to your phtagr directory and execute the shell script by ‘../cake/console/cake -app phtagr upgradeMediaSchema upgrade

phtagr$ svn up
phtagr$ ../cake/console/cake -app phtagr upgradeMediaSchema
Schema Upgrade Shell Script for Media Schema
Help screen
    Upgrade schema to media schema
phtagr$ ../cake/console/cake -app phtagr upgradeMediaSchema upgrade
Schema Upgrade Shell Script for Media Schema
Prepare upgrade...
Upgrade schema...
Migrate 132 media...
Finalizing upgrade...
All done. Enjoy!

Reasons for a new Schema

The old schema uses only one table for a image/media which includes also the file information. Since a media is not only restricted to one file, this schema does not model the reality well. E.g. a media could be a video and the video thumb file or an image with a sound memo attached to it. Since now, phTagr uses also the term media instead of image.

The new schema splits the old table images to the table media and table files while the model Media gets a HasMany relation to the model File.

Other changes

The merge comes also with an improved import functionality. phTagr has now a Filter Manger which handles the import and export of a media and/or metadata. Currently there are three different filters:

  • Image Filter (JPEG)
  • Video Filter (AVI, MOV, MPEG, THM)
  • GPS Filter (LOG)

New filters could be implemented more convenient (e.g. a Sound Filter which attaches a sound memo to a media). The Filter Manager supports a priority based import that a video thumbnail is read after the video file.

Cadaver for Windows

April 1st, 2009 6 comments

phTagr supports the WebDAV network storage protocol to upload and manage your media files. While WebDAV is supported by all common OSs it is tricky within Windows (especially without encryption and the advanced Digest Authentication Schema). Free and simple alternatives for Windows are rare. On the other hand cadaver is a simple command line WebDAV client for Unix/Linux. There is also a cadaver package for cygwin to run it in Windows – but cygwin is bloody huge.

Therefore, I created a minimalistic version of cadaver for Windows from the cygwin packages and pack them to a useful zip archive. The minimalistic version comes with the required DLLs only. You can unzip the archive and use it (of cause the origin licenses of cadaver and its dependencies applies).


[Update] The command ‘ls.exe’ is now included to inspect the local directory. Call ‘lls’ within cadaver to see current directory content. Furthe the script ‘cadaver.bat’ sets the path of cadaver to the PATH environment variable to find ‘ls.exe’. So call ‘cadaver.bat’ instead ‘cadaver.exe’!

Download cadaver with required DLLs: cadaver-0.23.3-1 (updated version from 2011-04-29)
Download cadaver with required DLLs:
Download all cygwin packages:


Categories: tools Tags: , ,