The script ws_scrape_once.py
can be run in various environment. You can also use a Docker image, but the image probably brings more benefits for development than for production.
- Copy src/settings.py.example to src/settings.py.
- Adjust paths in settings.py if needed.
-
Configure the downloader (see above).
-
Adjusting the docker-compose.yml file if needed.
-
Rust run the following command:
docker-compose up --build
-
Configure the downloader (see above).
-
Install Python 3 (tested with 3.8)
-
Install all the requirements:
pip install -r src/requirements.txt
In some cases, pip uses Python 2. In such case, you might succeed by using pip3 instead:
pip3 install -r src/requirements.txt
Just run this:
python src/ws_scrape_once.py
In some cases, this runs Python 2, which is outdated. In such case, you might want to use python3 instead:
python3 src/ws_scrape_once.py
If you are on Linux, you might want to just call is as a script, as it has the correct hashbang:
src/ws_scrape_once.py
If you are on Windows and have the correct association of *.py to Python 3 interpreter, you can run it this way:
src\ws_scrape_once.py
The script uses SQLite3 by default. However, if you want to use some other database, it will most likely work as long as it is supported by Alembic.
In many cases, the script rather logs an exception and continues. The rationale behind this is: When there is some unprocessable map pack, it should not block others from being processed. If you don't want the script to behave this way, you can add --throw-exceptions
. This causes the script to end and not mark the map file as processed.