(For the sake of brevity, not all classes and metadata fields appear in the console examples.)
There should be 6 classes:
- NewspaperTitle (PCDM Object)
- NewspaperContainer (PCDM Object)
- NewspaperIssue (PCDM Object)
- NewspaperPage (PCDM FileSet)
For each of these JSON word-coordinate file formats of the same OCR word-coordinate data, representing a single newspaper page:
I ran a test in the Rails console, benchmarking the time needed to:
| .range_limit { | |
| .form-control { | |
| &.range_begin, | |
| &.range_end { | |
| width: 60px; | |
| } | |
| } | |
| } |
| # create a static OAI XML file with all records | |
| # @param sets [Array] collection ids, e.g. ['c1ee8010-fb87-40d6-ac23-be547344c4f2', '2000d071-a976-4536-b173-8772a11c3588', ...] | |
| # @param units_to_ignore [Array] ids of objects to ignore | |
| # @param file_path [String] location where static XML file should be written | |
| # @param credentials [Hash] Preservica REST API credentials: {un: 'foo', pw: 'bar'} | |
| def generate_static_oai_xml(sets, units_to_ignore, file_path, credentials) | |
| @oai_doc = initialize_oai_xml | |
| @units_to_ignore = units_to_ignore | |
| @preservica_rest_api_base = 'https://us.preservica.com/api/entity' |
The goal of this project is to update the major dependencies for an existing Rails application currently in production.
This application is a digital library interface that provides access to historical maps from the Norman B. Leventhal Map & Education Center at the Boston Public Library. The application allows users to search the collection, view image content, download high-resolution files, sign up for an account, and create lists of favorite items, as well as other features.
URL: https://collections.leventhalmap.org/
Code: https://github.com/boston-library/bpl-mapportal/tree/develop/src/portal (private repo)
A list of important metadata fields for metadata records in the Digital Commonwealth repository.
See SolrDocument field reference: public API for a full list of available fields.
See the Digital Commonwealth API Guide for information on how to access metadata records.
Field names ending in "m" are multivalued.
| # run like so: ndnp_datefix('sn83020531/1414039/1801012101', '1801-01-22', '/absolute/path/to/batch_mb_23_01_0041') | |
| def ndnp_datefix(bad_date_path, good_date, batch_home_path) | |
| path_to_bad_issue = "#{batch_home_path}/#{bad_date_path}" | |
| bad_date_raw = bad_date_path.split('/').last[0..7] | |
| bad_date_w3c = [bad_date_raw[0..3], bad_date_raw[4..5], bad_date_raw[6..7]].join('-') | |
| path_to_bad_issue_xml = "#{path_to_bad_issue}/#{bad_date_path.split('/').last}" | |
| path_to_good_issue_xml = "#{path_to_bad_issue}/#{good_date.gsub('-', '')}#{bad_date_path.split('/').last[-2..-1]}" | |
| # have to run string replacement separately for each file type, using *.{pdf,jp2,xml} not working |