[Archivesspace_Users_Group] construct unique ref IDs
Ben Goldman
bmg17 at psu.edu
Fri Mar 14 10:15:26 EDT 2014
Thanks!
----- 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
Hi Ben,
Yes, the refid rules have been implemented as a plugin. The documentation is here :
https://github.com/archivesspace/archivesspace/tree/master/plugins/refid_rules
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.
For example:
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...
best, chris.
Chris Fitzpatrick | chris.fitzpatrick at lyrasis.org
Developer, ArchivesSpace
http://archivesspace.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
Hello,
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.
Thanks,
Ben
Ben Goldman
Digital Records Archivist
Penn State University Libraries
University Park, PA
814-863-8333
http://www.libraries.psu.edu/psul/speccolls.html
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140314/6611c2b2/attachment.html>
More information about the Archivesspace_Users_Group
mailing list