alexduryee / timewalk Goto Github PK
View Code? Open in Web Editor NEWAutomated date parsing plugin for ArchivesSpace
Automated date parsing plugin for ArchivesSpace
I was taking ArchivesSpace v3.0 for a spin and was unable to save anything with a date subrecord. Found the following in the logs:
undefined method `related_agents_rlshp_id' for #<ASDate:0x523e9403>: /usr/local/archivesspace/plugins/timewalk/backend/model/ASDate.rb:34
ArchivesSpace v3.0 replaces standard date subrecords on agents with "structured dates" and drops agent-related FKs from the date table: https://github.com/archivesspace/archivesspace/blob/master/common/db/migrations/143_migrate_agent_date_data_to_structured_dates.rb#L58
I ran a quick test again after getting rid of the agent-related FKs from the associated_fields array and everything seemed to be working again: https://github.com/alexduryee/timewalk/blob/master/backend/model/ASDate.rb#L17-L25
Not sure how you'd like to handle version-specific differences like this, but just wanted to give a heads up.
Currently, timewalk will attempt to figure out if a date is a single or range date, and set the date type to single or inclusive correspondingly. However, local practice oftentimes disregards single as a date type in lieu of making all non-bulk dates inclusive.
Single/inclusive should be a config option, since there's no real way to tell beforehand what local practice will be. In addition, a default should be set, but I don't know what that should be right now.
Since Timetwister supports multiple dates pretty much seamlessly, it should be possible to support them in Timewalk.
Proposed method: take the array we're already getting back from timetwister, process the first one pretty much as done, and then process the subsequent ones, creating new dates with fixed values (resource_id, etc) taken from self, and variant values taken from the timetwister parse results.
This plugin defaults to “other” for the dates label – is it possible to change the default to “creation” or anything else?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.