Skip to content
Snippets Groups Projects
Commit 8e58ca8e authored by Kristobal Junta's avatar Kristobal Junta
Browse files

Merge branch 'feature/bootstrap-scripts' into develop

parents c555d838 740bbedb
No related branches found
Tags v2.1.1
No related merge requests found
......@@ -19,13 +19,10 @@ This is a boilerblape for new Scrapy projects.
To create a new project using this boilerplate, you need to:
1. Clone the repository and change dir to `src`.
2. Edit `BOT_NAME` in `settings.py` to your project name.
3. Issue `pipenv install --dev --pre` to install dependencies from Pipfile.
4. Change git origin to your actual project repository: `git remote set-url origin {your-project-link-here}` **OR** just delete `.git` folder at the root of the project.
5. Copy `.env.example` to `.env`
6. ???
7. PROFIT!
1. Clone the repository.
2. Run the installation script: `./install.sh`
3. ???
4. PROFIT!
## Usage
......
#!/bin/bash
DIR="$( cd "$(dirname "$0")" ; pwd -P )"
pushd $DIR > /dev/null
read -p "Enter project name (snake_cased): " project_name
echo "Updating project name"
sed -ie "s/YOUR_PROJECT_NAME/$project_name/g" src/settings.py
read -p "Create new git repo? "
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Removing .git folder"
rm -rf .git
git init
fi
echo "Creating .env file"
cp -i src/.env.example src/.env
read -p "Clear README? "
if [[ $REPLY =~ ^[Yy]$ ]]; then
dirname=${PWD##*/}
echo -e "# $dirname\n" > README.md
echo "Cleared README"
fi
echo "Installing pipenv dependencies"
pipenv install --dev --pre
echo "Setup finished, your project is ready!"
rm -f install.sh
popd > /dev/null
......@@ -5,7 +5,3 @@
[settings]
default = settings
[deploy]
#url = http://localhost:6800/
project = proch
......@@ -2,7 +2,7 @@
import os
BOT_NAME = "YOUR_BOT_NAME_HERE"
BOT_NAME = "YOUR_PROJECT_NAME"
SPIDER_MODULES = ["spiders"]
NEWSPIDER_MODULE = "spiders"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment