Skip to content

Commit

Permalink
Refactor documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Apr 2, 2014
1 parent 2412c98 commit 6a7dae6
Show file tree
Hide file tree
Showing 21 changed files with 1,078 additions and 100 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.inv
*.min.css
*.min.js*
*.out.css
Expand Down
88 changes: 69 additions & 19 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===============================
Installing ``gmusicprocurator``
===============================
============
Installation
============

Requirements
------------
Expand All @@ -10,6 +10,7 @@ Backend

* Python 2.7 (only tested with CPython)
* virtualenv (optional, but recommended)
* git (some packages are only installable via version control)

Frontend
~~~~~~~~
Expand All @@ -26,25 +27,74 @@ Frontend
Browser
~~~~~~~

Any web browser which `supports the HTML5 audio element`_ is supported.
Any web browser which `supports the HTML5 audio element`_ is supported, except
IE9, due to the layout CSS.

.. _supports the HTML5 audio element: http://caniuse.com/audio

Instructions
------------

These instructions are similar to the quick installation in ``README.rst``.
This is meant as a supplement, so that the HTML5 frontend is installed
correctly.

.. code-block:: console
$ git clone --recursive https://github.com/malept/gmusicprocurator.git
$ cd gmusicprocurator
$ bower install -p # Added for frontend installation
$ virtualenv venv # Added for creating a separate virtualenv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ python -m gmusicprocurator list_devices --no-desktop
# See quick install in README.rst
(venv) $ python -m gmusicprocurator runserver
Create a config file. The location depends on the OS where you're installing
this app:

OS X:
``~/Library/Application Support/gmusicapi/gmusicprocurator.cfg``
Linux:
``~/.config/gmusicapi/gmusicprocurator.cfg``
Windows:
*If you want to use this on Windows, let me know. I have no idea whether it
will work correctly.*

The contents of the file will look like this:

.. code-block:: python
GACCOUNT_EMAIL = '[email protected]'
GACCOUNT_PASSWORD = 'my-password'
Then run the following (lines that start with ``#`` are comments, not commands):

.. code-block:: shell-session
# Get the code
user@host:Code$ git clone --recursive https://github.com/malept/gmusicprocurator.git
user@host:Code$ cd gmusicprocurator
# Create a new virtual
user@host:gmusicprocurator$ virtualenv venv
user@host:gmusicprocurator$ source venv/bin/activate
(venv)user@host:gmusicprocurator$ pip install -r requirements.txt
(venv)user@host:gmusicprocurator$ python -m gmusicprocurator list_devices --no-desktop
The last command will print out a list of mobile devices that are registered
with Google Music. Select one of them and add the following to the config file
from above (substituting ``REPLACE_ME`` with the ID, which is after the colon
in the device ID printout):

.. code-block:: python
GACCOUNT_DEVICE_ID = 'REPLACE_ME'
Once the config file is saved, the server can be started.

.. code-block:: shell-session
(venv)user@host:gmusicprocurator$ python -m gmusicprocurator runserver
By default, it runs at ``localhost:5000``. For assistance on how to change
these settings, run ``python -m gmusicprocurator runserver --help``.

Currently, the proxy assumes that you know the playlist ID. You can access the
(XSPF) playlist in the media player of your choice via the URL
``http://localhost:5000/playlists/$PLAYLIST_ID``, replacing ``$PLAYLIST_ID``
with the proper playlist ID.

Frontend-specific
~~~~~~~~~~~~~~~~~

If you want to run the frontend as well, run the following before you start the
server:

.. code-block:: shell-session
(venv)user@host:gmusicprocurator$ bower install -p
Loading

0 comments on commit 6a7dae6

Please sign in to comment.