Advanced search  

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

Pages: [1]   Go Down

Author Topic: [linux] command-line mass import  (Read 3082 times)

0 Members and 1 Guest are viewing this topic.

enjoyaol

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
[linux] command-line mass import
« on: May 24, 2008, 01:23:12 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [linux] command-line mass import
« Reply #1 on: May 25, 2008, 12:40:52 am »

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.
Logged

enjoyaol

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: [linux] command-line mass import
« Reply #2 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 ?
Ok i'll try that.. it's something i haven't tried yet :)

Thanks
Henri
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [linux] command-line mass import
« Reply #3 on: May 25, 2008, 01:22:47 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 19 queries.