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


Permlink Replies: 13 - Pages: 1 - Last Post: 8 Apr 26, 13:29 Last Post By: davidekholm Threads: [ Previous | Next ]
goldbrokat

Posts: 2
Registered: 28-Jul-2017
Where to import Keywords?
Posted: 5 Apr 26, 07:14
 
  Click to reply to this thread Reply
Hi there,

I have an Album with about 200 Folders. For these folders there is an Excel-File with Keywords. As I'm a bit of a Excel-Nerd there can be nearly any Format of CSV etc.

Let's assume there is a csv like this:

"Album 1";"Keyword 1, Keyword 2"


How can I import this to my Album? Isn't there an option for this?

If it isn't possible: Where are the Keywords stored in the Album? Probably i can write a small Python Script to inject the Keywords directly?

Kind

Christian
MarkusD

Posts: 821
Registered: 13-Apr-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 08:22   in response to: goldbrokat in response to: goldbrokat
Helpful
  Click to reply to this thread Reply
goldbrokat wrote:
If it isn't possible: Where are the Keywords stored in the Album? Probably i can write a small Python Script to inject the Keywords directly?

Look for a file something like that:
D:\Users\MDrück\Pictures\2026 01 30 Norge\2026 02 05 Longyearbyen\.jalbum\IMG_1910.JPG.info

There you'll find something like that:
<?xml version="1.0" encoding="UTF-8"?>
<java version="23.0.1" class="java.beans.XMLDecoder">
 <object class="java.util.HashMap">
  <void method="put">
   <string>keywords</string>
   <string>2026, Ausflug, Norge, Svalbard</string>
  </void>
  <void method="put">
   <string>title</string>
   <string>Reindalen &amp; Van Mijenfjorden</string>
  </void>
 </object>
</java>


Cheers, Markus
goldbrokat

Posts: 2
Registered: 28-Jul-2017
Re: Where to import Keywords?
Posted: 5 Apr 26, 09:15   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Hey Markus,

thank you so much for the input about this.

This seems to work for Pictures - but i need to mark the folders with the Keywords. In each folder are about 50 Pictures and we like to show the folder in the Keyword-Search so you can have a quicker look.

But it helps a lot, i will have an Eye on the .info files - even I don't know where they are for the folders yet.

Have a great easter!

Christian
MarkusD

Posts: 821
Registered: 13-Apr-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 09:31   in response to: goldbrokat in response to: goldbrokat
 
  Click to reply to this thread Reply
goldbrokat wrote:
Hey Markus,

thank you so much for the input about this.

This seems to work for Pictures - but i need to mark the folders with the Keywords. In each folder are about 50 Pictures and we like to show the folder in the Keyword-Search so you can have a quicker look.

But it helps a lot, i will have an Eye on the .info files - even I don't know where they are for the folders yet.

Have a great easter!

Christian

Hallo Christian,

ah, ich dachte der Hinweis das für Ordner zu importieren wäre nicht ganz korrekt formuliert. Weil, ich wüsste jetzt nicht was das für einen Sinn ergäbe. Ich arbeite selbst sehr intensiv mit Schlüsselworten, aber ausschließlich für Bilder und Videos. Vllt. habe ich da aber auch etwas übersehen, ich ging davon aus, dass Schlüsselworte für Ordner einen Besucher der Webseite gar nichts bringen. Man lernt immer wieder dazu.

Ebenfalls Frohe Ostern. :-)

Gruß, Markus

P.S. Übrigens sehr schöne Stoffe habt ihr da auf der Webseite, man möchte das sofort anfassen.
MarkusD

Posts: 821
Registered: 13-Apr-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 09:35   in response to: goldbrokat in response to: goldbrokat
 
  Click to reply to this thread Reply
goldbrokat wrote:
This seems to work for Pictures - but i need to mark the folders with the Keywords. In each folder are about 50 Pictures and we like to show the folder in the Keyword-Search so you can have a quicker look.

Also für Ordner geht das auch, dann suche nach so einer Datei:
D:\Users\MDrück\Pictures\JAlbum\Samples\Sample Project\Architecture\.jalbum\.info

