/hathitables

HathiTrust Collections as CSVW

Primary LanguagePythonMIT LicenseMIT

Build Status

hathitables demonstrates how HathiTrust collections can be shared as Linked Data friendly CSV a.k.a. CSV on the Web.

More context for this work can be found at MITH's page for the HathiTrust Workset Creation for Scholarly Analysis project.

If you want to get CSV for a given HathiTrust collection you can use hathitables on the command line:

% hathitables.py 1761339300 > 1761339300.csv

And here's how to write the metadata where a CSVW client can find it:

% hathitables.py --metadata 1761339300 > 1761339300.csv-metadata.json

If you want you can also use hathitables programatically from Python:

import hathitables

collection = hathitables.Collection('1761339300')

collection.write_csv(open("1761339300.csv", "w"))
collection.write_metadata(open("1761339300.csv-metadata.json", "w"))