/Spacewalls

Scrape space-themed wallpapers from various sources, provide a viewer of images that have been scraped and a cronjob that will update your desktop background to a random image each day.

Primary LanguageJavaScriptMIT LicenseMIT

Spacewalls

Scrape space-themed wallpapers from various sources, provide a viewer of images that have been scraped and a cronjob that will update your desktop background to a random image each day.

Instructions for setup

  1. Clone this repo and set up a Python virutal environment by running the following in Terminal:
pip install virtualenv
virtualenv env
source env/bin/activate
pip install -r requirements.txt
  1. Run the scraper to get the space images. The spiders available are spacex and hubble.
cd space_scrape
scrapy crawl spacex -o ../app/static/images/spacex.json
scrapy crawl hubble -o ../app/static/images/hubble.json
  1. Create a Postgres database 'spacewalls' then create the model for the database in the python interprer as follows.
cd ../app
python
from app import db
db.create_all()
exit()
  1. Run the following command to seed the database.
python app/seed.py
  1. Generate bundle.js
cd ..
npm install
npm run build
npm start
  1. Start the web application.
python app/app.py