[linux] command-line mass import [linux] command-line mass import
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[linux] command-line mass import

Started by enjoyaol, May 24, 2008, 01:23:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

enjoyaol

Hi,

I'm facing a problem with coppermine i'm trying. I want to install a huge number of picts (perhaps 2000) at once in coppermine. As far as i know, most of all the ways to install pictures in cpg are http related :

- the batch add stuff needs me to use my browser and uses the CPU of the server -> slow, and need to click click click
- the mass import plugin does the same : one or 2 pictures at once are converted my imagemagick -> slow, but there is the 'continue' checkbox... yesterday i tried with 400 high-res pictures but i needed to keep-on my browser the whole time...
- the java uploading tool goes through HTTP -> i don't want that

Hopefully i am root on my hosting box so i want to bring up an idea or a new process to upload the picts to free-up the server load. It's not user related as only the administrator/root can do that but i guess i'm not the only guy here to use my own box to host coppermine...

- create thumbtails locally on the client machine with photoshop, or anything else... with the thumb parameters of cpg (width/height)
- upload the whole directory (normal_*.jpg and thumb_*.jpg) in /albums/
- run a script (to be done) to simply create the sql rows in the db from the newly uploaded directory, and insert the stuff in the mysql db.

I think all this stuff would be faster than the other methods listed at first, is there any dev here who could say if i'm wrong or not ?
Is there any need for such a script ? would be a simple script like :

$: ./insert.pl album_id [directory_path]

Henri

Joachim Müller

If you create the thumbs and intermediates manually (or with a tool outside of coppermine) and use the batch-add or massimport, the script will be lightning-fast, as the resouces-consuming process is the creation of the resized files. This being said, there is no actual need for a command line tool imo if you create the resized pics without using coppermine.
You're of course welcome to come up with such a tool if you feel like it.

enjoyaol

Are you saying that if i upload my picts in , say, /albums/MyAlbum, with the thumb_ and normal_ files, the batch-add won't recreate the thumbnails and all ?
Ok i'll try that.. it's something i haven't tried yet :)

Thanks
Henri

Joachim Müller

Quote from: enjoyaol on May 25, 2008, 02:34:16 AM
Are you saying that if i upload my picts in , say, /albums/MyAlbum, with the thumb_ and normal_ files, the batch-add won't recreate the thumbnails and all ?
Correct: if resized images (according to the naming scheme you set up in coppermine's config) already exist, coppermine skips the step of creating the resized images and "just" adds the corresponding database records.