From 7f6bb4a6f56f9d0cc2c901237823670b3a90c1a4 Mon Sep 17 00:00:00 2001 From: "nicolas.franco" Date: Thu, 9 Mar 2023 11:26:21 +0100 Subject: [PATCH] started README --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f073295..e081744 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,47 @@ -# SpellScrapper +# Spell Scrapper :scroll: :snake: -Spell scrapper in Python for SpellTastic. \ No newline at end of file +## Data source +All data is retrieved from [d20pfsrd](https://www.d20pfsrd.com/) the __#1 Pathfinder Roleplaying Game rules reference site__. All spells can be found at [spells](https://www.d20pfsrd.com/magic/all-spells/). + +The latest data extracted is available as a YAML file. + +## Getting Started + +### Prerequisites +* Python 3.6+ + +#### Python libraries +* BeatifulSoup4 +* Requests +* lxml +* PyYAML +* sqlite3 + +### Installing +1. Cloning repository +``` +git clone https://github.com/your_username/pathfinder-spell-scraper.git +``` +2. Install the required libraries +``` +pip install requests beautifulsoup4 lxml pyyaml +``` + +## Usage + +### Scrapping +3. You can run __scrap-spells.py__ to scrape the spell information from the website: +``` +python3 scrap-spells.py +``` +__The script should take a few minutes to scrap all spells__ + +4. This command will generate a file __spells.yaml__ with all spells and their attributes + +### Database +5. You can build a __.db__ sqlite3 databse file by running the __spell_db.py__ file: +``` +python3 spell-db.py +``` + +6. The script will create a __spells.db__ file with a spell table containing all the spell information.