ANNOUNCE: galleryadd.pl 2.10

iainlea

Joined: 2004-09-24
Posts: 10
Posted: Mon, 2006-05-29 15:47

URL: http://freshmeat.net/projects/galleryadd/

galleryadd.pl is a script that recursively adds directories or images to a Gallery installation. Its features include a listing of the albums available in a Gallery, the creation of top-level albums with titles and descriptions, and support for the addition of images and directories to an existing album.

Changes in 2.10:
- changed -c to print fancy formatted album name as when creating album
- fixed recursive addition of directories whose name contained spaces
- fixed 500 errors on large uploads ie. videos

Usage: galleryadd.pl [options] [file(s) | dir(s)]
-a album album to be used for uploading image(s) or directory
-c album create new album for uploading image(s) or directory
-C text caption for image(s)
-d text description for new album
-g url URL of gallery (default: http://bricbrac.dyndns.org/gallery)
-G [1|2] gallery version being accessed (default: v1.x)
-l list available albums for specified gallery
-n do not verify if album exists before starting upload
-p pass password to use to login to gallery
-q quiet mode (unless errors are encountered)
-t text title for new album (if not specified uses -c value)
-T test image(s) integrity before uploading (jpeg only)
-u user username to use to login to gallery (default: admin)
-z zap caption that is by default derived from filename
-h help
-v verbose

Examples:
galleryadd.pl -g http://gallery -u admin -p secret123 -a mycars bmw.jpg

upload image bmw.jpg to album mycars

galleryadd.pl -g http://gallery -u admin -p secret123 -c xmas /tmp/*

create album xmas and upload images located in /tmp directory

NOTE: G2 users need to specify the album ID (not name) when using -a option

 
fisix

Joined: 2006-05-31
Posts: 3
Posted: Fri, 2006-06-02 05:17

i've tried using this latest version and ran into a few little problems. (on a windows machine)

1) i can't get wildcards to work. for example, in your example above:

galleryadd.pl -g http://gallery -u admin -p secret123 -c xmas /tmp/*

i get this after the album is created successfully: "Upload * [ERROR]" as the last line. i've also tried *.*, *.jpg (running from inside the directory where the photos are) and a static path (c:\picts\pidfr\*.jpg), and all give the same error. i can load a single jpeg file easily, and it goes into a root level album (yay!).

i believe that if i could get the wildcards to work, then i could solve my other problem:

2) i can't load a group of pictures at the same time to a root level album. once i reference the diretory and not a specific file (c:\picts\pidfr for example), the script jumps into recursive mode and all images are put into sub albums named after the directory they are in. this is probably as it should be, but it means i can't create a small batch file to load my picture repository into root level albums, which is bad because it makes it hard to test multiple gallery installations/configs.

i am running gallery v1.5.3, php 5.1.4 in module mode, and apache 2.0.58 (no-ssl). i've tried both activeperl5.8.8.817 and pxperl-5.8.7-6 (windows perl runtimes), neither one seems to work better than the other. i've installed everything in the root diretory so that there aren't any spaces in the paths to the major directories. gallery seems to be working just fine, otherwise, so i think i have all the support apps working well, except for maybe perl.

any suggestions on what i might have misconfigured so that i can't use wildcards in windows? by the way, i'm running a fully patched windoes 2000 pro machine, and the lastest java runtime (not sure if that matters).

i can get around this by just uploading everything and then going back into gallery and moving things around and editing in there, but of course a nice perl script would be infinitely better.

by the way, let me just say thank you very much for maintaining the script. it works a million times better than the other ways to get images into gallery.

thanks,

-fisix

 
adriand

Joined: 2005-07-16
Posts: 14
Posted: Tue, 2006-06-06 17:54

I am having a problem with either the size of movie files, or the movie file itself. The script succeeds in uploading one .mov that is 2.8 megs, but it fails on one (the one right after it) which is 8.3 megs.

This is the error I get: Error: could not upload image - unknown error
Followed by html code that seems to be from the gallery item page.

I have other movies that will try to load later (i'm uploading a huge file structure), but now I wonder if they will just fail as well (causing me to manually upload all the images after them, and thus defeating the purpose of a script). These include .avi and .asf.

I WOULD use the regular remote app, but the file structure is important.

can anyone please help me? is there a way to increase the allowed upload size? skip movie files? Thanks

 
apeironian

Joined: 2004-11-15
Posts: 32
Posted: Mon, 2007-02-12 16:15

Hi guys,

This is probably an issue of PHPs built-in file upload limit. It's commonly set at 8 MB, so that's where your problem is. If you run your own server, you can increase this limit in your PHP config file (I don't remember where it is in the file, but I'm pretty sure there are instructions for doing this in the Gallery documentation available online). If you don't run your own server, and don't have access to PHP config files, you're sort of out of luck - you'll have to upload the file first using FTP or something, then "add from local server" in the web interface.

Mike