BattlemapSearcher-Flask is a single page application designed to search for battlemaps.
The project is divided into two main parts:
-
Web Scraper: This part of the project is responsible for scraping Reddit according to specified subreddits. The main script for this part is
main.py
located in thewebscrapper
folder. -
Website: This part of the project is a search engine for the maps scraped by the web scraper. The main script for this part is
app.py
.
Both parts of the project require pipenv to run.
- Python 3.10 or higher
- Pipenv
The following environment variables are required to run the project:
IP
: IP of the database (MySQL by default, however change can be made in config)USERNAME
: Database account usernamePASSWORD
: Database account passwordSCHEMA_NAME
: Name of the database schema
-
Clone the repository:
git clone https://github.com/miki4920/BattlemapSearcher-Flask.git
-
Navigate to the project directory:
cd BattlemapSearcher-Flask
-
Install the project dependencies using pipenv:
pipenv install
-
Set the required environment variables.
-
Run the web scraper:
pipenv run python webscrapper/main.py
-
Run the website:
pipenv run python app.py
After setting up the project, you can use the website to search for battlemaps. The web scraper will periodically scrape Reddit for new maps according to the specified subreddits. Warning, the API used is pushshift.io, which has a tendency to not work.
Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the terms of the MIT license.