Skip to content

FlominatorTM/iptc_to_vicuna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Download metadata-extractor-2.9.1.zip which is currently the last version of metadata-extractor that was released in binary form
  2. 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

  1. Open the pictures in VicuñaUploader
  2. Save the session as file "session.xml" in the same folder as DescribeIt.class
  3. Run the class file (in a happy day scenario this should work via run.bat)
  4. Load the result file "output.xml" in VicuñaUploader

How it works

  1. It adds a root tag to session.xml (because of settings and list don't have a parent node required for parsing)
  2. It parses session.xml and retrieves all map tags (one map equals one image)
  3. Within a map tag it retrieves the tags description and path
  4. Path is used to locate and open the image file
  5. Metadata of the image file is retrieved
  6. If the meta data field starting with "[IPTC] Caption" is found, the value is written into the description tag retrieved before
  7. After all map tags are processed the updated xml file is saved
  8. The root tags are removed again

Compiling

  1. Clone this project
  2. Install some Java development kit
  3. 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
  4. Get and unzip the metadata-extractor file mentioned in seciton "Installation" (you should now have to additional jar files in the folder)
  5. Run build_and_run.bat

Components used

Releases

No releases published

Packages

No packages published