Coder Social home page Coder Social logo

curseradio's Introduction

Curseradio

Internet radio in the terminal

Curseradio is a curses interface for browsing and playing an OPML directory of internet radio streams. It is designed to use the tunein directory found at http://opml.radiotime.com/, but could be adapted to others.

Audio playback uses mpv. Curseradio requires python3 and the libraries requests, xdg and lxml.

Key(s) Command
, navigate
PgUp, PgDn navigate quickly
Home, End to top/bottom
Enter open/close folders, play stream
k stop playing stream
q quit
f toggle favourite

curseradio's People

Contributors

chronitis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curseradio's Issues

setup.py build completes OK but setup.py install gives error on Fedora 27

Perhaps Im missing something?

Output:

[viktormadarasz@fedoraws curseradio]$ sudo python setup.py build
running build
running build_py
[viktormadarasz@fedoraws curseradio]$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing curseradio.egg-info/PKG-INFO
writing top-level names to curseradio.egg-info/top_level.txt
writing dependency_links to curseradio.egg-info/dependency_links.txt
writing entry points to curseradio.egg-info/entry_points.txt
reading manifest file 'curseradio.egg-info/SOURCES.txt'
writing manifest file 'curseradio.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/curseradio
copying build/lib/curseradio/main.py -> build/bdist.linux-x86_64/egg/curseradio
copying build/lib/curseradio/init.py -> build/bdist.linux-x86_64/egg/curseradio
copying build/lib/curseradio/curseradio.py -> build/bdist.linux-x86_64/egg/curseradio
byte-compiling build/bdist.linux-x86_64/egg/curseradio/main.py to main.pyc
byte-compiling build/bdist.linux-x86_64/egg/curseradio/init.py to init.pyc
byte-compiling build/bdist.linux-x86_64/egg/curseradio/curseradio.py to curseradio.pyc
File "build/bdist.linux-x86_64/egg/curseradio/curseradio.py", line 187
yield from ()
^
SyntaxError: invalid syntax

creating build/bdist.linux-x86_64/egg/EGG-INFO
copying curseradio.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying curseradio.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying curseradio.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying curseradio.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying curseradio.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/curseradio-0.2-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing curseradio-0.2-py2.7.egg
Removing /usr/lib/python2.7/site-packages/curseradio-0.2-py2.7.egg
Copying curseradio-0.2-py2.7.egg to /usr/lib/python2.7/site-packages
curseradio 0.2 is already the active version in easy-install.pth
Installing curseradio script to /usr/bin

Installed /usr/lib/python2.7/site-packages/curseradio-0.2-py2.7.egg
Processing dependencies for curseradio==0.2
Finished processing dependencies for curseradio==0.2
[viktormadarasz@fedoraws curseradio]$

Licensing of streams

Hey, this is a cool project and thanks for putting it up. I was looking for something like this (low-resource internet radio player with decent UI).

Do you know what the licensing rights of the radiotime streams are? I don't see anything on the TuneIn site that approves non-commercial use, but I imagine they're not too concerned about command line radio tools.

Cant run

Hello

I get the following error.

ImportError: No module named 'xdg.BaseDirectory'; 'xdg' is not a package

Modules are installed

Requirement already satisfied: xdg in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: requests in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: lxml in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: mpv in /usr/local/lib/python3.5/dist-packages

Was working fine. Added Favorites, now won't load

This is what I get after issuing a terminal command to load it.

Traceback (most recent call last):
File "/usr/bin/curseradio", line 6, in
curses.wrapper(lambda s: OPMLBrowser(s, ROOT))
File "/usr/lib/python3.5/curses/init.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/bin/curseradio", line 6, in
curses.wrapper(lambda s: OPMLBrowser(s, ROOT))
File "/usr/lib/python3.5/dist-packages/curseradio/curseradio.py", line 245, in init
self.favourites = self.load_favourites()
File "/usr/lib/python3.5/dist-packages/curseradio/curseradio.py", line 263, in load_favourites
return OPMLFavourites.from_xml(str(opmlpath))
File "/usr/lib/python3.5/dist-packages/curseradio/curseradio.py", line 44, in from_xml
for o in tree.xpath('/opml/body/outline')]
File "/usr/lib/python3.5/dist-packages/curseradio/curseradio.py", line 44, in
for o in tree.xpath('/opml/body/outline')]
File "/usr/lib/python3.5/dist-packages/curseradio/curseradio.py", line 69, in from_element
assert len(element) == 0
AssertionError

Please add vi(1) key binding

Most console/curses programs support vi(1) key bindings - hjkl - out of the box, so having those in addition (instead of?) to the arrow keys, would be great! :^)

Yes, this would mean remapping stop (currently k) to some other key - p (for pause) seems like the best candidate.

How about also using h and l for collapse and expand, i.e. open/close folders, respectively, instead of/additionally to Enter?

For those of us who keep our hands on the home row, this would be invaluable :^)

Anyway, just a handful of ideas.

installation error, using add-apt-repository and apt install curseradio

Traceback (most recent call last):
  File "/usr/bin/curseradio", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'curseradio==0.2' distribution was not found and is required by the application

Hello,
Why always give this error using sudo add-apt-repository ppa:nilarimogard/webupd8 and sudo apt install curseradio?
what I doing is the wrong way?
Thank

Would be nice to include the dependecies in the setup.py

Dear Gordon!

I love this project! My blind brother can listen to internet radio by your help.

But the project has a flaw. On debian the installation from source does not work as expected.

After clonig the GH repo in an virtual env and run the usual python setup.py the code missies some dependencies. In particular
lxml,
requests,
pyxdg

Shall I prepare a pull request to fix this?

Cheers,
Volker

Searching for podcasts/stations

Is there a way to search for a podcast or a station? I noticed there's a "Find by name" option in Music > Rock Music > Shows > More Shows > Find by name but I can't find one for podcasts

Change colors of text?

Is there a way to change colors of different text in curseradio such as from white to something else, or from highlighted white to some other color? I can barely see when I move through the menus because the colors are almost the same.

Also, is there any documentation for this app? Like what apps its based on, or how to change configurations?

Thanks!

A way to change volume either with mpv or through curseradio.cfg

Hi, I'm wondering if anyone knows of a way to change volume up/down either by editing the config file curseradio.cfg, making changes to curseradio.py, or interacting with mpv somehow through curseradio? I don't see an easy way to do this... I've tried copying pyradio volume code, but can't get it as of yet.

I would use pyradio (since apparently curseradio is dead), except pyradio doesn't seem to support OPML xml, so there isn't many stations like there is with curseradio...Maybe it would be easier to open a request with pyradio to see about suport for OPML or xml?

Now Playing

Is there any possibility of adding a 'now playing' display of some kind?

Syntax error in setup.py

I'm on Debian Jessy here, wIth all libraries up-to-date. When I want to run setup.py, I get this:

➜ curseradio git:(master) ✗ python setup.py
Traceback (most recent call last):
File "setup.py", line 4, in
from curseradio import version
File "/home/ivan/curseradio/curseradio/init.py", line 6, in
from .curseradio import OPMLBrowser
File "/home/ivan/curseradio/curseradio/curseradio.py", line 166
yield from ()
^
SyntaxError: invalid syntax

Do you want to help me? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.