Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
splited modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Nov 13, 2017
1 parent 55897c2 commit b00a2e9
Show file tree
Hide file tree
Showing 12 changed files with 388 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
build
dist
googlemusicmanager.egg-info
lib/googlemusicmanager.egg-info
lib/__pycache__
google_music_manager*.egg-info
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Google Music Manager - Python Daemon
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png
:alt: PayPal donation
:target: https://www.paypal.me/jaymoulin
.. image:: https://beerpay.io/femtopixel/docker-google-closure-compiler-api/badge.svg
.. image:: https://beerpay.io/jaymoulin/googl-music-manager/badge.svg
:alt: Beerpay donation
:target: https://beerpay.io/femtopixel/docker-google-closure-compiler-api
:target: https://beerpay.io/jaymoulin/googl-music-manager


This program will replace former Google MusicManager to upload your music library to Google Music
Expand All @@ -38,11 +38,11 @@ also, this program needs `watchdog`, `gmusicapi`, `netifaces` and `bs4` Python l
pip3 install watchdog gmusicapi bs4 netifaces
Once installed, You have to authenticate to Google Music via the `auth.py` script
Once installed, You have to authenticate to Google Music via the `google-music-auth` command

.. code::
# Usage ./auth.py [path_to_oauth_cred_file=~/oauth]
# Usage google-music-auth [path_to_oauth_cred_file=~/oauth]
If first parameter is not defined, the script will try to store/load your oauth credentials through the `~/oauth` file.
Expand Down Expand Up @@ -70,7 +70,7 @@ It will *NOT* upload already existing files, *ONLY* new files while the daemon i

.. code::
usage: uploader_daemon.py [-h] [--directory DIRECTORY] [--oauth OAUTH] [-r]
usage: google-music-upload [-h] [--directory DIRECTORY] [--oauth OAUTH] [-r]
[--uploader_id UPLOADER_ID]
optional arguments:
Expand All @@ -91,7 +91,7 @@ This program will download all your uploaded musics from Google Music to a given

.. code::
usage: download.py [-h] [--directory DIRECTORY] [--oauth OAUTH]
usage: google-music-download [-h] [--directory DIRECTORY] [--oauth OAUTH]
optional arguments:
-h, --help show this help message and exit
Expand Down
82 changes: 82 additions & 0 deletions google_music_manager_auth/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
=====================================
Google Music Manager - Authentication
=====================================



.. image:: https://img.shields.io/github/release/jaymoulin/google-music-manager.svg
:alt: latest release
:target: http://github.com/jaymoulin/google-music-manager/releases
.. image:: https://img.shields.io/pypi/v/google-music-manager-auth.svg
:alt: PyPI version
:target: https://pypi.org/project/google-music-manager-auth/
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png
:alt: Bitcoin donation
:target: https://m.freewallet.org/id/374ad82e/btc
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png
:alt: Litecoin donation
:target: https://m.freewallet.org/id/374ad82e/ltc
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png
:alt: PayPal donation
:target: https://www.paypal.me/jaymoulin
.. image:: https://beerpay.io/jaymoulin/googl-music-manager/badge.svg
:alt: Beerpay donation
:target: https://beerpay.io/jaymoulin/googl-music-manager


This program will replace former Google MusicManager to upload your music library to Google Music

This work is based upon `Simon Weber's Google Music API <https://github.com/simon-weber/gmusicapi>`_.

Installation
------------

.. code::
apt-get install python3-pip build-essential
pip3 install google-music-manager-auth
Once installed, You have to authenticate to Google Music via the `google-music-auth` command

.. code::
# Usage google-music-auth [path_to_oauth_cred_file=~/oauth]
If first parameter is not defined, the script will try to store/load your oauth credentials through the `~/oauth` file.

Then follow prompted instructions.

You will be asked to go to a Google URL to allow the connection:

.. code::
Visit the following url:
https://accounts.google.com/o/oauth2/v2/auth?client_id=XXXXXXXXXXX.apps.googleusercontent.com&access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmusicmanager&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
Follow the prompts, then paste the auth code here and hit enter:
=====
About
=====

Requirements
------------

Google Music Uploader works with Python 3 or above.
It requires `Simon Weber's Google Music API <https://github.com/simon-weber/gmusicapi>`_.

Submitting bugs and feature requests
------------------------------------

Bugs and feature request are tracked on GitHub

Author
------

Jay MOULIN [email protected] See also the list of contributors which participated in this program.

License
-------

