Skip to main content

A command line client for 8tracks.com.

Project description

Build status PyPI version PyPI Python versions PyPI license PyPI wheel PyPI downloads per month Bounties

Orochi is a command line client for 8tracks.com written in Python.

Yamata no Orochi (八岐の大蛇) is a legendary 8-headed and 8-tailed Japanese dragon. The name translates to “8-branched giant snake”. I chose the name because it both refers to the number eight (as in 8tracks) and to snakes (as in Python).

Illustration of Yamata no Orochi

Image courtesy of Gustavo Araujo

Installing

Using pip:

$ sudo pip install -U orochi

If you’re an ArchLinux user, you can also install orochi from AUR:

$ yaourt -S orochi

Usage

Prerequisites:

  • Python 2.7+ and 3.3+

  • mplayer (at least r27665, released in 1.0rc3)

Start:

$ orochi

Available commands (main menu):

search:
    Syntax: search <searchterm>
    Search for a mix by keyword.
    You can then play a mix with the "play" command.
    Press enter to show next page results.
search_tags:
    Syntax: search <tag1>, <tag2>
    Search for a mix by tag(s), separated by comma.
    You can then play a mix with the "play" command.
    Press Enter to show next page results.
search_user:
    Syntax: search <username>
    Search for a mix by user.
    You can then play a mix with the "play" command.
    Press Enter to show next page results.
search_user_liked:
    Syntax: search <username>
    Search for a mix liked by user.
    You can then play a mix with the "play" command.
    Press Enter to show next page results.
set:
    Syntax: set <setting> <param>
    Configure settings.
    Available settings:
    - autologin yes|no
      Toggle autologin on start (no by default)
      WARNING: password will be saved in plain text.
    - sorting recent|popular|hot (hot by default)
      Configure search results sorting order.
    - results_per_page <n>
      Set number of results per page showed.
    To get help for each setting, press Enter with no <param>.
play:
    Syntax: play <mix>
    Play the nth mix from the last search results.
    The <mix> argument can also be a mix ID or an URL.
exit:
    Exit the interpreter.
    You can also use the Ctrl-D shortcut.
login:
    Syntax: login <username>
    Log in to your 8tracks account.
liked_mixes:
    List liked mixes (login required).
    Press Enter to show next page results.

Available commands (play mode menu):

pause / p:
    Pause or resume the playback.
stop:
    Stop the playback and exit play mode.
next_song / n:
    Skip to next song.
next_mix:
    Skip to next mix.
status / s:
    Show the status of the currently playing song.
mix_info:
    Show information about the currently playing mix.
volume / v:
    Syntax: volume <amount>
    Change playback volume. The argument must be a number between 0 and 100.
like_mix / l:
    Like the currently playing mix (login required).
unlike_mix / ul:
    Un-like the currently playing mix (login required).
fav_track / f:
    Favorite the currently playing track (login required).
unfav_track / uf:
    Un-favorite the currently playing track (login required).

Configuration

The first time Orochi is started, it creates the config.json configfile in the ~/.config/orochi/ directory. The following configurations can be changed:

mplayer_extra_args:
    Extra arguments that are passed on to the mplayer instance.

Example configuration:

{
    "mplayer_extra_args": "-ao alsa:device=hw=1.0"
}

Development

Install requirements.txt (with pip install -r). Then start orochi the following way:

$ python -m orochi.client

For development and testing purposes, you can also pass in the --pdb argument. Then a debug session should be started if orochi crashes.

Coding Guidelines

PEP8 via flake8 with max-line-width set to 99 and E126-E128 ignored.

Testing

Install requirements-dev.txt, then run py.test in the main directory. Violations of the coding guidelines above will be counted as test fails.

Contributing

Please refer to the Contributors Guidelines. Thanks!

License

Copyright (C) 2013–2016 Danilo Bargen and contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orochi-0.1.3.tar.gz (31.6 kB view details)

Uploaded Source

Built Distributions

orochi-0.1.3-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

orochi-0.1.3-py2-none-any.whl (27.3 kB view details)

Uploaded Python 2

File details

Details for the file orochi-0.1.3.tar.gz.

File metadata

  • Download URL: orochi-0.1.3.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for orochi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e00c8902db5e61f0ff44a087dc53e24036c05d070416a8a2909ba6258bb549ab
MD5 17be368b398e50f44461c17b04a1922f
BLAKE2b-256 af26df7460b9573d5b1a186161b0e6dc8d4c5260e64c519f512aed35e35d2f14

See more details on using hashes here.

File details

Details for the file orochi-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for orochi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b32691ce37f06d2afa338fd21c2c1ef3d1c18cea299e9564140c0af95f5ead8e
MD5 89639347325bca3eb8edb13f755072b6
BLAKE2b-256 4b826021e45ac704db9e20be73ff196caf961beaddf301c4ab3d08961d85b9ed

See more details on using hashes here.

File details

Details for the file orochi-0.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for orochi-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 698e3189a8895d207877c1999df8d423978f6f64b7e0de6af4fa17fde8f98751
MD5 b5f700e3a1fde0042e2503b23e23de95
BLAKE2b-256 2a94b2af0d69add04d1e223d704fb1f65fe07087b82d7fb4eb7a5f7a0b2b3455

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page