Inhalt:
<?xml version="1.0" encoding="UTF-8"?>
<java version="23.0.1" class="java.beans.XMLDecoder">
 <object class="java.util.HashMap">
  <void method="put">
   <string>lastFolderThumbCrop</string>
   <boolean>true</boolean>
  </void>
  <void method="put">
   <string>firstCameraDate</string>
   <long>1701361800000</long>
  </void>
  <void method="put">
   <string>cameraDatesUpdatedDate</string>
   <long>1742837694006</long>
  </void>
  <void method="put">
   <string>keywords</string>
   <string>Folder 2</string>
  </void>
RobM

Posts: 3,941
Registered: 4-Aug-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 10:00   in response to: goldbrokat in response to: goldbrokat
 
  Click to reply to this thread Reply
You can import keywords etc. For files using the menu, File>Import>From database file…

Edited by: RobM on 5 Apr 2026, 09:00
MarkusD

Posts: 821
Registered: 13-Apr-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 10:07   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
You can import keywords etc. For files using the menu, File>Import>From database file…
Rob, are you sure it does also import keywords to a folder ? I'm not sure. I thought David had images in mind when he implemented that function.
RobM

Posts: 3,941
Registered: 4-Aug-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 10:25   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
RobM wrote:
You can import keywords etc. For files using the menu, File>Import>From database file…
Rob, are you sure it does also import keywords to a folder ? I'm not sure. I thought David had images in mind when he implemented that function.
I made an edit above to clarify it is files, not folders.
MarkusD

Posts: 821
Registered: 13-Apr-2006
Re: Where to import Keywords?
Posted: 5 Apr 26, 10:30   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Ahh, I see.
davidekholm

Posts: 3,905
Registered: 18-Oct-2002
Re: Where to import Keywords?
Posted: 7 Apr 26, 19:40   in response to: goldbrokat in response to: goldbrokat
 
  Click to reply to this thread Reply
goldbrokat, see "Add->From database file". I assume it will work with both files and folders actually. This importer works with both XML, JSON and CSV files.

(The keywords for a folder are stored under the file .jalbum/.info, but never edit this file directly. Rely on the importer tool above, or use a small script that does the importing.)
RobM

Posts: 3,941
Registered: 4-Aug-2006
Re: Where to import Keywords?
Posted: 7 Apr 26, 20:38   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
When trying to import to a folder I get this error
java.lang.NullPointerException: Cannot invoke "se.datadosen.jalbum.AlbumObjectFactory.createInstance(java.io.File)" because the return value of "se.datadosen.jalbum.JAlbumContext.getAlbumObjectfactory()" is null
	at xmpinjector.XMPInjectorController$1.getAOMap(XMPInjectorController.java:204)
	at xmpinjector.XMPInjectorController$1.call(XMPInjectorController.java:159)
	at xmpinjector.XMPInjectorController$1.call(XMPInjectorController.java:145)
	at javafx.graphics@23.0.1/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
davidekholm

Posts: 3,905
Registered: 18-Oct-2002
Re: Where to import Keywords?
Posted: 7 Apr 26, 21:56   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
When trying to import to a folder I get this error
java.lang.NullPointerException: Cannot invoke "se.datadosen.jalbum.AlbumObjectFactory.createInstance(java.io.File)" because the return value of "se.datadosen.jalbum.JAlbumContext.getAlbumObjectfactory()" is null
	at xmpinjector.XMPInjectorController$1.getAOMap(XMPInjectorController.java:204)
	at xmpinjector.XMPInjectorController$1.call(XMPInjectorController.java:159)
	at xmpinjector.XMPInjectorController$1.call(XMPInjectorController.java:145)
	at javafx.graphics@23.0.1/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Ok, I've updated this extension (XMPInjector.jaext) so it also supports folders and non JPEG files. Please put this file inside jAlbum's "ext" folder: https://jalbum.net/download/XMPInjector.jaext

Ensure you have the relevant project opened within jAlbum before selecting "Add-> from database file"
RobM

Posts: 3,941
Registered: 4-Aug-2006
Re: Where to import Keywords?
Posted: 7 Apr 26, 22:04   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Yes, that works nicely now.
davidekholm

Posts: 3,905
Registered: 18-Oct-2002
Re: Where to import Keywords?
Posted: 8 Apr 26, 13:29   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Happy to hear :-)
Legend
Forum admins
Helpful Answer
Correct Answer

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