summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-10-19 19:08:04 -0700
committerBryan Newbold <bnewbold@archive.org>2020-10-19 19:08:04 -0700
commitf798d4b050ed9831eacf48ceb586d7925ea2891e (patch)
treeaa26ce776582bd89c3ac868f08c674f805d9ba92 /Makefile
parent60ab08d42db2ba1fb066a4e0f7845bb99014ffe0 (diff)
downloadfatcat-scholar-f798d4b050ed9831eacf48ceb586d7925ea2891e.tar.gz
fatcat-scholar-f798d4b050ed9831eacf48ceb586d7925ea2891e.zip
update Makefile issue-db targets
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index f490630..7733f5c 100644
--- a/Makefile
+++ b/Makefile
@@ -65,28 +65,28 @@ update-i18n: ## Re-extract and compile translation files
pipenv run pybabel compile -d fatcat_scholar/translations
data/$(TODAY)/sim_collections.tsv:
- mkdir -p $@
- ia search "collection:periodicals collection:sim_microfilm mediatype:collection" --itemlist | rg "^pub_" > $@.wip
+ mkdir -p data/$(TODAY)
+ pipenv run ia search "collection:periodicals collection:sim_microfilm mediatype:collection" --itemlist | rg "^pub_" > $@.wip
mv $@.wip $@
data/$(TODAY)/sim_items.tsv:
- mkdir -p $@
- ia search "collection:periodicals collection:sim_microfilm mediatype:texts" --itemlist | rg "^sim_" > $@.wip
+ mkdir -p data/$(TODAY)
+ pipenv run ia search "collection:periodicals collection:sim_microfilm mediatype:texts" --itemlist | rg "^sim_" > $@.wip
mv $@.wip $@
data/$(TODAY)/sim_collections.json: data/$(TODAY)/sim_collections.tsv
- cat data/$(TODAY)/sim_collections.tsv | parallel -j4 ia metadata {} | jq . -c | pv -l > $@.wip
+ cat data/$(TODAY)/sim_collections.tsv | pipenv run parallel -j4 ia metadata {} | jq . -c | pv -l > $@.wip
mv $@.wip $@
data/$(TODAY)/sim_items.json: data/$(TODAY)/sim_items.tsv
- cat data/$(TODAY)/sim_items.tsv | parallel -j8 ia metadata {} | jq . -c | pv -l > $@.wip
+ cat data/$(TODAY)/sim_items.tsv | pipenv run parallel -j8 ia metadata {} | jq -c 'del(.histograms, .rotations)' | pv -l > $@.wip
mv $@.wip $@
data/$(TODAY)/issue_db.sqlite: data/$(TODAY)/sim_collections.json data/$(TODAY)/sim_items.json
pipenv run python -m fatcat_scholar.issue_db --db-file $@.wip init_db
- cat data/sim_collections.json | pv -l | pipenv run python -m fatcat_scholar.issue_db --db-file $@.wip load_pub
- cat data/sim_items.json | pv -l | python -m fatcat_scholar.issue_db load_issues
- python -m fatcat_scholar.issue_db load_counts
+ cat data/$(TODAY)/sim_collections.json | pv -l | pipenv run python -m fatcat_scholar.issue_db --db-file $@.wip load_pubs -
+ cat data/$(TODAY)/sim_items.json | pv -l | pipenv run python -m fatcat_scholar.issue_db --db-file $@.wip load_issues -
+ pipenv run python -m fatcat_scholar.issue_db --db-file $@.wip load_counts
mv $@.wip $@
data/issue_db.sqlite: data/$(TODAY)/issue_db.sqlite