pbinkley / twarc-report

Data conversions and examples for generating reports from twarc collections using tools such as D3.js
Creative Commons Zero v1.0 Universal
55 stars 6 forks source link

Project metadata #4

Closed pbinkley closed 9 years ago

pbinkley commented 9 years ago

As a follower of an event that is being live-tweeted, I want to have a project directory where I will update a harvest periodically with a cronjob using twarc/utils/archive.py, with project metadata such as the twarc query, project title and creator, etc., all stored in a json file, so that the same cron job can generate twarc-report outputs that include the project metadata for clarity.

I'm thinking of json like this:

{"twarcquery": "#code4lib OR #c4l15 OR #code4arc", 
"title": "Code4lib Conference, Portland OR, 10-12 Feb. 2015",
"creator": "Peter Binkley"}

And have a module that loads it with:

with open("metadata.json") as json_data:
    project_metadata = json.load(json_data)
    json_data.close()
title = project_metadata["title"]    

And finally, use this in a script that embeds archive.py and runs the updates and the twarc-report outputs.