Is batch-tagging available?

klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Thu, 2009-07-30 13:37

I'm migrating 5.000+ images from a "not so good"-gallery to "the super-duper-Gallery3" :)

I would very much like to batch tag or mass tag, call it what ever you like, so that I can give, say, all 700 images of BMW's the tag "bmw" instead of having to do this manually.

Possible?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-07-30 18:06

Short answer is that we're going to be doing some of this with the organize module, which is getting rewritten for the next release. Longer answer is that we'll probably not come up with exactly what you need. It would be easy to write a module to do this, though.. try seeing if you can get rWatcher (not a gallery developer, but he's written a slew of gallery3 modules already) to code something up for you. Also, please file a feature request!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-07-30 19:32

We're going to burn rWatcher out :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Thu, 2009-07-30 20:01
klp29 wrote:
I would very much like to batch tag or mass tag, call it what ever you like, so that I can give, say, all 700 images of BMW's the tag "bmw" instead of having to do this manually.

Possible?

How do you picture this working? Are you looking for something that would allow you to quickly batch tag every photo in a single album with "BMW", or something else?

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-31 04:54

Hi rWatcher :)

Well, I think of it as going into an album and making all images in that given album have a certain set of tags :)

For instance, if I have an album with 200 images of BMWs and 150 images of Ferraries, it seems to me NOW that I can assign different tags to each image FOLDER, but not to all the images IN that folder, without manually opening every single one of the images and adding the tag manually.

Perhaps it would be as easy as to having a radiobutton for "please add these tags to all images in the folder", when assigning tags to an image folder?

This way, we could easily put "general" tags like "Ferrari" on all Ferrari-images in "one mouseclick".

What do you think? :)

Ps. This would, indeed, be a SUPER effective SEO-enhancement of G3 when used together with the meta-module you did for us in http://gallery.menalto.com/node/89326 ;)

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Fri, 2009-08-21 01:21

Here you go -- This will create an additional "Batch Tag" input box on the sidebar for albums. Whatever tag(s) you enter into that box will be applied to all non-album items in that album (separate multiple tags with commas).

It can also be downloaded from my github account at:
http://github.com/rWatcher/gallery3-contrib/tree/master/modules/batchtag

And I've set up a wiki page here:
http://codex.gallery2.org/Gallery3:Modules:batchtag

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2009-08-05 02:57

Pulled!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-08-07 09:37

MAN this is nice!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
joemonster
joemonster's picture

Joined: 2006-04-12
Posts: 236
Posted: Wed, 2009-08-19 13:36

I had a bug while browsing tag.
to fix it, I added in helpers/batchtag_theme.php
the condition
if ( !($theme->tag()) )
Don't know if it's the best way, but it's working!

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-09-30 18:15
joemonster wrote:
I had a bug while browsing tag.
to fix it, I added in helpers/batchtag_theme.php
the condition
if ( !($theme->tag()) )
Don't know if it's the best way, but it's working!

Are you using Gallery Beta 2 or experimental? I'm unable to reproduce the bug using the experimental version of Gallery 3. Just to be on the safe side, I did add a "if (!$theme->item()) { return; }" line to it, which I think should do the same thing as your code, but should also prevent it from loading on other types of non-album pages besides tags.

 
joemonster
joemonster's picture

Joined: 2006-04-12
Posts: 236
Posted: Fri, 2009-08-21 07:58

Hi,
Yes I was using B2...sorry!
I did the upgrade yesterday to experimental version!
Thanks

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-08-21 08:09

"Experimental version" - what's that?

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
joemonster
joemonster's picture

Joined: 2006-04-12
Posts: 236
Posted: Fri, 2009-08-21 08:12
 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-09-29 19:11

rWatcher, I was looking at other tickets and noticed this.
https://sourceforge.net/apps/trac/gallery/ticket/821

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-09-30 06:21
Quote:
As it stands, batchtag currently seems to only operate in the current folder.

That's actually by design, as I didn't want to accidentally batch-tag a sub-sub-sub album that I forgot existed :)

I guess I can add in a check box or something to the form to include the contents of sub albums as well.

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Wed, 2009-09-30 12:49
rWatcher wrote:
That's actually by design, as I didn't want to accidentally batch-tag a sub-sub-sub album that I forgot existed :)

I guess I can add in a check box or something to the form to include the contents of sub albums as well.

That would be great, if I end up updating to G3 being able to use the new tagging stuff would be one of the main attractions. Thanks!

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Thu, 2011-03-03 03:55

Done! There is now a checkbox for including items in sub-albums.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Thu, 2010-01-21 00:17

I've created an updated version of BatchTag:
- Merged in ckieffer's CSS changes for Gallery 3 Git
- Updated for the new sidebar code in Gallery 3 Git
- Tested everything against current git (as of commit b6c1ba7ea6416630b2a44b3df8400a2d48460b0a)

It is attached here, and has been uploaded to my github account.

 
bsing

Joined: 2004-09-21
Posts: 7
Posted: Wed, 2009-10-28 21:13

Very nice module! I've been working with it, and I had it working on a prior installation. Yesterday I reinstalled the latest G3 Git version, and the latest Git version of batchtag, and when I activate module, I don't see the options in the sidebar on any pages. The theme I'm using is "night wind", but I also tried it with "wind" and it didn't work their either. Is there somewhere I can check to see why it's not showing up?

Any hints would be appreciated. Thanks!

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-10-28 21:24

You might need to manually add it to the sidebar -- Try logging in as an admin, and then select Appearance -> Manage Sidebar from the admin menu and make sure Batch Tag is listed under "Active Blocks".

 
bsing

