Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Command line tools?  (Read 3425 times)

0 Members and 1 Guest are viewing this topic.

adameros

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • http://www.livejournal.com/users/adameros/
Command line tools?
« on: December 27, 2004, 10:55:01 pm »

I have a number of directories of images I would like to add to my Coppermine archive, but rather than having to sit and load directory by dorectory to the archive, I would like to use some sort fo command line tools.

All the directory names match what I will name the albums, so I would love it if there were two commands that did the following:

albumcreate owner group pulic/group/private albumname
imageadd owner albumname imagefile

Then I could do something like this:
cd /archive
foreach a ( * )
  albumcreate adam friends group $a
  imageadd adam $a $a/*
end

Then I could go take a nap for a few hours and when I get back up all the images would be loaded.

This will make migration from anyother gallery program to Coppermine a breeze. Has anyone written anything to do this?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Command line tools?
« Reply #1 on: December 28, 2004, 05:04:37 am »

such a script hasn't been written yet (it'd require shell access to your webserver and in-depth knowledge both of mySQL and ImageMagick to accomplish a command line tool, which could of course only be used by a handfull of people, since most users are webhosted). Every PHP script would time out if you were going to add hundreds of pics in one go. Did you have a look at the batch-add tool (the recommended upload method for coppermine site admins is ftp-upload and batch-add). It won't create albums for you though, but it'd be rather easy to code a php script that crawls through a defined folder structure and creates categories and albums that matches the folder structure (although you'd have to create a script like that on your own, as I doubt someone here will). What amount of pics are we talking about?

Joachim
Logged

peda

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Command line tools?
« Reply #2 on: May 18, 2005, 09:04:32 am »

I recently wrote a simple Perl script for adding photos in my gallery via command line ... If you are interested, I can send you/post this script. It
is still very beta ...
Currently this script searches all files in a directory with a .jpg-extension, takes each photo, resizes it (via GD library), reads exif data and
adds everything in the mysql database to a given categorie and album.
There are also command line scripts to add an album/categorie!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Command line tools?
« Reply #3 on: May 18, 2005, 09:32:06 am »

We're definitely interessted in such a script, please attach it to your reply (using "Additional options" when composing your message).
You might as well want to take a look at Batch add with automatic album/cat structure from directory tree.
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 20 queries.