Command-line batch add of images would be extremely beneficial, particularly to users who have a lot of photos to add on a regular basis.
There seems to be an issue with adding a large number of photos from a single directory. Initially everything is going well and you see those blue "OK" icons popping up. However, once the number of added photos gets in the 400-500 range, all you get are the "red crosses" and the images are not added. Clicking on the "red cross" reveals no useful information. I tried to optimize MySQL, PHP, Apache2 settings as well as to use different browsers... Still, the problem remains and it's hard to figure out where it's coming from.
I suppose a Shell/SQL script can be put together with some effort to add photos, titles, and captions from command line, but it would be nice to have this option come standard with Coppermine.
As an example, I have photos, captions, and dates stored in separate files with matching names. I add the photos to the gallery via the Coppermine Web interface. However, the dates and the photos are added by this rather unsightly Sh/SQL script. It may be far from the ideals of efficiency, but it gets the job done quickly enough for my needs.
#!/bin/sh
#
MYSQL="mysql -U******** -P********"
DB="photodump"
TABLE="photoarc_pictures"
BASEDIR="/disk4/htdocs/photodump/albums"
NEWSDIR="news"
LOG=$BASEDIR"/"$NEWSDIR"/photodump.log"
if [ ! -f $LOG ]
then
touch $LOG
chown wwwrun $LOG
chgrp www $LOG
fi
ls $BASEDIR"/"$NEWSDIR | fgrep "_photos" | awk -F'_' '{print $1"_"$2}' | while read DIR
do
if [ `cat $LOG | fgrep -c $DIR` -eq 0 ]
then
PREPATH=$NEWSDIR"/"$DIR
FILEPATH=$PREPATH"_photos/"
COUNT=$(ls $BASEDIR"/"$PREPATH"_photos" | egrep -v "normal|thumb" | fgrep "photo_" | wc -l | awk '{print $1}')
i=1
while [ $i -le $COUNT ]
do
if [ -f $BASEDIR"/"$PREPATH"_photos/photo_"$i".jpg" ] && [ -f $BASEDIR"/"$PREPATH"_dates/date_"$i".txt" ] && [ -f $BASEDIR"/"$PREPATH"_captions/caption_"$i".txt" ]
then
FILENAME=photo_$i.jpg
echo "Processing $DIR - $FILENAME"
DATE=$(cat $BASEDIR"/"$PREPATH"_dates/date_"$i".txt")
CAPTION=$(cat $BASEDIR"/"$PREPATH"_captions/caption_"$i".txt")
#------------------------------
# BEGIN SQL QUERY
#------------------------------
eval $MYSQL <<EOF
CONNECT $DB;
UPDATE $TABLE
SET caption = "$DATE - $CAPTION"
WHERE filename = "$FILENAME" AND filepath = "$FILEPATH";
quit
EOF
#------------------------------
# END SQL QUERY
#------------------------------
fi
(( i = i + 1 ))
done
echo $DIR >> $LOG
fi
done
And a couple other wishes:
1) The "Categories" page gets very "heavy" and take a while to load even over LAN once as the number of categories grows. For me it's still bearable, but inevitably a point will be reached when it will be easier to add/edit categories directly via mysql.
2) Again the "batch add" feature - the list of directories seems to take an eternity to load if you have a large number directories/files in the "albums" folder. I suppose this can be fixed by a more experience end user. Still, it's a limitation of Coppermine that should be relatively simple to remove in the "production" version of Coppermine.
These are the three big Christmas wishes :-) And so I don't appear ungfrateful: Coppermine is a masterful combination of simplicity and powerful features. I chose it because it had everything I needed and nothing I didn't need. And that doesn't happen very often. Thanks.