Joined: 2004-09-21
Posts: 7
Posted: Wed, 2009-10-28 21:48

Thanks for the quick reply! Unfortunately, I don't see it under Available or Active blocks when managing the sidebar. Hmmm. I've de-activated and re-activated it, but that didn't help. I've deactivated, deleted the dir under modules, reuploaded and reactivated, but still no sign of Batch Tag.

My blocks_site.sidebar is as follows, in case it helps.

a:4:{i:0;a:2:{i:0;s:4:"info";i:1;s:8:"metadata";}i:1;a:2:{i:0;s:3:"tag";i:1;s:3:"tag";}i:2;a:2:{i:0;s:11:"image_block";i:1;s:12:"random_image";}i:3;a:2:{i:0;s:3:"rss";i:1;s:9:"rss_feeds";}} 

Do you have a sample that contains a reference to batchtag (if it should be there)? Any other hints on how that gets built?

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-10-28 23:24

That's weird, it should show up automatically. Just to confirm that everything was downloaded/uploaded properly, do you have a batchtag_block.php file in your modules/batchtag/helpers directory?

 
bsing

Joined: 2004-09-21
Posts: 7
Posted: Thu, 2009-10-29 00:29

That's it! The Git version I grabbed didn't work. I ended up replacing the whole thing with the version in the ZIP file above, and all is working well.

Thanks!

 
hebhansen
hebhansen's picture

Joined: 2009-02-10
Posts: 573
Posted: Sun, 2009-11-08 14:25

I am in the process of tagging and for sure it takes a while. This module works like a charm. Thanks big time

on latest git and the above zip

all the best
HB

 
hebhansen
hebhansen's picture

Joined: 2009-02-10
Posts: 573
Posted: Sun, 2009-11-08 16:02

Nice feature could be:

to remove tags as well
Select 2 or more images within an album for adding tag. Maybe in the album organizer

all the best
HB

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Thu, 2011-03-03 03:55

I've finished fixing the batchtag module for use with current git (tested against commit 38f2784fbbb0661dc57627d2878cb640bbffe271). This version includes the changes bharat made to the module on github and fixes an issue where the module would crash when tagging the contents of sub-albums. I've also added a warning message that'll be displayed if this module is active but the tags module is not. It can be downloaded from this post, or from my github account.

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Tue, 2010-04-27 03:18

When I use this module, either on my private 8-core monster machine or in a shared hosting environment, it uses tremendous resources and eventually dies before completing the task, leaving 100-200 images or so tagged and the rest (a few thousand) untagged.

Similarly, when uploading pictures and adding tags on the fly, it takes forever to upload.

Something is very wrong with the tag concept in Gallery 3, and it is useless as it stands (RC1 to newest everything from git). Which is bad, because tags are useful.

For a module like this to really work, I would imagine replacing or updating existing tags for all images in one single database statement.

 
raphaelb

Joined: 2010-04-29
Posts: 1
Posted: Thu, 2010-04-29 10:59

First of all thanks rWatcher for all the work!
We are having the same issue here on a 2GHZ Athlon Machine - in albums with around 50 images batch tagging works fine but as soon as there are a few more - like 150 one waits for quite a long time only to end up at a blank page .../index.php/batchtag/tagitems and only the first 50 or so images tagged.
Can there something be done?
For us tags are not only useful but crucial for the implementation of a Imagearchive.

It would be really great if there would be a solution for this...

 
Shemo725

Joined: 2008-04-18
Posts: 424
Posted: Sat, 2010-05-01 00:00

where is the option to batch tag an entire album? I cannot find it..or does the batch tag work in conjunction when you edit an album and you see the tag box at the very bottom?

edit- found it!

 
Shemo725

Joined: 2008-04-18
Posts: 424
Posted: Fri, 2010-05-28 20:38

any reason why when I try to batch tag a larger album it'll run for a few seconds then go to a blank white page with this url?
http://gallery.andrewshemo.com/index.php/batchtag/tagitems

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2010-05-29 19:35
Quote:
where is the option to batch tag an entire album?

Quote:
edit- found it!

Please update the documentation if it is not clear:
http://codex.gallery2.org/Gallery3:Modules:batchtag

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Shemo725

Joined: 2008-04-18
Posts: 424
Posted: Sat, 2010-05-29 21:13
floridave wrote:
Quote:
where is the option to batch tag an entire album?

Quote:
edit- found it!

Please update the documentation if it is not clear:
http://codex.gallery2.org/Gallery3:Modules:batchtag

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

I added a quick 'use' section on the bottom:
http://codex.gallery2.org/Gallery3:Modules:batchtag

 
anselm13

Joined: 2010-09-01
Posts: 6
Posted: Wed, 2010-09-01 16:45

Any chance that an untag option could be included?

 
mrcolj
mrcolj's picture

Joined: 2004-01-06
Posts: 79
Posted: Tue, 2010-09-07 23:09

Bump to the multiple questions about only being able to do 100 photos before a blank screen. Is there a way to get it to do less at a time, to wait between photos, to set a max cpu or a max memory, or maybe easiest would be to just to tag the photos randomly--so when it blanks out we can reissue the command, and after 15 tries we will have gotten all 1000 pictures? I'm not a programmer, so forgive my armchair-quarterback Democrats-on-how-to-solve-the-economy back-seat-driver suggestions!

--Colin Jensen
colinandbethany.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-03-03 02:56

This thread is continued:
http://gallery.menalto.com/node/101076

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team