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: Bulk Importing of pictures, thumbnails and captions created with Gallery Mage  (Read 11977 times)

0 Members and 1 Guest are viewing this topic.

willdenniss

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • Gallery Mage author
    • Gallery Mage

Hi,

I am not a user of Coppermine, but someone who has written an open source gallery processing tool named Gallery Mage.  This tool is able to process galleries of images including the ability to exclude unwanted images, rotate, crop and resize (see the web site for more info: http://tanksoftware.com/gallmage/ [note: the user manual is out of date, the draft of the new user manual can be found here]).  The program provides official support for the SPGM gallery tool, although some of my users have found the tool useful with Coppermine as well.

What I am proposing is more complete support for Coppermine by Gallery Mage, and vice versa (hence my choice of forum).

From reading the documentation, Coppermine appears to be able to batch import a folder of images.  This is great, as that is exactly what Gallery Mage generates (and can upload).  What I couldn't see, is an easy way to import captions.  Using Gallery Mage, users can caption their photos.  One advantage of this is that Gallery Mage is not coupled to any particular display library, so if users wish to change, they can simply re-export and reupload.  For example, I use SPGM for my personal galleries, but if I wanted, I could re-export to Coppermine, captions and all.

I have several ideas on how we can achieve this, but I thought I would just test the water first and see if there is interest.  If the Coppermine dev's are interested in creating a standard coppermine caption text import format, I can code an exporter to this format for Gallery Mage.

Kind Regards,


William Denniss.
Logged
Gallery Mage - Photo gallery processing tool

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net

The next version of Coppermine proposes to have a proper XML-RPC API, however there is nothing to stop anyone from implementing what you are talking about - It would be a rather cool feature to have :)

Tell us more
Logged
SANIsoft PHP applications for E Biz

willdenniss

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • Gallery Mage author
    • Gallery Mage

I think the simplest way to be able to import captions would be to have a caption format that looked something like the following:

Code: [Select]
--------gallery_captions.txt------------
[MyPhotos-001.jpg]
This photo is of me and my dog.

[MyPhotos-002.jpg]
This is another photo of my and my dog.
She's a lovely dog isn't she?

-----------end-----------------

or even:

Code: [Select]
MyPhotos-002.jpg | This is a photo of me and my dog.
MyPhotos-003.jpg | Here's another photo
MyPhotos-004.jpg | and another!

The latter format is what SPGM uses.  The limitation is that you can't add line breaks, although these need to be inteperated anyway (as HTML won't display them).  One solution is simply for gallery mage to replace all '\n''s with "<br />"'s, or just ignore them.


Can one currently batch import thumbnails with Coppermine?  I can easily configure my program to create "thumb_<filename>.jpg" style captions.  I'm not even sure how nessesary this particular feature is if thumbnail generation is simple enough in Coppermine anyway.  If the user wan't generating images, would they even need to have GD installed?  This could be advantageous to those who for whatever reason do not.


Ideally then, the user can export all images, thubmanils, captions into a folder, which is then uploaded (either using Gallery Mage, or their FTP client).

Then the user simply logs on to Coppermine, and creates a new Gallery importing everything.  When you implement an XML-RPC API, Gallery Mage could even do this final step automatically by sending via XML-RPC the location of the files, and the gallery name and caption (I suppose).

What do you think?

Cheers,

Will.
Logged
Gallery Mage - Photo gallery processing tool

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net

I presume that SPGM does not need user permissions OR Album /  Categories it just uses the Directory structure - am I correct?

Right now Coppermine does not import thumbnails but generates them when batch uploading...

Yes, using XML-RPC It is presumed one will be able to Post the image/files and other info directly to Coppermine.

So are you willing to code the Export to Coppermine for your Gallery Mage?  - Once again I feel it will make a nice addition
Logged
SANIsoft PHP applications for E Biz

willdenniss

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • Gallery Mage author
    • Gallery Mage

That's correct regarding SPGM.

Regarding thubmanils, that's fine, the Coppermine Gallery Mage plugin can simply not export thumbnails, this will make the exporting process a bit faster.

Regarding XML-RPC, that's great.  Certainly something I can add to the Coppermine GM plugin once ready.  I've used XML-RPC before and like it.

I am certainly willing to code a Coppermine export plugin for GM. thank you, I hope people will find it useful :)

What are your thoughts on the caption importing into Coppermine?  I this something that can easily be added to the batch upload proceedure by a Coppermine dev?

Cheers,

Will.
Logged
Gallery Mage - Photo gallery processing tool

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net

Importing a caption by reading a text file should not be too difficult - however tying it to batch uploads might involve jumping through a few more hoops - but yes it is possible
Logged
SANIsoft PHP applications for E Biz

willdenniss

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • Gallery Mage author
    • Gallery Mage

What would be the easiest way to do it?  The other choice would be to have one caption text file per image, e.g. "MyPicture-001.jpg.txt".  That way it would be just a simple "file_get_contents", assuming it's easy enough to get the data into MySQL.

Will.
Logged
Gallery Mage - Photo gallery processing tool

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net

MyPhotos-002.jpg | This is a photo of me and my dog.
MyPhotos-003.jpg | Here's another photo
MyPhotos-004.jpg | and another!

this format would be the most easy to handle.
Logged
SANIsoft PHP applications for E Biz

willdenniss

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • Gallery Mage author
    • Gallery Mage

ok, well I shall add a Coppermine exporter to Gallery Mage which exports pictures without thubmanils, and captions in that format.

Hopefully one of the Coppermine dev's can add a caption importer, either as part of the bulk importer, or as a seperate feature.

Cheers,

Will.
Logged
Gallery Mage - Photo gallery processing tool

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net

Great looking forward to it - will defienitely put in a request to have a caption importer created
Logged
SANIsoft PHP applications for E Biz

willdenniss

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 9
  • Gallery Mage author
    • Gallery Mage

Download version 2.4.1 with Coppermine support here:  http://tanksoftware.com/gallmage/

Have a read of the *new* included manual, but basically you load and export like so:

Gallery->Open Gallery    - select image directory
Export->Coppermine      - select export directory (the default is ./export), and click OK

Images are exported, and a caption file named 'pic-desc.txt' is created.  Of course, the name of the caption file can be what ever we like :)

There's nothing to stop one using it with Coppermine as it stands, but caption importing would be really nice.

Cheers,

Will.
Logged
Gallery Mage - Photo gallery processing tool
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.