Skip to content

o-shabashov/wallswap-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wallswap-Go

BCH compliance

The project is just for fun and test programming skills. It consists of two parts - the server and crawler.

Server:

  1. Runs on 8080 port;
  2. Gets the list of wallpapers from database;
  3. Render the html page with the list of wallpaper;
  4. Allows you to authenticate the user through OAuth2 Dropbox, gets access_token and stores the user in a database;

Crawler:

  1. Parses website https://wallhaven.cc and collects direct URL's at the wallpaper;
  2. Saves list of wallpapers in the database;
  3. Upload wallpapers for each user in Dropbox directory.

Installation

  • Create MySQL database wallswap and import wallswap.sql
  • Create Dropbox App and fill env.env
export DROPBOX_CLIENT_ID='APP_KEY_HERE'
export DROPBOX_CLIENT_SECRET='APP_SECRET_HERE'
  • Redirect URL for Dropbox callback:
http://localhost:8080/oauth2callback
  • Install glide dependencies:
cd wallswap-go
glide update
  • Run server:
go run http.go
  • Run crawl once a week:
go run crawl.go

Made with

  1. Macaron
  2. MySQL
  3. golang.org/x/oauth2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published