Skip to content

Commit

Permalink
run-all: populate all new directors from .csv
Browse files Browse the repository at this point in the history
  • Loading branch information
booxter committed Dec 5, 2024
1 parent 211a1cd commit d1400f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
IMAGE_NAME?=letsrolld
DB=$(PWD)/movie.db
DIRECTORS_NUMBER?=10
DIRECTORS_FILE?=directors.csv
RUN_LOG?=run.log
RUN_LOG_CMD?=ts | tee -a $(RUN_LOG)
Expand All @@ -16,14 +15,17 @@ lint: install swagger
test: lint
pdm run pytest

# One can use e.g. https://letterboxd.com/hershwin/list/all-the-movies/ as the base list
get-directors:
pdm run get-directors -i ./data/lists/everything.csv -o ${DIRECTORS_FILE} | $(RUN_LOG_CMD)

populate-directors:
pdm run populate-directors -d ${DIRECTORS_FILE} -n ${DIRECTORS_NUMBER}
pdm run populate-directors -d ${DIRECTORS_FILE}

# TODO: add dump-directors to run-all?
dump-directors:
pdm run dump-directors -o ${DIRECTORS_FILE}.new | $(RUN_LOG_CMD)
mv ${DIRECTORS_FILE}.new ${DIRECTORS_FILE}

run-update-directors:
pdm run update-directors $(ARGS) | $(RUN_LOG_CMD)
Expand All @@ -40,7 +42,7 @@ run-update-services:
run-cleanup:
pdm run cleanup $(ARGS) | $(RUN_LOG_CMD)

run-all: run-update-directors run-update-films run-update-offers run-update-services run-cleanup
run-all: populate-directors run-update-directors run-update-films run-update-offers run-update-services run-cleanup

run-db-upgrade:
pdm run alembic upgrade head
Expand Down

0 comments on commit d1400f7

Please sign in to comment.