Skip to content
This repository was archived by the owner on Oct 20, 2018. It is now read-only.

Commit f366e84

Browse files
committed
Add documentation using MkDocs
1 parent 7cb3dff commit f366e84

File tree

10 files changed

+174
-59
lines changed

10 files changed

+174
-59
lines changed

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ Each commit should encompass the smallest logical changeset (e.g. changing two u
3333
[fork]: https://help.github.com/articles/fork-a-repo
3434

3535
## Misc
36-
For anything else, contact me by e-mail at [email protected] or on IRC in ``#gmusicapi`` on ``irc.freenode.net``
36+
For anything else, contact me by e-mail at <[email protected]> or on IRC in ``#gmusicapi`` on ``irc.freenode.net``

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ target/
6565
# pyenv
6666
.python-version
6767

68+
# MkDocs
69+
site/
70+

README.md

+5-36
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,22 @@ gmusicapi-scripts
33

44
A collection of scripts for [gmusicapi](https://github.com/simon-weber/Unofficial-Google-Music-API) using [gmusicapi-wrapper](https://github.com/thebigmunch/gmusicapi-wrapper).
55

6-
## Requirements
76

8-
* Python 3.4+
9-
* [gmusicapi](https://github.com/simon-weber/Unofficial-Google-Music-API)
10-
* [gmusicapi-wrapper](https://github.com/thebigmunch/gmusicapi-wrapper)
11-
* [mutagen](https://bitbucket.org/lazka/mutagen)
12-
* [docopt](https://github.com/docopt/docopt)
13-
* ffmpeg or avconv for uploading non-mp3 files (See [here](http://unofficial-google-music-api.readthedocs.org/en/latest/usage.html#usage))
7+
## Documentation
148

15-
## Installation
9+
Documentation is available online at <https://thebigmunch.github.io/gmusicapi-scripts>. There you can find [install instructions](https://thebigmunch.github.io/gmusicapi-scripts/install/), [usage instructions](https://thebigmunch.github.io/gmusicapi-scripts/usage/), and [contributing guidelines](https://thebigmunch.github.io/gmusicapi-scripts/contributing/).
1610

17-
* Stable release
18-
19-
pip install gmusicapi-scripts
20-
pip install git+https://github.com/thebigmunch/gmusicapi-scripts
21-
22-
* Development release
23-
24-
pip install git+https://github.com/thebigmunch/gmusicapi-scripts@devel
25-
26-
## Usage
27-
28-
See the [USAGE.md](https://github.com/thebigmunch/gmusicapi-scripts/blob/master/USAGE.md) file or the online [Wiki](https://github.com/thebigmunch/gmusicapi-scripts/wiki)
29-
30-
## Contributing
31-
32-
See the [CONTRIBUTING.md](https://github.com/thebigmunch/gmusicapi-scripts/blob/master/CONTRIBUTING.md) file
33-
34-
## FAQ
35-
36-
##### Is it possible to add support for downloading All Access songs?
37-
38-
Yes.
39-
40-
##### Would you add support for downloading All Access songs?
41-
42-
Almost certainly never. All Access songs are obviously not intended for download. Your All Access subscription allows you to stream these songs as long as you subscribe. Circumventing this restriction would only bring unwanted attention, criticism, and repercussions to gmusicapi.
4311

4412
## Contact
4513

4614
You can contact the author in ``#gmusicapi`` on ``irc.freenode.net`` or by [e-mail](mailto:[email protected])
4715

16+
4817
## Donate
4918

50-
Donations, as any compliment, are appreciated but not expected.
19+
Donations, as any compliment, are appreciated but not expected. I include these because people have shown interest.
5120

52-
[![Bitcoin](http://img.shields.io/badge/bitcoin-donate-green.svg?style=flat-square)](https://coinbase.com/thebigmunch) [![Flattr](http://img.shields.io/badge/flattr-donate-green.svg?style=flat-square)](https://flattr.com/thing/2419308) [![PayPal](http://img.shields.io/badge/paypal-donate-green.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=DHDVLSYW8V8N4&lc=US&item_name=thebigmunch&currency_code=USD)
21+
[![Bitcoin](http://img.shields.io/badge/bitcoin-donate-green.svg?style=flat-square)](https://coinbase.com/thebigmunch) [![Flattr](http://img.shields.io/badge/flattr-donate-green.svg?style=flat-square)](https://flattr.com/thing/2419308) [![PayPal](http://img.shields.io/badge/paypal-donate-green.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=DHDVLSYW8V8N4&lc=US&item_name=thebigmunch&currency_code=USD)
5322
[![Coinbase](http://img.shields.io/badge/coinbase-referral-orange.svg?style=flat-square)](https://coinbase.com/?r=52502f01e0fdd4d3ef000253&utm_campaign=user-referral&src=referral-link) [![Digital Ocean](http://img.shields.io/badge/digital ocean-referral-orange.svg?style=flat-square)](https://www.digitalocean.com/?refcode=3823208a0597) [![Namecheap](http://img.shields.io/badge/namecheap-referral-orange.svg?style=flat-square)](http://www.namecheap.com/?aff=67208)
5423

5524
-----

docs/changelog.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Change Log
2+
3+
Notable changes for the [gmusicapi-scripts](https://github.com/thebigmunch/gmusicapi-scripts) project. This project uses [Semantic Versioning](http://semver.org/) principles.
4+
5+
6+
## [0.3.0](https://github.com/thebigmunch/gmusicapi-scripts/releases/tag/0.3.0) (2016-02-29)
7+
8+
[Commits](https://github.com/thebigmunch/gmusicapi-scripts/compare/0.2.1...0.3.0)
9+
10+
### Added
11+
12+
* Output songs to be filtered in dry-run.
13+
14+
### Changed
15+
16+
* Change --include-all to --all-includes to match parameter change in gmusicapi-wrapper.
17+
* Change --exclude-all to --all-excludes to match parameter change in gmusicapi-wrapper.
18+
* Change behavior of --max-depth=0; it now limits to the current directory level instead of being infinite recursion.
19+
20+
21+
## [0.2.1](https://github.com/thebigmunch/gmusicapi-scripts/releases/tag/0.2.1) (2016-02-15)
22+
23+
[Commits](https://github.com/thebigmunch/gmusicapi-scripts/compare/0.2.0...0.2.1)
24+
25+
### Fixed
26+
27+
* Use correct track number metadata key for sorting.
28+
* Fix delete on success check.
29+
30+
### Changed
31+
32+
* Update supported gmusicapi-wrapper versions.
33+
34+
35+
## [0.2.0](https://github.com/thebigmunch/gmusicapi-scripts/releases/tag/0.2.0) (2016-02-13)
36+
37+
[Commits](https://github.com/thebigmunch/gmusicapi-scripts/compare/0.1.0...0.2.0)
38+
39+
### Added
40+
41+
* Python 3 support.
42+
43+
### Remove
44+
45+
* Python 2 support.
46+
47+
### Changed
48+
49+
* Port to Python 3. Python 2 is no longer supported.
50+
51+
52+
## [0.1.0](https://github.com/thebigmunch/gmusicapi-scripts/releases/tag/0.1.0) (2015-12-02)
53+
54+
[Commits](https://github.com/thebigmunch/gmusicapi-scripts/compare/b66da631025f5074df0e290aa515b7f18d14fde8...0.1.0)
55+
56+
* First package release for PyPi.

docs/contributing.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Submitting an issue
2+
3+
Bug reports and feature requests can be submitted to the [Issue Tracker](https://github.com/thebigmunch/gmusicapi-scripts/issues).
4+
5+
Some general guidelines to follow:
6+
7+
* Use an appropriate, descriptive title.
8+
* Provide as many details as possible.
9+
* Don't piggy-back. Keep separate topics in separate issues.
10+
11+
## Submitting code
12+
13+
Patches are welcome. Keep your code consistent with the rest of the project. [PEP8](https://www.python.org/dev/peps/pep-0008/) is a good guide, but with the following specific exceptions to keep in mind for coding/linting:
14+
15+
* Tabs should be used for indentation of code.
16+
* I don't have a set maximum line length. However, I do like to keep lines viewable in my editor when windowed (150).
17+
18+
Some linter errors may need to be ignored to accommodate these differences.
19+
20+
For simple, single file changes/additions, sending or linking your modified file is acceptable. For complex, multiple file changes, creating a diff file or using GitHub's [Pull Request](https://help.github.com/articles/using-pull-requests/) feature is preferable.
21+
22+
If you have any questions or concerns, contact me through the methods listed below.
23+
24+
### Pull Requests
25+
26+
You should create a separate [feature branch][fb] in your [fork][fork] to commit your changes to. [Pull Requests](https://help.github.com/articles/creating-a-pull-request) will only be accepted if made from a [feature branch][fb] and against the [devel](https://github.com/thebigmunch/gmusicapi-scripts/tree/devel) branch of this repository.
27+
28+
Commit messages should be written in a [well-formed, consistent](https://sethrobertson.github.io/GitBestPractices/#usemsg) manner. See the [commit log](https://github.com/thebigmunch/gmusicapi-scripts/commits/devel) for acceptable examples.
29+
30+
Each commit should encompass the smallest logical changeset (e.g. changing two unrelated things in the same file would be two commits rather than one commit of "Change filename".) If you made a mistake in a commit in your Pull Request, you should [amend](https://www.atlassian.com/git/tutorials/rewriting-history/git-commit--amend) or [rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase-i) to change your previous commit(s) then [force push](http://stackoverflow.com/a/12610763) to the [feature branch][fb] in your [fork][fork].
31+
32+
[fb]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/#creating-a-branch
33+
[fork]: https://help.github.com/articles/fork-a-repo
34+
35+
## Misc
36+
For anything else, contact me by e-mail at <[email protected]> or on IRC in ``#gmusicapi`` on ``irc.freenode.net``

docs/index.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
A collection of scripts for [gmusicapi](https://github.com/simon-weber/gmusicapi) using [gmusicapi-wrapper](https://github.com/thebigmunch/gmusicapi-wrapper).
2+
3+
## FAQ
4+
5+
**Is it possible to add support for downloading All Access songs?**
6+
7+
Yes.
8+
9+
**Would you add support for downloading All Access songs?**
10+
11+
Almost certainly never. All Access songs are obviously not intended for download. Your All Access subscription allows you to stream these songs as long as you subscribe. Circumventing this restriction would only bring unwanted attention, criticism, and repercussions to gmusicapi.
12+
13+
14+
## Contact
15+
16+
You can contact the author in ``#gmusicapi`` on ``irc.freenode.net`` or by [e-mail](mailto:[email protected])
17+
18+
19+
## Donate
20+
21+
Donations, as any compliment, are appreciated but not expected. I include these because people have shown interest.
22+
23+
[![Bitcoin](http://img.shields.io/badge/Bitcoin-donate-green.svg?style=flat-square)](https://coinbase.com/thebigmunch) [![Flattr](http://img.shields.io/badge/Flattr-donate-green.svg?style=flat-square)](https://flattr.com/thing/2419308) [![PayPal](http://img.shields.io/badge/PayPal-donate-green.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=DHDVLSYW8V8N4&lc=US&item_name=thebigmunch&currency_code=USD)
24+
[![Coinbase](http://img.shields.io/badge/Coinbase-referral-orange.svg?style=flat-square)](https://coinbase.com/?r=52502f01e0fdd4d3ef000253&utm_campaign=user-referral&src=referral-link) [![Digital Ocean](http://img.shields.io/badge/Digital%20Ocean-referral-orange.svg?style=flat-square)](https://www.digitalocean.com/?refcode=3823208a0597) [![Namecheap](http://img.shields.io/badge/Namecheap-referral-orange.svg?style=flat-square)](http://www.namecheap.com/?aff=67208)

docs/install.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Requirements
2+
3+
* Python 3.4+
4+
* [gmusicapi](https://github.com/simon-weber/Unofficial-Google-Music-API)
5+
* [gmusicapi-wrapper](https://github.com/thebigmunch/gmusicapi-wrapper)
6+
* [mutagen](https://bitbucket.org/lazka/mutagen)
7+
* [docopt](https://github.com/docopt/docopt)
8+
* ffmpeg or avconv for uploading (See [here](http://unofficial-google-music-api.readthedocs.org/en/latest/usage.html#usage))
9+
10+
11+
## Installation
12+
13+
* Stable release
14+
15+
pip install gmusicapi-scripts
16+
pip install git+https://github.com/thebigmunch/gmusicapi-scripts
17+
18+
* Development release
19+
20+
pip install git+https://github.com/thebigmunch/gmusicapi-scripts@devel

USAGE.md renamed to docs/usage.md

+10-22
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
Usage
2-
=====
3-
4-
- [General](#General)
5-
- [Output pattern replacements](#Output pattern replacements)
6-
- [gmsearch](#gmsearch)
7-
- [gmdelete](#gmdelete)
8-
- [gmsync](#gmsync)
9-
- [gmupload](#gmupload)
10-
- [gmdownload](#gmdownload)
11-
121
## General
132

143
``script [options] [input/output]``
@@ -45,8 +34,8 @@ Options | Description
4534
-I ID --android-id ID | An Android device id.
4635
-l, --log | Enable gmusicapi logging
4736
-q, --quiet | Don't output status messages<br>With -l,--log will display gmusicapi warnings
48-
-f, --include-filter | Include Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
49-
-F, --exclude-filter | Exclude Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
37+
-f, --include-filter | Include Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
38+
-F, --exclude-filter | Exclude Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
5039
-a, --all-includes | Songs must match all include filter criteria
5140
-A, --all-excludes | Songs must match all exclude filter criteria
5241
-y, --yes | Display results without asking for confirmation
@@ -68,8 +57,8 @@ Options | Description
6857
-l, --log | Enable gmusicapi logging
6958
-d, --dry-run | Output list of songs that would be uploaded and excluded
7059
-q, --quiet | Don't output status messages<br>With -l,--log will display gmusicapi warnings
71-
-f, --include-filter | Include Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
72-
-F, --exclude-filter | Exclude Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
60+
-f, --include-filter | Include Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
61+
-F, --exclude-filter | Exclude Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
7362
-a, --all-includes | Songs must match all include filter criteria
7463
-A, --all-excludes | Songs must match all exclude filter criteria
7564
-y, --yes | Display results without asking for confirmation
@@ -100,8 +89,8 @@ Options | Description
10089
-R, --no-recursion | Disable recursion when scanning for local files.<br>This is equivalent to setting --max-depth to 0.
10190
--max-depth DEPTH | Set maximum depth of recursion when scanning for local files.<br>Default is infinite recursion.<br>Has no effect when -R, --no-recursion set.
10291
-e, -exclude | Exclude file paths matching a Python regex pattern<br>This option can be set multiple times
103-
-f, --include-filter | Include Google songs (download) or local songs (upload) by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
104-
-F, --exclude-filter | Exclude Google songs (download) or local songs (upload) by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
92+
-f, --include-filter | Include Google songs (download) or local songs (upload) by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
93+
-F, --exclude-filter | Exclude Google songs (download) or local songs (upload) by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
10594
-a, --all-includes | Songs must match all include filter criteria
10695
-A, --all-excludes | Songs must match all exclude filter criteria
10796
input | Files, directories, or glob patterns to upload<br>Defaults to current directory if omitted
@@ -148,8 +137,8 @@ Options | Description
148137
-R, --no-recursion | Disable recursion when scanning for local files.<br>This is equivalent to setting --max-depth to 0.
149138
--max-depth DEPTH | Set maximum depth of recursion when scanning for local files.<br>Default is infinite recursion.<br>Has no effect when -R, --no-recursion set.
150139
-e, -exclude | Exclude file paths matching a Python regex pattern<br>This option can be set multiple times
151-
-f, --include-filter | Include local songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
152-
-F, --exclude-filter | Exclude local songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
140+
-f, --include-filter | Include local songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
141+
-F, --exclude-filter | Exclude local songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
153142
-a, --all-includes | Songs must match all include filter criteria
154143
-A, --all-excludes | Songs must match all exclude filter criteria
155144
input | Files, directories, or glob patterns to upload<br>Defaults to current directory if omitted
@@ -180,8 +169,8 @@ Options | Description
180169
-l, --log | Enable gmusicapi logging
181170
-d, --dry-run | Output list of songs that would be uploaded and excluded
182171
-q, --quiet | Don't output status messages<br>With -l,--log will display gmusicapi warnings<br>With -d,--dry-run will display song list
183-
-f, --include-filter | Include Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
184-
-F, --exclude-filter | Exclude Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/2/library/re.html)<br>This option can be set multiple times
172+
-f, --include-filter | Include Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
173+
-F, --exclude-filter | Exclude Google songs by field:pattern filter (e.g. "artist:Muse").*<br>Values can be any valid [Python regex pattern](http://docs.python.org/3/library/re.html)<br>This option can be set multiple times
185174
-a, --all-includes | Songs must match all include filter criteria
186175
-A, --all-excludes | Songs must match all exclude filter criteria
187176
output | Output file or directory name which can include template patterns<br>Defaults to name suggested by Google Music in your current directory
@@ -194,4 +183,3 @@ output | Output file or directory name which can include templat
194183
gmdownload -a -f 'artist:Muse' -f 'album:Black Holes' "/path/to/%artist%/%album%/%title%"
195184
gmdownload -f 'artist:Muse|Modest Mouse' "/path/to/%artist%/%album%/%title%"
196185
```
197-

mkdocs.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
site_name: gmusicapi-scripts
2+
repo_url: https://github.com/thebigmunch/gmusicapi-scripts
3+
theme: material
4+
extra:
5+
palette:
6+
primary: indigo
7+
accent: light blue
8+
author:
9+
github: thebigmunch
10+
markdown_extensions:
11+
- nl2br
12+
13+
pages:
14+
- Home: index.md
15+
- Install: install.md
16+
- Use: usage.md
17+
- Contribute: contributing.md
18+
- Changelog: changelog.md

tasks.py

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def clean():
1515
run('rm -rf .cache')
1616
run('rm -rf build/')
1717
run('rm -rf dist/')
18+
run('rm -rf site/')
1819
run('find . -name *.pyc -delete')
1920
run('find . -name *.pyo -delete')
2021
run('find . -name __pycache__ -delete -depth')

0 commit comments

Comments
 (0)