I have a large list(around 1000) of directories all with images ready to import into gallery, each directory will be it's own album within gallery. As far as I know, the only way to enter these into gallery is to click: new album..add photos..paste in the directory..submit url or directory..add files...wait for it to process and dismiss.
Anyone know of a workaround, hack, trick, or feature that will save me from doing this 1000 times over. Call me lazy, but this is too much repitition for this day in age.
Thanks,
Jeremy
Posts: 6
:mad:
Posts: 6
I would love it if someone replied, even if it was something like "you lazy idiot" or "no"
Posts: 1301
Hi
I feel your frustratration! I guess everyone is out enjoying the weekend, or maybe someone hasn't come along yet that knows the answer.
I wish I did, but alas....I don't... :sad:
Posts: 29
Hi,
There's a tool where you can batch upload pictures with.
It will certainly be of some use to you. If you're lucky it even supports directory structures, but that I don't know because I haven't used it lately.
You can download it at: http://sourceforge.net/projects/gallery
Posts: 6
Thanks for the responses guys(gals?)
kvdb, are you refering to gallery remote?
great tool, but unfortnately not what I need here. The images are already uploaded and arranged neatly in directories on the server and I have a list of all the directories. I need to make each of those an album in gallery.
I'm thinking that I can manually create the same structure that gallery uses there's gotta be some way I can integrate the albums into my gallery without using any of the gallery import features. I haven't tested this out yet, but I'll report back here if the results are good. I figure there's gotta be someone else here looking for the same thing.
Hope you're all enjoying your weekends. I'm not (I work Sat-Wed :cry: DOH!)
Later,
J
Posts: 313
Maybe you can use the <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&name=phpWiki&file=index&pagename=UPDATED%21%20Addimage" TARGET="_blank">Addimage Script</A><!-- BBCode End -->.
Good luck!
Posts: 6
BorgKing,
You rock. Just took a peek at that code, and that looks along the lines of what I need. I'll post back my with results, and share the code if I change.
Thx,
J
Posts: 22
It would be nice if there was a solution where Gallery automatically recognized new albums moved into its /albums directory. Somewhat like how it upgrades existing albums from 1.3.1 to 1.3.2
Is this possible ?
Posts: 6
Well, with that addimage.pl I can import directories into existing albums via the command line... Still searching for a way to add albums though. Anyone know how to do this?
Here's a code snip for adding a directory of images.
for i in `find /path/to/image/dir -type f -name "*.jpg" ` ; do perl addimage.pl -l gallery.url.com -a albumname -u username -p password -f $i; done
Posts: 95
I was looking for somthing along those lines also, however addimage.pl, I can not find, I found adddir.pl, however when I try and run it:
bash-2.05$ adddir.pl
or when I do:
bash-2.05$ adddir.pl - h
I get this:
Line 28 is:
Posts: 487
My updated adddir.pl script allows you to create new albums.
You do, however, need a patched copy of gallery_remote.php for
it to work. I think I have links to both at http://sexorcisto.net/gallery-patch/
Someone posted a link to their version of an altered adddir.pl script someplace
in the forums that works differently then mine, you'd have to do a search.
Mine isn't terribly well rounded as I just updated for a specific need at the
time. As to it not working, I don't know, try re-installing/upgrading your
GetOpt module.
Posts: 19
I cant get this script to work properly... It wont recurse the subdirectories any more..
here is what I enter:
# adddir.pl -l http://www.photoliciousphotography.com/clubdesmo/gallery -a December_2002 -u admin -p password -d /path/to/my/images
Logging in... Successful.
Fetching list of albums (may be slow)... Fetched.
Found 2 files in /path/to/my/images
Uploading image Club_Desmo_12-11-02... Successful.
Uploading image Club_Desmo_12-12-02... Successful.
** Uploaded 2 images from /root/desmo/
There are 1800 images in several sub directories that need to be uploaded...
I was using the 1.o beta script and it worked fine with gallery version 1.3.cvs9 or something like that. I upgraded to 1.3.2 and down loaded the latest adddir.pl then fixed it. (you forgot to put a semi colon at the end of line 313. and now the script works but no longer recurses sub directories?? I am not a programmer and have no idea how to fix it my self, but I need this to work badly.. I upload an average of 4 to 5K images a month and usualy in bathces of 1500 plus images at onece. Gallery remote doesent do what I need it to.. The old adddir.pl script worked beautifuly.. I also applied the patch to gallery_remote.php
Any help would be greatly appreciated..
THanks
Phil
Posts: 1
It looks like the link to the adddir.pl script doesn't call your new code in gallery_remote (new-album). Is there another version somewhere?
Posts: 13
Vallimar:
1) The adddir.pl found here: http://sexorcisto.net/gallery-patch/ does not seem to use the new-album function as the remote_gallery.patch (this has allready been pointed out by rscanon)
2) The same adddir.pl misses a semi-colon (as pointed out by phylo)
(This post was fun, I just wrote what other ppl had said before, if they would have been fixed it would have saved me some hours of messing around)
Anyways, I have spend a total of ~10 hours of configurating so that I can add files with prompt, I would be happy if other users didn´t have to go through that.
It is a very complicated way to use adddir.pl as it is perl, it has depencies (getopt-simple) and is not even finished. I think I´ll make an online-guide on how to do what I have almost done, just as soon as I get it to work. (just the album-creation left)
/Anders
Posts: 487
Strange, it worked last time I used it...
My version doesn't automatically recurse directories either.
Thought I mentioned that. I think someone did an alternate
version of adddir.pl in the customization forum here that did so.
Try searching the forum on adddir or adddimage to find it.
Posts: 974
Hmm. It sounds like I may have to stop putting it off and do a revision.
There will still be dependencies.
Posts: 75
Just curious, would it be easier writing up a small program that will just batch an entire directory? I'm looking at the directory structure etc that the gallery program creates. Wouldn't you just need to duplicate the same thing when adding more folders and editing the files that are there?
Posts: 1
Is there a way to coax adddir.pl to create a new album inside an existing sub-album? From there, It would be a simple exercise of adding a wrapper to upload an entire existing folder hierarchy of images into gallery. (Or just hak adddir to call itself on directory entries.) It would appear, however, that gallery wasn't meant to handle subgalleries, originally, and a bad thing could potentially happen were one to attempt to create two directories of the same name?
Posts: 974
Try this:
http://gallery.menalto.com/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=3315&3