(contributing)=
The GitHub repository for this project is simonw/shot-scraper.
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd shot-scraper
python -m venv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and test dependencies:
pip install -e '.[test]'
Then you'll need to install the Playwright browsers too:
shot-scraper install
To run the tests:
pytest
Some of the tests exercise the CLI utility directly. Run those like so:
tests/run_examples.sh
Documentation for this project uses MyST - it is written in Markdown and rendered using Sphinx.
To build the documentation locally, run the following:
cd docs
pip install -r requirements.txt
make livehtml
This will start a live preview server, using sphinx-autobuild.
The CLI --help
examples in the documentation are managed using Cog. Update those files like this:
cog -r docs/*.md
After pushing a release, I use the following to create a screenshot of the release notes to use in social media posts:
shot-scraper https://github.com/simonw/shot-scraper/releases/tag/0.15 \
--selector '.Box-body' --width 700 \
--retina