Batch upload including field data?

219 views
Skip to first unread message

p...@accesswave.ca

unread,
Apr 17, 2013, 4:57:46 PM4/17/13
to resour...@googlegroups.com
I have around 1000 photos which I would like to import into RS. Data about each photo are in a database - location, caption, credit etc - and so I will have to write some code to get at these data if I'm going to automatically upload the photos to RS. Writing the code (in Perl) is straightforward, but is there an interface which will allow me to both upload the file and simultaneously (or perhaps later) populate the fields associated with each photo? The api_upload plugin doesn't appear to be able to handle field data.I suppose that an alternative would be to update each photo's Exif data with the stuff from the database, but that seems pretty extreme.

Peter Payzant

unread,
Apr 18, 2013, 12:20:05 PM4/18/13
to resour...@googlegroups.com
Maybe I'm asking the wrong question here. What is the usual way that people populate a new RS site with pre-existing resources?

Peter

Jeff Harmon

unread,
Apr 18, 2013, 12:26:19 PM4/18/13
to resour...@googlegroups.com, resour...@googlegroups.com
How much of the data is embedded in the files?  You might just ingest them normally...

There are some powerful scripts in the tools directory to check out. But migration is rarely a one-size-fits-all challenge. 

Jeff

--
Jeff Harmon
Chief Executive Officer
Colorhythm LLC

Main Office:  +1 415-399-9921
Mobile:  +1 510-710-9590

--
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

unread,
Apr 18, 2013, 12:32:21 PM4/18/13
to ResourceSpace
In a situation like this, it's not uncommon to write a custom script
to import the data, grabbing data from another database or spreadsheet
and using functions like update_field() in ResourceSpace. One way to
do it would be to upload all of your files and then create a script
which loops through a CSV data file, matching data to the Resource by
filename and then applying associated metadata. Scripts in pages/tools
provide some basic examples about how custom RS scripts are built.
> --
> 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

Peter Payzant

unread,
Apr 18, 2013, 3:11:41 PM4/18/13
to resour...@googlegroups.com, tgle...@colorhythm.com
Thanks! That's pretty much what I was looking for. Looks as if I will have to learn some PHP, but it's about time for that anyway.

Peter

Peter Payzant

unread,
May 10, 2013, 6:08:18 PM5/10/13
to resour...@googlegroups.com
Hello-

I wasn't able to find the answer to this in the wiki.

How can I control the columns which get displayed in a list of search
results? Specifically, I'd like more space for the Title column and if
possible delete the Country column. In general, it would be great to be
able to resize some other column widths as well.

I'm using SVN rev 4395.

Thanks

Peter

Allison Stec

unread,
May 14, 2013, 8:07:52 AM5/14/13
to ResourceSpace
There are two config options that should help you out.

The first lets you specify the fields you want shown in list view. Add or remove field ids here.
The second (i think) allows you to adjust the characters displayed in the title column.

The default settings are shown below...

# List Display Fields: array of fields to display on the list view
$list_display_fields=array(8,3,12);
$list_search_results_title_trim=25;




Peter

--
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 resourcespace+unsubscribe@googlegroups.com.

Peter Payzant

unread,
May 14, 2013, 8:56:52 AM5/14/13
to resour...@googlegroups.com
Hi, Allison-

That did it. Thanks very much!

Peter
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.



--
You received this message because you are subscribed to a topic in the Google Groups "ResourceSpace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/resourcespace/gVuCoY6cdkk/unsubscribe?hl=en-GB.
To unsubscribe from this group and all of its topics, send an email to resourcespac...@googlegroups.com.

Peter Payzant

unread,
May 16, 2013, 7:08:27 PM5/16/13
to resour...@googlegroups.com
I'm working on cataloguing some photos with only partial dates; for example just the year and month or just the year. Some even specify just a decade!

Back in September of 2011, in a Wiki posting, David Ehnebuske said "Support for reduced-precision dates is in revision 2909", but there is no further information and it's not obvious to me how to make use of this feature. I can load the date field using a PHP script from data in a CSV file, but I'm not sure what I should be putting in there. For example, if I only have the year, what should I set the month and day to?

Regards to all...

Peter Payzant

David Ehnebuske

unread,
May 17, 2013, 9:50:33 AM5/17/13
to resour...@googlegroups.com
Peter,

To enter a date/time with reduced precision, just omit the higher precision parts. For example if all you know is the year, include only the year. If you know the month, include it, too, but omit the day of the month and the time. You can give it a try by editing a resource through the edit page and setting the default Date field. For example, to set the Date field to September 1950 with no day-of-month and no time, put "1950" in the year field, choose "September" from the month pull-down, set the Day pull-down to "Day", the hour pull-down to "HH", and the minute pull-down to "MM". (These are the values they will have if no Date is currently set.) The database format is per ISO 8601 -- just drop off the higher precision component of the date/time.

The implementation and its behavior is discussed in more detail in my post of September 6, 2011 in the same thread that you quoted.

Hope this helps,

David

Peter Payzant

unread,
May 17, 2013, 2:29:46 PM5/17/13
to resour...@googlegroups.com
Thanks, David- very helpful!

Peter
> --
> 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.
Reply all
Reply to author
Forward
0 new messages