This question is answered.


Permlink Replies: 20 - Pages: 2 [ 1 2 | Next ] - Last Post: 12-Nov-2015 00:11 Last Post By: RobM
boonenf

Posts: 9
Registered: 20-Apr-2010
export list of Title and Location
Posted: 08-Oct-2015 14:23
 
  Click to reply to this thread Reply
Hi,

I'm looking for a query or a external tool where I can make an overview of the title of all Images and their Location, to put it in an Excel file.
jGromit

Posts: 7,469
Registered: 31-Jan-2006
Re: export list of Title and Location
Posted: 08-Oct-2015 14:27   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
(Thread moved - this is a question about tool development, not about the Turtle skin.)
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: export list of Title and Location
Posted: 08-Oct-2015 16:16   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
If you are using Turtle then you could try to modify the 'Site Map' template. Basically strip out all unwanted items leaving just the information you want. I'm not sure what you mean by 'their location', do you mean within the album or the actual latitude/longitude of the location.

Do you need help in editing the template?
boonenf

Posts: 9
Registered: 20-Apr-2010
Re: export list of Title and Location
Posted: 08-Oct-2015 17:22   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
their location = lat/lon

the 'site map' template? Don't know where I can find it.

Edited by: boonenf on 08-Oct-2015 17:26
jGromit

Posts: 7,469
Registered: 31-Jan-2006
Re: export list of Title and Location
Posted: 08-Oct-2015 17:26   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
And what do you mean by "title?" Do you want to retrieve only file titles that you have entered in jAlbum, or titles that might be present in some of the file metadata (like IPTC stuff)? And if no title has been entered, do you want to retrieve the raw file name?
boonenf

Posts: 9
Registered: 20-Apr-2010
Re: export list of Title and Location
Posted: 08-Oct-2015 17:31   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I put a screen shot in attachement.
The excel sheet should contain two headers: Title, Location
and all the content gathered from all the individual images.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: export list of Title and Location
Posted: 08-Oct-2015 19:08   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
boonenf wrote:
the 'site map' template? Don't know where I can find it.
When looking at thumbnails within jAlbum use the third icon, 'new page', from the left in the toolbar (Add, New folder, New page). From the drop down menu select the Site Map, the same method you used to add About and Contact pages.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: export list of Title and Location
Posted: 09-Oct-2015 00:57   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
Attachment project_export.htt (914 bytes)
Attachment skin_export.htt (650 bytes)
Attachment tool_export.bsh (1.0 KB)
I have modified a site map template of my own, it can be used as an external tool or as a skin template. As an external tool you have to manually use it after each build of your album. As a template it either needs to have the output file renamed, from .html to .csv, or you need to modify the skin.

I have attached three files, one for each option.
tool_export.bsh, rename it as required and place it in the external tools folder (Menu/Tools/Open directories/Config directory then select the tools folder). You can rename the created file by editing the tool, see this code
File f = new File(rootOutputDirectory + "GPS.csv");
if (!f.exists()) IO.writeTextFile("\"Title\",\"Location\"", new File(rootOutputDirectory.getAbsolutePath(), "GPS.csv"));
Change the file name 'GPS.csv' in both lines above. One caveat, I have noticed that sometimes the tool does not process images at the root level but I don't know why. If all images are in subfolders it should work ok though.

skin_export.htt, make a local copy of Turtle skin (Select Turtle skin then Menu/Tools/Open directories/Skin directory and copy the folder to the skin's folder). Rename the file as required and then open the file 'finally.sh' in a text editor. Add this code
File template = new File(skinDirectory, "skin_export.htt");
if( template.exists() ) {
	File dest = new File(rootOutputDirectory, "/export.csv");
	engine.processTemplateFile(template, dest);
}
Change the 'skin_export.htt' to water you renamed the file, change 'export.cv' to rename the created file. Open your project and change the skin to your Turtle skin and rebuild.

project_export.htt, rename the file as required and add it to the root of your project, rebuild and a new file called, for example, project_export.html will be created. Manually rename it to .csv if required. It probably is possible to have the file renamed automatically but I have not tried to do it myself.

Hopefully one method will suit you.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: export list of Title and Location
Posted: 09-Oct-2015 01:11   in response to: RobM in response to: RobM
Correct
  Click to reply to this thread Reply
In the code I posted I could only get the GPS location using the variable 'location', not gpsLocation as expected. I don't have any images with real GPS location information embedded, I manually entered some coords using the 'location' field in Turtle and the code I posted is returning those figures. If your images have embedded GPS data and they are not returned try changing the line
location = vars.get("location");
to
location = vars.get("gpsLocation");
in whichever template you use (unless you already have a solution).
boonenf

Posts: 9
Registered: 20-Apr-2010
Re: export list of Title and Location
Posted: 12-Oct-2015 15:20   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Wauw!! Thank you very very much!!
It works like a charm.
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: export list of Title and Location
Posted: 12-Oct-2015 15:29   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
Good, I'm curious which version you went for and did you have to change to gpsLocation?
boonenf

Posts: 9
Registered: 20-Apr-2010
Re: export list of Title and Location
Posted: 12-Oct-2015 16:18   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I tried the first and the result was what I wanted, right away, so, I didn't try the other two :-)
"Location" is the good syntax.

I added some variables of my own and a few of jAlbum, all works perfectly, only, I can't find the correct variable for the Categories.
As you can see here, all the images are placed in a category.
I tried variables 'folderTitle' and 'fileCategory' but the results in the CSV file are both 'NULL'

http://proba-v.vgt.vito.be/content/proba-v-gallery
boonenf

Posts: 9
Registered: 20-Apr-2010
Re: export list of Title and Location
Posted: 12-Oct-2015 16:46   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
Oeps, my mistake, I use tool_export.bsh
RobM

Posts: 3,104
Registered: 4-Aug-2006
Re: export list of Title and Location
Posted: 12-Oct-2015 17:05   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
The category types supported by jAlbum are folder, file, image, video, other. By category do you really mean each folder of images? Do you really want the cvs file created for each folder of images or as it is now, for all images in the project?
jimberry

Posts: 502
Registered: 30-Aug-2004
Re: export list of Title and Location
Posted: 12-Oct-2015 17:09   in response to: boonenf in response to: boonenf
 
  Click to reply to this thread Reply
boonenf wrote:
I added some variables of my own and a few of jAlbum, all works perfectly, only, I can't find the correct variable for the Categories.
The jAlbum variable for the IPTC category field is "category".
See this wiki page under File metadata for other metadata variables.
Legend
Forum admins
Helpful Answer
Correct Answer

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