Updating metadata

587 views
Skip to first unread message

fhahn

unread,
Dec 27, 2013, 6:12:43 PM12/27/13
to resour...@googlegroups.com
I have quite a few pictures that have already been added to ResourceSpace. Most already had metadata added via exiftool outside of ResourceSpace.  Things like Caption, City, State.  The files that already had the metadata added was picked up when the files were added to ResourceSpace just fine

I have several hundred files that I have added metadata to after they had been added to ResourceSpace but I can't get ResourceSpace to update this data. I have all of my files in a folder and run staticsync.php daily on this folder.

I have tried running the following scripts:

staticupdateexif.php
update_exiftool_field.php
reindex_field.php

The commands seem to run and complete but the metadata is not pulled from the pictures.

Here are the staticsync settings:

$syncdir="/var/www/home/photos"; # The sync folder
$nogo="[data][thumbnails][video][unsorted][online][negative_scans][photo_scans]"; # A list of folders to ignore within
 the sign folder.
$staticsync_autotheme=false; # Automatically create themes based on the first and second levels of the sync folder str
ucture.
# Allow unlimited theme levels to be created based on the folder structure.
# Script will output a new $theme_category_levels number which must then be updated in config.php
$staticsync_folder_structure=false;
# Mapping extensions to resource types for sync'd files
# Format: staticsync_extension_mapping[resource_type]=array("extension 1","extension 2");
$staticsync_extension_mapping_default=1;
$staticsync_extension_mapping[3]=array("mov","3gp","avi","mpg","mp4","flv"); # Video
$staticsync_extension_mapping[4]=array("flv");
# Uncomment and set the next line to specify a category tree field to use to store the retieved path information for e
ach file. The tree structure will be automatically modified as necessary to match the folder strucutre within the sync
 folder.
# $staticsync_mapped_category_tree=50;
# Should the generated resource title include the sync folder path?
$staticsync_title_includes_path=false;
# Should the sync'd resource files be 'ingested' i.e. moved into ResourceSpace's own filestore structure?
# In this scenario, the sync'd folder merely acts as an upload mechanism. If path to metadata mapping is used then thi
s allows metadata to be extracted based on the file's location.
$staticsync_ingest=false;
#
# StaticSync Path to metadata mapping
# ------------------------
# It is possible to take path information and map selected parts of the path to metadata fields.
# For example, if you added a mapping for '/projects/' and specified that the second level should be 'extracted' means
 that 'ABC' would be extracted as metadata into the specified field if you added a file to '/projects/ABC/'
# Hence meaningful metadata can be specified by placing the resource files at suitable positions within the static
# folder heirarchy.
# Use the line below as an example. Repeat this for every mapping you wish to set up
#       $staticsync_mapfolders[]=array
#               (
#               "match"=>"/projects/",
#               "field"=>10,
#               "level"=>2
#               );
#
# You can also now enter "access" in "field" to set the access level for the resource. The value must match the name o
f the access level
# in the default local language. Note that custom access levels are not supported. For example, the mapping below woul
d set anything in
# the projects/restricted folder to have a "Restricted" access level.
#       $staticsync_mapfolders[]=array
#               (
#               "match"=>"/projects/restricted",
#               "field"=>"access",
#               "level"=>2
#               );
#
# Suffix to use for alternative files folder
# If staticsync finds a folder in the same directory as a file with the same name as a file but with this suffix appen
ded,then files in the folder will be treated as alternative files for the give file.
# For example a folder/file structure might look like:
# /staticsync_folder/myfile.jpg
# /staticsync_folder/myfile.jpg_alternatives/alternative1.jpg
# /staticsync_folder/myfile.jpg_alternatives/alternative2.jpg
# /staticsync_folder/myfile.jpg_alternatives/alternative3.jpg
# NOTE: Alternative file processing only works when $staticsync_ingest is set to 'true'.
$staticsync_alternatives_suffix="_alternatives";

# if false, the system will always synthesize a title from the filename and path, even
# if an embedded title is found in the file. If true, the embedded title will be used.
$staticsync_prefer_embedded_title = true;

End of StaticSync settings

I am running version 6.0.

Thanks.

Frank Hahn

fhahn

unread,
Dec 28, 2013, 8:43:53 AM12/28/13
to resour...@googlegroups.com
Here is some additional information:

ResourceSpace version                        6.0.5120
ResourceSpace Build                            5120
Server platform                                       Apache/2.2.22 (Ubuntu)
PHP version                                            5.3.10-1ubuntu3.9
ExifTool version                                       8.60
FFmpeg version                                       ffmpeg 0.8.9-4:0.8.9-0ubuntu0.12.04.1
ImageMagick/GraphicsMagick version    Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Browser user-agent    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0

Tom Gleason

unread,
Dec 30, 2013, 6:28:51 PM12/30/13
to ResourceSpace
You have changed metadata in the original files or in ResourceSpace?
Metadata applied in ResourceSpace is only applied to the files on download.
If you modified the files directly and expect ResourceSpace to pull
data from them, then you may be facing issues with exiftool mappings,
which you would need to customize in System Setup.
http://wiki.resourcespace.org/index.php/Metadata_Read/Write_Mapping
> --
> ResourceSpace: Open Source Digital Asset Management
> http://www.resourcespace.org
> ---
> You received this message because you are subscribed to the Google Groups
> "ResourceSpace" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to resourcespac...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Tom Gleason

Colorhythm LLC
http://www.colorhythm.com

