mirror of
				https://github.com/sb745/NyaaV3.git
				synced 2025-11-04 01:45:46 +02:00 
			
		
		
		
	
				
				Bittorrent software for cats, now updated
				
			
		| .github | ||
| nyaa | ||
| torrent_cache | ||
| .gitignore | ||
| api_uploader.py | ||
| batch_upload_torrent.sh | ||
| config.example.py | ||
| db_create.py | ||
| LICENSE | ||
| lint.sh | ||
| my.cnf | ||
| README.md | ||
| requirements.txt | ||
| run.py | ||
| trackers.txt | ||
| uwsgi.ini | ||
| WSGI.py | ||
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.pyto create the database - Start the dev server with 
python run.py 
Updated Setup (python 3.6.1):
- Install dependencies https://github.com/pyenv/pyenv/wiki/Common-build-problems
 - Install 
pyenvhttps://github.com/pyenv/pyenv/blob/master/README.md#installation - Install 
pyenv-virtualenvhttps://github.com/pyenv/pyenv-virtualenv/blob/master/README.md pyenv install 3.6.1pyenv virtualenv 3.6.1 nyaapyenv activate nyaa- Install dependencies with 
pip install -r requirements.txt - Copy 
config.example.pyintoconfig.py - Change TALBE_PREFIX to 
nyaa_orsukebei_depending on the site 
Setting up MySQL/MariaDB database for advanced functionality
- Enable 
USE_MYSQLflag 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 
 - Tested versions: 
 - 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 nyaav2DROP 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.pyto create the database - Load the .sql file
mysql -u user -p nyaav2SOURCE 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.shbefore committing.