From cdbec313c73ff85cb5d023144233c0a1cdaaacfe Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 8 Jan 2025 14:23:47 +0000 Subject: [PATCH] Provide a make target for importing a specific article https://github.com/elifesciences/issues/issues/9034 --- Makefile | 5 ++++- README.md | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f98e1d30..15176c0b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -.PHONY: dev test +.PHONY: dev test import-article dev: docker compose up test: docker compose run --rm app ./project_tests.sh + +import-article: + docker compose run app ./bin/import $(ARTICLE_ID) diff --git a/README.md b/README.md index 5c1e55fa..a942ed72 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,12 @@ This contains a dummy implementation of the [eLife 2.0 API](https://github.com/e ## Import article +For example to import the article with ID 85111: ```$sh -docker compose run app ./bin/import 09560 +make import-article ARTICLE_ID=85111 ``` -The above command should result in a data fixture for article 09560 being created at `data/articles/09560.json` +The above command should result in a data fixture for article 85111 being created at `data/articles/85111.json` ## Run locally