Bookworm-project / BookwormDB

Tools for text tokenization and encoding
MIT License
84 stars 12 forks source link

Allow catalog data to be a TSV #79

Open bmschmidt opened 9 years ago

bmschmidt commented 9 years ago

When supplementing metadata, it is possible to load information in as a TSV file. Although it's not possible to specify a one-to-many relationship, this covers a significant percentage of use cases and is much easier to create.

There's no reason this couldn't be allowed for the default creation as well. Just as with the supplementing functions, it wouldn't even necessarily require a field_description.json file--that can just be guessed at, particularly when the time field includes the string "date" or "year."

In practice, this might involve a new line in the Makefile that looks for something called "catalog.txt" in the places one might currently put "jsoncatalog.txt," and then uses the existing code in OneClick.py::supplementMetadataFromTSV to dispatch creation of a new jsoncatalog.txt for the full ingest.

When accomplished, it might actually be possible to create a bookworm without coding anything, which is currently basically impossible, since no one hand-writes JSON.