Main Office: +1 415-399-9921
Fax: +1 253-399-9928
Mobile: +1 347-537-8465

tgle...@colorhythm.com

fhahn

unread,
Dec 31, 2013, 12:16:36 PM12/31/13
to resour...@googlegroups.com, tgle...@colorhythm.com
Tom:

The data was updated in the jpg files themselves. I use exiftool from the command line to add Caption, City, and Province-State to groups of files. When I first started using staticsync.php, many of my files had the above metadata already added but some did not. I went back and added this data to these files. It is these files that I have recently added the metadata too that is not getting picked up. All of these files had previously been pulled into ResourceSpace via staticsync.php.

I had initially created the mappings for City and Province-State under Photo in Resource Types/Fields. City is assigned Field ID 73 and Province-State is assigned Field ID 74. Caption was already in the Global Field.

Running staticsync.php, I can watch the script go through all of the directories. Even though the files have been modified, the script does not pick anything up. That may be the expected result.

Running staticupdateexif.php within a browser window will eventually complete but the metadata from above does not seem to get picked up from the modified files.

I'm sure it is something simple but right now, it is eluding me.

--
Thanks,

Frank Hahn


On Monday, December 30, 2013 5:28:51 PM UTC-6, Tom Gleason wrote:
You have changed metadata in the original files or in ResourceSpace?
Metadata applied in ResourceSpace is only applied to the files on download.
If you modified the files directly and expect ResourceSpace to pull
data from them, then you may be facing issues with exiftool mappings,
which you would need to customize in System Setup.
http://wiki.resourcespace.org/index.php/Metadata_Read/Write_Mapping
 
--

fhahn

unread,
Dec 31, 2013, 4:51:10 PM12/31/13
to resour...@googlegroups.com, tgle...@colorhythm.com

fhahn

unread,
Dec 31, 2013, 5:02:58 PM12/31/13
to resour...@googlegroups.com, tgle...@colorhythm.com
If I look at a picture that has had the metadata added later after the file was pulled into ResourceSpace, I see these Resource Details:

Resource ID  Access   Date                      Camera make / model
25681            Open      25 December 80   Olympus 35RC

If I go to the Metadata Report, I see the City, Province-State, etc. Here is a partial listing of the Metadata Report (the formatting is all messed up):

Metadata report
Resource type: Photo
Existing Exiftool tags
ResourceSpace    Group    Exiftool tag    Embedded value    Metadata which will be written
    file    filesize     661 kB   
    file    filemodifydate (w)    1980:12:25 00:00:00-06:00    + [Date of download]
    file    fileaccessdate     - 2013:12:31 15:43:47-06:00    + 2013:12:31 15:58:46-06:00
    file    fileinodechangedate     - 2013:12:27 21:51:54-06:00    + 2013:12:31 15:58:47-06:00
    file    filetype     JPEG   
    file    mimetype     image/jpeg   
    file    exifbyteorder (w)    Big-endian (Motorola, MM)   
    file    currentiptcdigest     - 4ac618d14bc0e2463b25a0743d9d55d4    +
    file    imagewidth (w)    1482   
    file    imageheight (w)    2245   
    file    encodingprocess     Baseline DCT, Huffman coding   
    file    bitspersample (w)    8   
    file    colorcomponents     3   
    file    ycbcrsubsampling (w)    YCbCr4:2:0 (2 2)   
    jfif    jfifversion     1.01   
18 - Caption    exif    imagedescription (w)    - Jean Carlson    +
    exif    make (w)    Olympus   
52 - Camera make / model    exif    model (w)    Olympus 35RC   
    exif    xresolution (w)    1600   
    exif    yresolution (w)    1600   
    exif    resolutionunit (w)    inches   
    exif    ycbcrpositioning (w)    Centered   
    exif    exifversion (w)    0230   
12 - Date    exif    datetimeoriginal (w)    1980:12:25 00:00:00   
    exif    componentsconfiguration (w)    Y, Cb, Cr, -   
    exif    flashpixversion (w)    0100   
    exif    colorspace (w)    Uncalibrated   
73 - City    iptc    city (w)    - Muscatine    +
74 - Province-State    iptc    province-state (w)    - Iowa    +

So it looks like ResourceSpace has read the data, it just is not displaying with the picture when I view it, etc.

Hope this makes sense.

Frank Hahn

fhahn

unread,
Dec 31, 2013, 9:56:55 PM12/31/13
to resour...@googlegroups.com, tgle...@colorhythm.com
When looking at the Metadata report, I notice that for a picture where the City and Province-State do not display, there is a - (minus sign) in front of the text. See this partial Metadata report:


73 - City    iptc    city (w)    - Muscatine    +
74 - Province-State    iptc    province-state (w)    - Iowa    +

For a picture where this data displays, there is nothing in front of the City or State name.

Is that relevant?

--
Thanks.

Frank Hahn

Tom Gleason

unread,
Dec 31, 2013, 10:47:10 PM12/31/13
to ResourceSpace
The 'Muscatine' is the information from the file, and it has a minus
sign before it because compared to what is in ResourceSpace, it was
removed. The plus sign means that ResourceSpace instead has a blank
value for the field. If you changed the city manually in
ResourceSpace, you'd see your value after the plus.
> --
> ResourceSpace: Open Source Digital Asset Management
> http://www.resourcespace.org
> ---
> You received this message because you are subscribed to the Google Groups
> "ResourceSpace" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to resourcespac...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages