1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 05:20:00 +00:00
Go to file
2017-05-14 00:48:17 -06:00
nyaa Format information into a link if possible 2017-05-13 23:44:00 +03:00
torrent_cache Initial commit. 2017-05-12 20:51:49 +02:00
.gitignore Make sure torrent backup directory exists before writing torrent 2017-05-13 02:41:52 +03:00
api_uploader.py Initial commit. 2017-05-12 20:51:49 +02:00
batch_upload_torrent.sh Initial commit. 2017-05-12 20:51:49 +02:00
config.example.py [templates, config] Add SITE_FLAVOR for selecting nyaa/sukebei, update templates 2017-05-13 02:41:52 +03:00
db_create.py [templates, config] Add SITE_FLAVOR for selecting nyaa/sukebei, update templates 2017-05-13 02:41:52 +03:00
import_to_es.py WIP es stuff 2017-05-14 00:48:17 -06:00
LICENSE Add license (GPLv3) 2017-05-13 01:03:42 +03:00
lint.sh Initial commit. 2017-05-12 20:51:49 +02:00
my.cnf Initial commit. 2017-05-12 20:51:49 +02:00
README.md Initial commit. 2017-05-12 20:51:49 +02:00
requirements.txt Initial commit. 2017-05-12 20:51:49 +02:00
run.py Initial commit. 2017-05-12 20:51:49 +02:00
trackers.txt Opentracker 2017-05-12 22:44:49 +02:00
uwsgi.ini Initial commit. 2017-05-12 20:51:49 +02:00
WSGI.py Initial commit. 2017-05-12 20:51:49 +02:00

NyaaV2

Setup:

  • Create your virtualenv, for example with pyvenv venv
  • Enter your virtualenv with source venv/bin/activate
  • Install dependencies with pip install -r requirements.txt
  • Run python db_create.py to create the database
  • Start the dev server with python run.py

Updated Setup (python 3.6.1):

Setting up MySQL/MariaDB database for advanced functionality

  • Enable USE_MYSQL flag in config.py
  • Install latest mariadb by following instructions here https://downloads.mariadb.org/mariadb/repositories/
    • Tested versions: mysql Ver 15.1 Distrib 10.0.30-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
  • Run the following commands logged in as your root db user:
    • CREATE USER 'test'@'localhost' IDENTIFIED BY 'test123';
    • GRANT ALL PRIVILEGES ON * . * TO 'test'@'localhost';
    • FLUSH PRIVILEGES;
    • CREATE DATABASE nyaav2 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
  • To setup and import nyaa_maria_vx.sql:
    • mysql -u <user> -p nyaav2
    • DROP DATABASE nyaav2;
    • CREATE DATABASE nyaav2 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
    • SOURCE ~/path/to/database/nyaa_maria_vx.sql

Finishing up

  • Run python db_create.py to create the database
  • Load the .sql file
    • mysql -u user -p nyaav2
    • SOURCE cocks.sql
    • Remember to change the default user password to an empty string to disable logging in
  • Start the dev server with python run.py
  • Deactivate source deactivate

Code Quality:

  • Remember to follow PEP8 style guidelines and run ./lint.sh before committing.