Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for SITES_CSV argument to crawl make target. #45

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include .env
export $(shell sed 's/=.*//' .env)
SITES_CSV=sample-sites.csv
export SITES_CSV

up:
docker-compose pull
Expand All @@ -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}'
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down