python3 -m venv venv
source venv/bin/activate
git clone https://github.com/uchicago-library/mapping_chicagoland.git
cd mapping_chicagoland
pip install -r requirements.txt
You'll need to add a config.py to the main project directory- it should go next to app.py. You can get this from another developer, or start with the following template:
BASE = 'https://ark.lib.uchicago.edu/ark:61001/'
COLLECTION_TITLE = 'Mapping Chicagoland'
DB = 'mapping_chicagoland.db'
TRIPLES = 'mapping_chicagoland.ttl'
ALLMAPS_URL_DATA = 'allmaps_data.json'
Another developer should be able to get you access to pre-built versions of all of the files listed above.
This site uses a build process that takes linked data triples (a .ttl file) and imports them into an SQLite database for faster browsing and full-text search. I have added a few subcommands to the flask command to help manage the site.
See all commands:
flask
Build the SQLite database from linked data triples:
flask build-database
Build a JSON lookup of AllMaps data (basically prec-caching these requests):
flask build-allmaps-url-lookup <noid-list>
View lists of browses:
flask get-browse subjects
flask get-browse decades
View an individual browse term:
flask get-browse decades 1940s
View data for an individual item:
flask get-item https://ark.lib.uchicago.edu/ark:61001/b2wr9j53qw3r