This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 11 - Pages: 1 - Last Post: 15 Mar 26, 20:10 Last Post By: RobM Threads: [ Previous | Next ]
anatolk

Posts: 5
Registered: 11-Jan-2010
Group by Keywords should also group images with no keywords
Posted: 14 Mar 26, 15:21
 
  Click to reply to this thread Reply
I am creating an album with fairly large number of images (2000+) where I cannot depend on names (images came from many sources -scans, many different cameras) and therefore time or date are not reliable either. I have to assign keyword(s) to each of those images. It became difficult to keep scrolling and find those images which do not have keywords yet.

Is there a way to order the images by keywords (in whatever order) with images without keywords being displayed either before or after those with keywords. (Maybe even view just those?) Can a script be written to do that?

Pointers will be appreciated.
RobM

Posts: 3,991
Registered: 4-Aug-2006
Re: Group by Keywords should also group images with no keywords
Posted: 14 Mar 26, 15:39   in response to: anatolk in response to: anatolk
 
  Click to reply to this thread Reply
Have you tried the keyword view? https://jalbum.net/help/en/jAlbum/Explore#Keywords

You could assign all objects with a temporary keyword and then remove that keyword as you add the required keywords. You could assign all objects without keywords a flag and filter by flag. https://jalbum.net/help/en/jAlbum/Explore#Filter_bar
davidekholm

Posts: 3,975
Registered: 18-Oct-2002
Re: Group by Keywords should also group images with no keywords
Posted: 14 Mar 26, 17:28   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Add a keyword view, see View->Views->Keywords view
anatolk

Posts: 5
Registered: 11-Jan-2010
Re: Group by Keywords should also group images with no keywords
Posted: 14 Mar 26, 21:29   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Yes, I am working in the Keyboard view.
If View -> Ordering had a selection "Keyword" that would solve the problem.

Assigning Temp keyword and removing it as I go along would work - just a bit of a pain.

View -> Views - Keyword view ... Would work if all the images without keywords were grouped as such, which was exactly what I suggested.

Thank you both!
davidekholm

Posts: 3,975
Registered: 18-Oct-2002
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 10:59   in response to: anatolk in response to: anatolk
 
  Click to reply to this thread Reply
I'll put it on the todo to address this somehow
RobM

Posts: 3,991
Registered: 4-Aug-2006
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 11:36   in response to: anatolk in response to: anatolk
 
  Click to reply to this thread Reply
anatolk wrote:
Yes, I am working in the Keyboard view.
If View -> Ordering had a selection "Keyword" that would solve the problem.

Assigning Temp keyword and removing it as I go along would work - just a bit of a pain.

View -> Views - Keyword view ... Would work if all the images without keywords were grouped as such, which was exactly what I suggested.

Thank you both!

If you add a custom view with the code
obj.keywords <1
that will show only objects with no keyword. You would then need to open the view, double click a thumbnail to show the object in explorer and then add your keywords. Every now and then refresh the view window to remove those objects that have had keywords assigned.
anatolk

Posts: 5
Registered: 11-Jan-2010
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 15:18   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
While I spent my professional life in software, and did fair bit of Java 20+ years ago - I was afraid to go into Groovy :-) and adding any code without knowing structure of obj. and all methods.

I used the Temp keyword suggestion and plowing though it.

Thanks a lot!
RobM

Posts: 3,991
Registered: 4-Aug-2006
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 16:40   in response to: anatolk in response to: anatolk
 
  Click to reply to this thread Reply
anatolk wrote:
While I spent my professional life in software, and did fair bit of Java 20+ years ago - I was afraid to go into Groovy :-) and adding any code without knowing structure of obj. and all methods.

I used the Temp keyword suggestion and plowing though it.

Thanks a lot!

Groovy is essentially the same as Java, at least for most basic code likely to be used in jAlbum.
Have a look at

https://jalbum.net/help/en/JAlbum/Views
And
https://jalbum.net/help/en/JAlbum/Views/Custom_view_codes
anatolk

Posts: 5
Registered: 11-Jan-2010
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 19:04   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Attachment groovy_error.jpg (529.8 KB)
OK - so you perked my interest :-) If it only was that simple:

obj.keywords returns string containing all the keywords not the number of keywords and therefore obj.keywords < 1 throws and error.

obj.keywords == "" will work.
davidekholm

Posts: 3,975
Registered: 18-Oct-2002
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 19:43   in response to: anatolk in response to: anatolk
 
  Click to reply to this thread Reply
Just do
obj.keywords.length() < 1
davidekholm

Posts: 3,975
Registered: 18-Oct-2002
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 19:48   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
obj.keywords returns a string so you're actually checking if the string's length is zero. If you like to work with a set of keywords, then you can do:
obj.keywordSet.size() < 1
. "obj" is an AlbumObject by the way.
RobM

Posts: 3,991
Registered: 4-Aug-2006
Re: Group by Keywords should also group images with no keywords
Posted: 15 Mar 26, 20:10   in response to: anatolk in response to: anatolk
 
  Click to reply to this thread Reply
anatolk wrote:
OK - so you perked my interest :-) If it only was that simple:

obj.keywords returns string containing all the keywords not the number of keywords and therefore obj.keywords < 1 throws and error.

obj.keywords == "" will work.

Sorry, I missed of the .length() parameter. I tried it late last night and today I just typed it out.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums