Skip to content

Sicno/rainwave

 
 

Repository files navigation

This is the git project for the Rainwave website, http://rainwave.cc.

== Python Setup for Debian/Ubuntu

$ sudo apt-get install python-pip python-pyscss python-psycopg2 python-mutagen python-nose python-imaging python-psutil python-unidecode python-pylibmc python-tornado python-meliae
$ sudo pip install jsmin pytz watchdog pympler

== Python Setup for Windows

1. Download and install Python 2.7 for Windows:
	https://www.python.org/download/
2. Download and install a matching Psycopg2:
	http://www.stickpeople.com/projects/python/win-psycopg/
3. Download and install a matching psutil:
	https://pypi.python.org/pypi?:action=display&name=psutil#downloads
4. Install setuptools:
	https://pypi.python.org/pypi/setuptools#installation-instructions
5. Make sure Python is on your PATH (you can execute python from a terminal)
6. Make sure the Python Scripts directory is also on your PATH
7. On the commandline, execute:
	> easy_install pip
	> pip install tornado mutagen nose pillow pyscss jsmin unidecode pytz objgraph watchdog python-memcached pympler

== Getting Started for Web Development

$ git clone git@github.com:rmcauley/rainwave.git
$ cp etc/rainwave-dev.conf etc/[your username].conf
$ python rw_api.py

Wait until you see "API server on port 20000 ready to go."  Depending on your
PC, this may take a minute or so.

Then open the beta URL: http://localhost:20000/beta/?sid=1

Done!

If you want to emulate being logged in, go to this URL:
http://localhost:20000/api4/test/login_tuned_in/1

To emulate being anonymous, just close and re-open your browser.

HTML files can be found in the templates directory.
CSS files are in static/style4 and compiled using SCSS.
JS files are in static/js4 and are not minified for beta development.
Image files are in static/images4

All files are refreshed as you edit them, no need to restart the server.

== Getting Started for Backend Development

$ git clone git@github.com:rmcauley/rainwave.git
$ cp etc/rainwave_reference.conf etc/[your username].conf

Setup PostgreSQL on your system and change your Rainwave config file
to use Postgres instead of SQLite.  The Rainwave Pg role must have the ability
to create tables.  You must also have your own MP3 collection, and change the
song_dirs configuration in your rainwave.conf to point to your collection.
Tags are important!

$ python db_init.py
$ python rw_scanner.py --full

Once done, run the backend (rw_backend.py) and the API (rw_api.py)
at the same time. When you want to trigger a song switch,
use rw_get_next.py.

It shouldn't need saying, but SQLite is not considered supported for
production environments.  The SQLite code in Rainwave takes a lot of
shortcuts and liberties and some corner code cases are just
completely uncovered.  SQLite is only meant for unit testing
and front-end-only web developers.

== Required Modules and Executables in Detail

Required on all systems:
- tornado
- sqlite3
- psycopg2
- mutagen
- nose
- pillow
- psutil
- pyScss
- jsmin
- unidecode
- pytz
- pympler
- watchdog
- meliae (Linux)
- pylibmc (POSIX) or python-memcached (Windows/PyPy)

To let Rainwave automatically mp3gain your collection, you will need to enable it
in the configs and also have the "mp3gain" executable in your path.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 48.7%
  • Python 44.1%
  • CSS 7.0%
  • Shell 0.2%