Google Music Uploader is licensed under the MIT License
5 changes: 5 additions & 0 deletions google_music_manager_auth/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
This program will replace former Google MusicManager to upload your music library to Google Music - Auth module
"""

from .auth import auth
File renamed without changes.
102 changes: 102 additions & 0 deletions google_music_manager_downloader/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
=================================
Google Music Manager - Downloader
=================================



.. image:: https://img.shields.io/github/release/jaymoulin/google-music-manager.svg
:alt: latest release
:target: http://github.com/jaymoulin/google-music-manager/releases
.. image:: https://img.shields.io/pypi/v/google-music-manager-downloader.svg
:alt: PyPI version
:target: https://pypi.org/project/google-music-manager-downloader/
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png
:alt: Bitcoin donation
:target: https://m.freewallet.org/id/374ad82e/btc
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png
:alt: Litecoin donation
:target: https://m.freewallet.org/id/374ad82e/ltc
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png
:alt: PayPal donation
:target: https://www.paypal.me/jaymoulin
.. image:: https://beerpay.io/jaymoulin/google-music-manager/badge.svg
:alt: Beerpay donation
:target: https://beerpay.io/jaymoulin/google-music-manager


This program will replace former Google MusicManager to upload your music library to Google Music

This work is based upon `Simon Weber's Google Music API <https://github.com/simon-weber/gmusicapi>`_.

Installation
------------

.. code::
apt-get install python3-pip build-essential
pip3 install google-music-manager-downloader
Once installed, You have to authenticate to Google Music via the `google-music-auth` command

.. code::
# Usage google-music-auth [path_to_oauth_cred_file=~/oauth]
If first parameter is not defined, the script will try to store/load your oauth credentials through the `~/oauth` file.

Then follow prompted instructions.

You will be asked to go to a Google URL to allow the connection:

.. code::
Visit the following url:
https://accounts.google.com/o/oauth2/v2/auth?client_id=XXXXXXXXXXX.apps.googleusercontent.com&access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmusicmanager&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
Follow the prompts, then paste the auth code here and hit enter:
Usage
-----

Downloader
~~~~~~~~~~

This program will download all your uploaded musics from Google Music to a given directory.

.. code::
usage: google-music-download [-h] [--directory DIRECTORY] [--oauth OAUTH]
optional arguments:
-h, --help show this help message and exit
--directory DIRECTORY, -d DIRECTORY
Music Folder to download to (default: .)
--oauth OAUTH, -a OAUTH
Path to oauth file (default: ~/oauth)
=====
About
=====

Requirements
------------

Google Music Uploader works with Python 3 or above.
It requires `Simon Weber's Google Music API <https://github.com/simon-weber/gmusicapi>`_.

Submitting bugs and feature requests
------------------------------------

Bugs and feature request are tracked on GitHub

Author
------

Jay MOULIN [email protected] See also the list of contributors which participated in this program.

License
-------

Google Music Uploader is licensed under the MIT License
5 changes: 5 additions & 0 deletions google_music_manager_downloader/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
This program will replace former Google MusicManager to upload your music library to Google Music - Download module
"""

from .download import download
112 changes: 112 additions & 0 deletions google_music_manager_uploader/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
===============================
Google Music Manager - Uploader
===============================



.. image:: https://img.shields.io/github/release/jaymoulin/google-music-manager.svg
:alt: latest release
:target: http://github.com/jaymoulin/google-music-manager/releases
.. image:: https://img.shields.io/pypi/v/google-music-manager-uploader.svg
:alt: PyPI version
:target: https://pypi.org/project/google-music-manager-uploader/
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png
:alt: Bitcoin donation
:target: https://m.freewallet.org/id/374ad82e/btc
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png
:alt: Litecoin donation
:target: https://m.freewallet.org/id/374ad82e/ltc
.. image:: https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png
:alt: PayPal donation
:target: https://www.paypal.me/jaymoulin
.. image:: https://beerpay.io/jaymoulin/google-music-manager/badge.svg
:alt: Beerpay donation
:target: https://beerpay.io/jaymoulin/google-music-manager


This program will replace former Google MusicManager to upload your music library to Google Music

This work is based upon `Simon Weber's Google Music API <https://github.com/simon-weber/gmusicapi>`_.

Installation
------------

Avconv is needed to convert some of your files due to Google's MP3 constraint
also, this program needs `watchdog`, `gmusicapi`, `netifaces` and `bs4` Python libraries to work.

.. code::
apt-get install python3-pip libav-tools build-essential
pip3 install google-music-manager-uploader
Once installed, You have to authenticate to Google Music via the `google-music-auth` command

.. code::
# Usage google-music-auth [path_to_oauth_cred_file=~/oauth]
If first parameter is not defined, the script will try to store/load your oauth credentials through the `~/oauth` file.

Then follow prompted instructions.

You will be asked to go to a Google URL to allow the connection:

.. code::
Visit the following url:
https://accounts.google.com/o/oauth2/v2/auth?client_id=XXXXXXXXXXX.apps.googleusercontent.com&access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmusicmanager&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
Follow the prompts, then paste the auth code here and hit enter:
Usage
-----

Uploader
~~~~~~~~

This program will scan a given directory for new elements to upload them to Google Music.
First, launch the daemon to watch a directory new inputs.

It will *NOT* upload already existing files, *ONLY* new files while the daemon is running. (Please contribute if you want this to change)

.. code::
usage: google-music-uploader [-h] [--directory DIRECTORY] [--oauth OAUTH] [-r]
[--uploader_id UPLOADER_ID]
optional arguments:
-h, --help show this help message and exit
--directory DIRECTORY, -d DIRECTORY
Music Folder to upload from (default: .)
--oauth OAUTH, -a OAUTH
Path to oauth file (default: ~/oauth)
-r, --remove Remove files if present (default: False)
--uploader_id UPLOADER_ID, -u UPLOADER_ID
Uploader identification (should be an uppercase MAC
address) (default: <current eth0 MAC address>)
=====
About
=====

Requirements
------------

Google Music Uploader works with Python 3 or above.
It requires `Simon Weber's Google Music API <https://github.com/simon-weber/gmusicapi>`_ and `Watchdog <https://pypi.python.org/pypi/watchdog>`_.

Submitting bugs and feature requests
------------------------------------

Bugs and feature request are tracked on GitHub

Author
------

Jay MOULIN [email protected] See also the list of contributors which participated in this program.

License
-------

Google Music Uploader is licensed under the MIT License
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
This program will replace former Google MusicManager to upload your music library to Google Music
This program will replace former Google MusicManager to upload your music library to Google Music - Upload module
"""

from .auth import auth
from .download import download
from .uploader_daemon import upload
Loading

0 comments on commit b00a2e9

Please sign in to comment.