[Archivesspace_Users_Group] construct unique ref IDs
bmg17 at psu.edu
Fri Mar 14 10:15:26 EDT 2014
----- Original Message -----
From: "Chris Fitzpatrick" <Chris.Fitzpatrick at lyrasis.org>
To: "archivesspace users group" <archivesspace_users_group at lyralists.lyrasis.org>
Sent: Friday, March 14, 2014 5:40:05 AM
Subject: Re: [Archivesspace_Users_Group] construct unique ref IDs
Yes, the refid rules have been implemented as a plugin. The documentation is here :
So, to enable this, edit the config/config.rb file to load the plugin (about line 102) :
AppConfig[:plugins] = ['refid_rules', 'local']
Then, define the rule that you want to use in the config/config.rb.
AppConfig[:refid_rule] = "<%= repository['repo_code'] %>_<%= resource['formatted_id'] %>_<%= SecureRandom.hex %>"
This is using a templating languaged call ERB, so you can call variables with-in a <%= %> block. You can do something like:
AppConfig[:refid_rule] = "Bananas_<%= SecureRandom.hex %>"
Which would generate a RefID like "Bananas_" + a randomly generated hexadecimal.
Does this make sense?
Let me know if you have any questions...
Chris Fitzpatrick | chris.fitzpatrick at lyrasis.org
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Ben Goldman <bmg17 at psu.edu>
Sent: Thursday, March 13, 2014 5:04 PM
To: archivesspace users group
Subject: [Archivesspace_Users_Group] construct unique ref IDs
I see this made it into the newest release, https://www.pivotaltracker.com/s/projects/386247/stories/49569471, but after a cursory search of the staff interface, I am unclear how to actually go about using this feature. Any direction you can provide is appreciated.
Digital Records Archivist
Penn State University Libraries
University Park, PA
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Archivesspace_Users_Group