From 0fd4e550ce8938f8e5588dfc02d7b40049e9dba6 Mon Sep 17 00:00:00 2001 From: Iain Potter Date: Tue, 9 Feb 2021 11:50:33 +0000 Subject: [PATCH] Adds support for SITES_CSV argument to crawl make target. --- Makefile | 5 ++++- README.md | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5413adc..dca929d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ include .env export $(shell sed 's/=.*//' .env) +SITES_CSV=sample-sites.csv +export SITES_CSV up: docker-compose pull @@ -22,4 +24,5 @@ in: up docker exec -it ${PROJECT_NAME}_app bash crawl: build - docker exec -t ${PROJECT_NAME}_app bash -c 'php bin/visual_regression_bot.php -v bot:crawl-sites sample-sites.csv' + echo "Crawling with ${SITES_CSV}" + docker exec -t ${PROJECT_NAME}_app bash -c 'php bin/visual_regression_bot.php -v bot:crawl-sites ${SITES_CSV}' diff --git a/README.md b/README.md index 3cb56f6..5a1a392 100644 --- a/README.md +++ b/README.md @@ -98,10 +98,16 @@ dependencies. `make build` ### Crawling -This command will use sample-sites.csv as source of urls to Crawl. You can change this file or alternativelly go inside the container and run the crawl command manually. +This command will use sample-sites.csv as source of urls to Crawl by default. `make crawl` +To run the command with a different file, use the syntax + +`make crawl SITES_CSV=path_to_sites_csv` + +Keep in mind that the crawl runs within the container, so `path_to_sites_csv` needs to be relative to the container. + ### Web interface Opens the tool on the browser.