GitHub - FlominatorTM/iptc_to_vicuna: Insert IPTC descriptions into VicuñaUploader session file
- ️Sat Apr 01 2017
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
- Notifications You must be signed in to change notification settings
- Fork 0
Insert IPTC descriptions into VicuñaUploader session file
This is a proof of concept class that shows how one can manipulate a session file saved in VicuñaUploader. In this case one field of IPTC data that might have been insertedby using a tool like GeoSetter gets retrieved from the files and inserted in the description field of the session file.
Installation
Since I didn't find the correct command line to run my class with a jar file yet, the installation is a little hacky:
- Download metadata-extractor-2.9.1.zip which is currently the last version of metadata-extractor that was released in binary form
- Extract the zip file and the jar files inside (e.g. with 7zip) and put the content into the same folder as DescribeIt.class from this project (there should be a folder "com" now)
Usage
- Open the pictures in VicuñaUploader
- Save the session as file "session.xml" in the same folder as DescribeIt.class
- Run the class file (in a happy day scenario this should work via run.bat)
- Load the result file "output.xml" in VicuñaUploader
How it works
- It adds a root tag to session.xml (because of settings and list don't have a parent node required for parsing)
- It parses session.xml and retrieves all map tags (one map equals one image)
- Within a map tag it retrieves the tags description and path
- Path is used to locate and open the image file
- Metadata of the image file is retrieved
- If the meta data field starting with "[IPTC] Caption" is found, the value is written into the description tag retrieved before
- After all map tags are processed the updated xml file is saved
- The root tags are removed again
Compiling
- Clone this project
- Install some Java development kit
- Put the bin folder of it into your path environment variable or add it to the commands java and javac in build_and_run.bat
- Get and unzip the metadata-extractor file mentioned in seciton "Installation" (you should now have to additional jar files in the folder)
- Run build_and_run.bat
Components used