Giter Club home page Giter Club logo

castero's Introduction

castero

GitHub release PyPI GitHub Build Maintainability Test Coverage

castero is a TUI podcast client for the terminal.

example client screenshot

Installation

Install from PyPi with pip:

$ pip3 install castero

Upgrading:

$ pip3 install castero --upgrade

Manual Installation

$ git clone https://github.com/xgi/castero
$ cd castero
$ sudo python setup.py install

Dependencies

Running castero requires the following external dependencies:

  • Python >= 3.5 (check the output of python --version)
  • sqlite3
  • At least one of the following media players:
    • vlc >= 2.2.3
    • (mpv and libmpv) >= 0.14.0

Usage

After installing castero, it can be run with simply:

$ castero

The help menu provides a list of controls and can be accessed by pressing h. Alternatively, see the list below:

Commands
    h           - show this help screen
    q           - exit the client
    a           - add a feed
    d           - delete the selected feed
    r           - reload/refresh feeds
    s           - save episode for offline playback
    UP/DOWN     - navigate up/down in menus
    RIGHT/LEFT  - navigate right/left in menus
    PPAGE/NPAGE - scroll up/down in menus
    ENTER       - play selected feed/episode
    SPACE       - add selected feed/episode to queue
    c           - clear the queue
    n           - go to the next episode in the queue
    i           - invert the order of the menu
    /           - filter the contents of the menu
    m           - mark episode as played/unplayed
    p or k      - pause/play the current episode
    f or l      - seek forward
    b or j      - seek backward
    =/-         - increase/decrease volume
    ]/[         - increase/decrease playback speed
    u           - show episode URL
    1-5         - change between client layouts

Importing/exporting feeds from another client

castero supports importing and exporting an OPML file of your subscriptions in order to easily transfer them between other podcast clients. Please refer to your other client's documentation for details on how/if it supports this format.

Importing and exporting from castero are available with command line flags. Run castero --help for details.

Configuration

The configuration file is located at {HOME}/.config/castero/castero.conf after the client has been run at least once.

Please see the default castero.conf for a list of available settings.

User data, including downloaded episodes and a database with your feed information, is located at {HOME}/.local/share/castero/. These files are not intended to be manually modified. Removing the database will simply cause castero to replace it with an empty one the next time you run the client.

Testing

This project uses pytest for testing. To run tests, run the following command in the project's root directory:

$ python -m pytest tests

You can also run tests for an individual unit, i.e.:

$ python -m pytest tests/test_feed.py

License

MIT License

castero's People

Contributors

arza-zara avatar buck10 avatar dependabot[bot] avatar dgambrinus avatar hebecked avatar jose1711 avatar mtostenson avatar nbastin avatar nickwynja avatar rand01ph avatar tistatos avatar xgi 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

castero's Issues

Not save Play position

when i play an episode and than play another episode or exit from program
castero don't save play position and start from the start
i don't know that is bug or castero not support that for now?
it is so important for long episode.
can you please add this feature to castero?

can castero be faster?

i start use and review castero
i fell castero startup is slow ( i know that is python program)
i add only one feed only ( i am not test more feed can affect that)
that is output of time for ranger and castero

➜  ~ time ranger
ranger  0.47s user 0.02s system 47% cpu 1.027 total
➜  ~ time ranger
ranger  0.47s user 0.02s system 43% cpu 1.124 total
➜  ~ time ranger
ranger  0.45s user 0.04s system 45% cpu 1.059 total
➜  ~ time castero 
castero  0.80s user 0.46s system 64% cpu 1.946 total
➜  ~ time castero
castero  0.82s user 0.42s system 59% cpu 2.082 total
➜  ~ time castero
castero  0.81s user 0.44s system 38% cpu 3.215 total

if reading from disk make castero slower ranger has more config file.
startup and cpu usage is so high.
i think ranger is slow to but feature couldn't found any where (image preview)
which part of code could make castero slow?
have a podcast player in terminal is so awesome and thanks for your program so much.

Support for gpodder.net sync

Hi, thanks for castero. It's a really nice application.

Could you add support for gpodder.net sync?. I would like to sync castero with my android podcasts manager. There is a python library to handle the sync https://mygpoclient.readthedocs.io . The same library is used by the gpodder client.

FYI 01/2019 some required packages to install

I got this message:

% castero
Traceback (most recent call last):
File "/usr/bin/castero", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 3126, in
@_call_aside
File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 3110, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 3139, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 581, in _build_master
ws.require(requires)
File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 898, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 784, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cjkwrap' distribution was not found and is required by castero

So I had to install these packages:
python-pympv-git
python-cjkwrap

Now it works.

Add searching in menus

Add a way to filter items in a menu. When you press / a prompt should appear which lets you enter text to filter the selected menu.

Annotate/mark downloaded podcasts in the episode list

It would be nice if you could see which episodes were available for offline listening without having to read the metadata pane for each episode (particularly since there doesn't appear to be any way to scroll that pane, so sometimes you can't see that information at all).

VLC no longer seems to work

Surprisingly, castero changes your config automatically to default to mpv from vlc (probably would have been smoother to leave existing configs as vlc).

However, even after you change it to VLC, you still get:
castero.player.PlayerDependencyError: Sufficient dependencies were not met for any players

I haven't really looked into yet, so I'm not sure if there's anything obvious here.

Offline listening doesn't seem to actually work

The download/save functionality works as expected, and the client does recognize that the file is available on disk, but if you try to play with access to a network, it uses the network stream. If you don't have a network, it just gets stuck playing 00:00:00 / 00:00:00.

Queue reset when client is closed

Hi,

I've noticed the queue has been emptied after I accidentally exited castero. I had carefully selected episodes to listen, and was surprised to find the queue empty after launching again castero.

I think it would make sense to automatically save the queue and have it restored at startup.
What do you think?

feature request: default playback speed

It would be very handy to be able to set a default playback speed in the config file.

I tend to listen to all my podcasts at 1.8x speed. This would save me from having to adjust the speed manually for each podcast.

Episode metadata seems truncated at 35 lines

I'm so happy to find castero. Thank you for making it. It's really cool how you appear to have taken inspiration from ncmpcpp and newsbeuter and combined them into an awesome podcast program.

One small thing I've noticed is that the episode metadata pane appears to truncate its content at 35 lines.

Can you reproduce?


~ % sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.5
BuildVersion:   18F132
~ % pip show castero
Name: castero
Version: 0.5.5
Summary: A TUI podcast client for the terminal
Home-page: https://github.com/xgi/castero
Author: Jake Robertson
Author-email: [email protected]
License: MIT License
Location: /usr/local/lib/python3.7/site-packages
Requires: python-vlc, python-mpv, beautifulsoup4, cjkwrap, requests
Required-by:

(I'm running 0.5.5 as 0.6.0 doesn't seem to have propagated to pypi yet.)

Better filesystem sandboxing for tests

It appears that if you try to test castero with a user that actually has it installed, the tests can't avoid sucking in your user-specific config in some cases, causing failures. It would be nice if the test harness were fully enclosed and only referred to config files that were stored in the repo or generated on the fly in the tests.

Stricter separation of color configuration options

Now, the color of the header and the footer is the same as the color of a selected item. Conceptually, these do not seem like the same thing, and although I've found a color I'm satisfied with for the selected item, it makes the header and footer unreadable (see screenshot below).

Other color options should have less global effects too/be more user specifiable too, imo, but I'm not sure if you're open for more changes. In cmus, which is very similar looking, you have separate color options for the headers and the dividing lines, and the color of the main text. I kinda dig this, because this gives headers a visual style of being important, but keeps the text my preferred color, so that castero doesn't look out of style.
2019-11-11-1573485284

TypeError: Can't instantiate abstract class Primary with abstract methods update_menus

I just updated to castero 0.6.0 and I have this error when I want to start it:

Traceback (most recent call last):
                                    File "/home/g4570n/bin/castero", line 7, in <module>
            from castero.__main__ import main
                                               File "/home/g4570n/.local/lib/python3.5/site-packages/castero/__main__.py", line 113, in <module>
                                                                    main()
                                                                            File "/home/g4570n/.local/lib/python3.5/site-packages/castero/__main__.py", line 86, in main
            display = Display(stdscr, database)
                                                 File "/home/g4570n/.local/lib/python3.5/site-packages/castero/display.py", line 99, in __init__
                                                                    self._load_perspectives()
               File "/home/g4570n/.local/lib/python3.5/site-packages/castero/display.py", line 163, in _load_perspectives
                                             inst = p_cls(self)
                                                               TypeError: Can't instantiate abstract class Primary with abstract methods update_menus

UI corruptions caused by mpv

Some files cause mpv to paint (unhelpful) warnings, and maybe also errors, over the castero interface (see screenshots). I have most warnings disabled in my mpv config, if that matters.

Steps to Reproduce

Podcast 1

  1. Add the following podcast feed to castero: https://anchor.fm/s/840a38c/podcast/rss
  2. Play the first episode:
    2019-11-17-1573948111

Podcast 2

I found a podcast where this behavior is even more severe (but it has glitches all over, e.g. it displays some characters weirdly in the metadata field, so it might be not something fixable from castero).

  1. Add the following podcast feed: http://feeds.feedburner.com/CoolGamesInc?format=xml
  2. Play the first episode
  3. Scroll around a bit, and watch the interface glitch out
    2019-11-17-1573948266

System info

I'm running mpv and castero from git master, in kitty terminal.

Documentation Clarification

In castero.conf it should be clarified that custom_download_dir is relative to home directory.
I tried ~/Podcasts & $HOME/Podcasts which respectively created /home/USER/~/Podcasts and /home/USER/$HOME/Podcasts.

ex.

[downloads]
# The location to save episodes downloaded for offline playback. Set to blank
# or whitespaces to disable -- the client will default to either $XDG_DATA_DIR,
# if set, otherwise ~/.local/share/castero/downloaded
# Note: this is relative to your home directory - to use ~/Podcasts set to Podcasts.
# default: (blank)
custom_download_dir = 

Split feeds into individual files

Putting all the feeds in one file creates a few of problems:

  • The file is completely rewritten from scratch during reload even if only a single feed is updated, causing extra wear on the type of flash devices that commonly exist on the types of machines that you might want a CLI podcast client on
  • You can't selectively load parts of the file (at least using the standard json implementation), so if you have a large number of feeds with a large number of episodes, you load up megabytes of data you're never actually going to look at in the client

Crashes when feed item lacks audio

Hello,

First, thanks for working on this app, I love the simple interface!

My problem is that if there happens to be a "news item" in a feed that contains no audio file, the application will crash.

For instance I listed to Software Engineering Radio. There are a few items that come up in their feed like this:

https://www.se-radio.net/2018/03/seeking-a-new-volunteer-host/

Attempting to download this "episode" will cause a crash. Here is a sample paste of some of the output. It is hard to grab all of it as the errors scroll:

https://is.gd/dBtmWK

Let me know if I can provide any more info.

Cheers

SyntaxError on first run

After a brand new install via pip3 or source code i get this error:

root@26a84df338cf:~# pip3 install castero
Requirement already satisfied: castero in /usr/local/lib/python3.5/dist-packages/castero-0.5.3-py3.5.egg
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.5/dist-packages/beautifulsoup4-4.7.1-py3.5.egg (from castero)
Requirement already satisfied: cjkwrap in /usr/local/lib/python3.5/dist-packages/CJKwrap-2.2-py3.5.egg (from castero)
Requirement already satisfied: python-mpv in /usr/local/lib/python3.5/dist-packages/python_mpv-0.3.9-py3.5.egg (from castero)
Requirement already satisfied: python-vlc in /usr/local/lib/python3.5/dist-packages/python_vlc-3.0.4106-py3.5.egg (from castero)
Requirement already satisfied: requests in /usr/local/lib/python3.5/dist-packages/requests-2.21.0-py3.5.egg (from castero)
Requirement already satisfied: soupsieve>=1.2 in /usr/local/lib/python3.5/dist-packages/soupsieve-1.8-py3.5.egg (from beautifulsoup4->castero)
  Ignoring backports.functools-lru-cache: markers 'python_version < "3"' don't match your environment
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.5/dist-packages/certifi-2019.3.9-py3.5.egg (from requests->castero)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.5/dist-packages/chardet-3.0.4-py3.5.egg (from requests->castero)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.5/dist-packages/idna-2.8-py3.5.egg (from requests->castero)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.5/dist-packages/urllib3-1.24.1-py3.5.egg (from requests->castero)
root@26a84df338cf:~# castero
Traceback (most recent call last):
  File "/usr/local/bin/castero", line 11, in <module>
    load_entry_point('castero==0.5.3', 'console_scripts', 'castero')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.5/dist-packages/castero-0.5.3-py3.5.egg/castero/__main__.py", line 9, in <module>
    from castero.database import Database
  File "/usr/local/lib/python3.5/dist-packages/castero-0.5.3-py3.5.egg/castero/database.py", line 7, in <module>
    from castero.episode import Episode
  File "/usr/local/lib/python3.5/dist-packages/castero-0.5.3-py3.5.egg/castero/episode.py", line 246
    f"\cb{self.title}\n" \
                       ^
SyntaxError: invalid syntax

Empty description crashes castero

If you add a podcast without description, the program will crash if you try to select it (or if is the only one).

Example: http://podcasts.joerogan.net/feed/rss

description = description.replace('\n', '')
AttributeError: 'NoneType' object has no attribute 'replace'

I messed with the SQLite database and I found that, if the field is NULL, then this error happens. An empty string makes the error go away, and OFC, proper description works aswell.

runtime dependency on python-vlc

Castero (0.41) still requires python-vlc when run with only python-mpv dependency met.

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/castero", line 11, in <module>
    load_entry_point('castero==0.4.1', 'console_scripts', 'castero')()
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python3.6/site-packages/castero/__main__.py", line 83, in <module>
    main()
  File "/usr/lib64/python3.6/site-packages/castero/__main__.py", line 56, in main
    display = Display(stdscr, feeds)
  File "/usr/lib64/python3.6/site-packages/castero/display.py", line 94, in __init__
    self._load_players()
  File "/usr/lib64/python3.6/site-packages/castero/display.py", line 161, in _load_players
    p_mod = importlib.import_module("castero.players.%s" % name)
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib64/python3.6/site-packages/castero/players/vlcplayer.py", line 3, in <module>
    import vlc
ModuleNotFoundError: No module named 'vlc'

config has player = mpv set.

mpv ModuleNotFoundError

I have mpv and libmpv1 installed and can play audio with it directly, but trying to play a file from within castero crashes with the following error:

Traceback (most recent call last):
  File "/usr/local/bin/castero", line 6, in <module>
    from castero.__main__ import main usr/local/lib/python3.5/dist-packages/castero/__main__.py", line 79, in <module> main()
  File "/usr/local/lib/python3.5/dist-packages/castero/__main__.py", line 74, in main
    running = display.handle_input(char)
  File "/usr/local/lib/python3.5/dist-packages/castero/display.py", line 439, in handle_input
    return self._get_active_perspective().handle_input(c)
  File "/usr/local/lib/python3.5/dist-packages/castero/perspectives/primaryperspective.py", line 157, in handle_input
    self._create_player_from_selected()
  File "/usr/local/lib/python3.5/dist-packages/castero/perspectives/primaryperspective.py", line 261, in _create_player_from_selected
    episode.get_playable(), episode)
  File "/usr/local/lib/python3.5/dist-packages/castero/player.py", line 94, in create_instance
    available_players[av_player].check_dependencies()
  File "/usr/local/lib/python3.5/dist-packages/castero/players/mpvplayer.py", line 31, in check_dependencies
    ModuleNotFoundError): NameError: name 'ModuleNotFoundError' is not defined

It looks like castero doesn't know how to find mpv. How can I fix this?

Support 16 terminal colors (i.e. bright color variants)

I'm pretty sure there is more colors available in a color theme than just "black, blue, cyan, green, magenta, red, white, yellow". For example, cmus (which is also curses-based) supports bright variants of said colors, e.g. light-yellow. I think most themes I've seen also define 16 colors (see e.g. nord). The fix for this seems pretty simple (just add more names to COLOR_NAMES in https://github.com/xgi/castero/blob/master/castero/display.py), so I might make a PR if I dig castero (just discovered it). EDIT: used it for a bit, great app, just what I needed.

Help message not consistent with keys in castero.conf

I have navigation bound to j, k, l, h and help to H, but the help msg displays the defaults.

  Commands                                                                                                                                                                                 
        h            - show this help screen                                                                                                                                                 
        q            - exit the client                                                                                                                                                       
        a            - add a feed                                                                                                                                                            
        d            - delete the selected feed                                                                                                                                              
        r            - reload/refresh feeds                                                                                                                                                  
        s            - save episode for offline playback                                                                                                                                     
        arrows       - navigate menus                                                                                                                                                        
        page up/down - scroll menus                                                                                                                                                          
        enter        - play selected feed/episode                                                                                                                                            
        space        - add selected feed/episode to queue                                                                                                                                    
        c            - clear the queue                                                                                                                                                       
        n            - go to the next episode in the queue                                                                                                                                   
        i            - invert the order of the menu                                                                                                                                          
        p or k       - pause/play the current episode                                                                                                                                        
        f or l       - seek forward                                                                                                                                                          
        b or j       - seek backward    

It's not consistent with the keybindings I defined in castero.conf.

Remove html from podcast metadata

If the metadata of a podcast entry contains html (e.g. images) it should be removed. The metadata should only contain pure text

At the moment it is looking like the following:
castero_html_metadata

Feeds that remove episodes

Hey there,

Is there currently any way to support/deal with feeds that remove episodes? For example, I have a feed that only has the latest 5 episodes. I download the episodes for archival purposes, but as soon as they disappear from the feed, they are removed from castero's display, even if downloaded. Is there any way to keep such episodes appearing in the list, or am I out of luck here? Thanks!

EDIT Totally missed the retain_absent_episodes option - silly me!

Installation fails (pympv error)

I tried to install it with pip3 install castero and also via git, every time I get the following error:

no@x60:~/castero$ sudo python setup.py install
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing requirements to castero.egg-info/requires.txt
writing castero.egg-info/PKG-INFO
writing top-level names to castero.egg-info/top_level.txt
writing dependency_links to castero.egg-info/dependency_links.txt
writing entry points to castero.egg-info/entry_points.txt
package init file 'castero/perspectives/__init__.py' not found (or not a regular file)
package init file 'castero/players/__init__.py' not found (or not a regular file)
package init file 'castero/menus/__init__.py' not found (or not a regular file)
reading manifest file 'castero.egg-info/SOURCES.txt'
writing manifest file 'castero.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/castero
creating build/bdist.linux-i686/egg/castero/templates
copying build/lib.linux-i686-2.7/castero/templates/castero.conf -> build/bdist.linux-i686/egg/castero/templates
copying build/lib.linux-i686-2.7/castero/templates/feeds -> build/bdist.linux-i686/egg/castero/templates
copying build/lib.linux-i686-2.7/castero/__main__.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/episode.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/downloadqueue.py -> build/bdist.linux-i686/egg/castero
creating build/bdist.linux-i686/egg/castero/menus
copying build/lib.linux-i686-2.7/castero/menus/episodemenu.py -> build/bdist.linux-i686/egg/castero/menus
copying build/lib.linux-i686-2.7/castero/datafile.py -> build/bdist.linux-i686/egg/castero
creating build/bdist.linux-i686/egg/castero/perspectives
copying build/lib.linux-i686-2.7/castero/perspectives/queuelisting.py -> build/bdist.linux-i686/egg/castero/perspectives
copying build/lib.linux-i686-2.7/castero/perspectives/primary.py -> build/bdist.linux-i686/egg/castero/perspectives
copying build/lib.linux-i686-2.7/castero/__init__.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/config.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/perspective.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/player.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/display.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/feed.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/helpers.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/menu.py -> build/bdist.linux-i686/egg/castero
copying build/lib.linux-i686-2.7/castero/feeds.py -> build/bdist.linux-i686/egg/castero
creating build/bdist.linux-i686/egg/castero/players
copying build/lib.linux-i686-2.7/castero/players/vlcplayer.py -> build/bdist.linux-i686/egg/castero/players
copying build/lib.linux-i686-2.7/castero/players/mpvplayer.py -> build/bdist.linux-i686/egg/castero/players
copying build/lib.linux-i686-2.7/castero/queue.py -> build/bdist.linux-i686/egg/castero
byte-compiling build/bdist.linux-i686/egg/castero/__main__.py to __main__.pyc
byte-compiling build/bdist.linux-i686/egg/castero/episode.py to episode.pyc
  File "build/bdist.linux-i686/egg/castero/episode.py", line 16
    pubdate=None, copyright=None, enclosure=None) -> None:
                                                  ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/downloadqueue.py to downloadqueue.pyc
  File "build/bdist.linux-i686/egg/castero/downloadqueue.py", line 12
    def __init__(self, display=None) -> None:
                                     ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/menus/episodemenu.py to episodemenu.pyc
  File "build/bdist.linux-i686/egg/castero/menus/episodemenu.py", line 4
    def __init__ (self, window, feeds, child = None, active = False) -> None:
                                                                     ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/datafile.py to datafile.pyc
  File "build/bdist.linux-i686/egg/castero/datafile.py", line 28
    def __init__(self, path, default_path) -> None:
                                           ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/perspectives/queuelisting.py to queuelisting.pyc
  File "build/bdist.linux-i686/egg/castero/perspectives/queuelisting.py", line 18
    def __init__(self, display) -> None:
                                ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/perspectives/primary.py to primary.pyc
  File "build/bdist.linux-i686/egg/castero/perspectives/primary.py", line 19
    def __init__(self, display) -> None:
                                ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/castero/config.py to config.pyc
  File "build/bdist.linux-i686/egg/castero/config.py", line 34
    def __init__(self) -> None:
                       ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/perspective.py to perspective.pyc
  File "build/bdist.linux-i686/egg/castero/perspective.py", line 44
    def create_windows(self) -> None:
                             ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/player.py to player.pyc
  File "build/bdist.linux-i686/egg/castero/player.py", line 29
    def __init__(self, title, path, episode) -> None:
                                             ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/display.py to display.pyc
  File "build/bdist.linux-i686/egg/castero/display.py", line 63
    def __init__(self, stdscr, feeds) -> None:
                                      ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/feed.py to feed.pyc
  File "build/bdist.linux-i686/egg/castero/feed.py", line 45
    def __init__(self, url=None, file=None, **kwargs) -> None:
                                                      ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/helpers.py to helpers.pyc
  File "build/bdist.linux-i686/egg/castero/helpers.py", line 4
    def third(n) -> int:
                 ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/menu.py to menu.pyc
  File "build/bdist.linux-i686/egg/castero/menu.py", line 15
    def __init__(self, window, items, child=None, active=False) -> None:
                                                                ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/feeds.py to feeds.pyc
  File "build/bdist.linux-i686/egg/castero/feeds.py", line 28
    def __init__(self) -> None:
                       ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/players/vlcplayer.py to vlcplayer.pyc
  File "build/bdist.linux-i686/egg/castero/players/vlcplayer.py", line 13
    def __init__(self, title, path, episode) -> None:
                                             ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/players/mpvplayer.py to mpvplayer.pyc
  File "build/bdist.linux-i686/egg/castero/players/mpvplayer.py", line 12
    def __init__(self, title, path, episode) -> None:
                                             ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/castero/queue.py to queue.pyc
  File "build/bdist.linux-i686/egg/castero/queue.py", line 12
    def __init__(self) -> None:
                       ^
SyntaxError: invalid syntax

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

Installed /usr/local/lib/python2.7/dist-packages/castero-0.4.0-py2.7.egg
Processing dependencies for castero==0.4.0
Searching for pympv
Reading https://pypi.python.org/simple/pympv/
Downloading https://files.pythonhosted.org/packages/be/6f/ba227d7626ca3611aa350d577f01940002e079d4ca9cad976a9313b0aa7e/pympv-0.6.0.tar.gz#sha256=e364ecc21bc9d438d2902d989767a2d00d70958466154dd9c6a1e395f0ea67b0
Best match: pympv 0.6.0
Processing pympv-0.6.0.tar.gz
Writing /tmp/easy_install-Cvsk0W/pympv-0.6.0/setup.cfg
Running pympv-0.6.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Cvsk0W/pympv-0.6.0/egg-dist-tmp-iZUOhx
mpv.c:585:24: fatal error: mpv/render.h: No such file or directory
 #include "mpv/render.h"
                        ^
compilation terminated.
error: Setup script exited with error: command 'i686-linux-gnu-gcc' failed with exit status 1

Trying to install pympv leads to:

no@x60:~$ sudo pip3 install pympv
Collecting pympv
  Using cached https://files.pythonhosted.org/packages/be/6f/ba227d7626ca3611aa350d577f01940002e079d4ca9cad976a9313b0aa7e/pympv-0.6.0.tar.gz
Building wheels for collected packages: pympv
  Running setup.py bdist_wheel for pympv ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4b2j4biu/pympv/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpvjjns0d2pip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_ext
  building 'mpv' extension
  creating build
  creating build/temp.linux-i686-3.5
  i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-F5oRAB/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c mpv.c -o build/temp.linux-i686-3.5/mpv.o
  mpv.c:585:24: fatal error: mpv/render.h: No such file or directory
   #include "mpv/render.h"
                          ^
  compilation terminated.
  error: command 'i686-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pympv
  Running setup.py clean for pympv
Failed to build pympv
Installing collected packages: pympv
  Running setup.py install for pympv ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4b2j4biu/pympv/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qs5ca33e-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'mpv' extension
    creating build
    creating build/temp.linux-i686-3.5
    i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-F5oRAB/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c mpv.c -o build/temp.linux-i686-3.5/mpv.o
    mpv.c:585:24: fatal error: mpv/render.h: No such file or directory
     #include "mpv/render.h"
                            ^
    compilation terminated.
    error: command 'i686-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4b2j4biu/pympv/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qs5ca33e-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-4b2j4biu/pympv/

Any suggestions?

Running Error Traceback

After a 'successful' install, running castero from cmd runs this error. I've tried both pip install and manual clone from Git hub, both calling this same error. Running Windows 10, what can I do?

Traceback (most recent call last): File "C:\Python34\Scripts\castero-script.py", line 9, in <module> load_entry_point('castero==0.4.1', 'console_scripts', 'castero')() File "C:\Python34\lib\site-packages\pkg_resources.py", line 353, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "C:\Python34\lib\site-packages\pkg_resources.py", line 2302, in load_entry_point return ep.load() File "C:\Python34\lib\site-packages\pkg_resources.py", line 2029, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "C:\Python34\lib\site-packages\castero-0.4.1-py3.4.egg\castero\__main__.py", line 1, in <module> import curses File "C:\Python34\lib\curses\__init__.py", line 13, in <module> from _curses import * ImportError: No module named '_curses'

feature request: played status

Hi,

I am currently subscribed to 47 feeds with 5919 total episodes. I love using castero on my laptop to listen to these podcasts, but not being able to see which episodes have already been played makes it difficult sometimes.

Especially because I just started really getting into castero, but have already listened to hundreds of these episode.

So I was wondering if there will be a feature in the future that will mark unplayed/played status (or perhaps an option to toggle displaying all episodes or unplayed only, or perhaps both option combined)?

Thanks in advance.

can not run castero

hi
i install castero with this command
pip3 install castero
but
castero zsh: command not found: castero

i use zsh and kbuntu 19.10

Reconsider player library dependencies for non-PyPI installations

First of all, I do consider it to be an issue if users would have to install the binaries for every player that castero supports (mpv, vlc, potentially more). However, it is important to clarify that there is a difference between the Python libraries which I use to interact with these applications, and the applications themselves. castero can run and work perfectly fine with just one of these players installed; I don't personally have vlc on my system, except when I'm using it for testing.

At this point I'd like to say that the only "officially supported" way to install castero is with pip, which is partly for this reason. When you install castero with pip, it does require that the libraries used to interact with the players are installed. This is mostly a convenience thing, because these libraries themselves are very small and having them all downloaded by default means the user doesn't have to manually install these libraries if they decide to separately install vlc and change their config to use that instead.

The issue comes with package managers, which have their own dependency chains. The castero AUR package, which I do not maintain, defines python-vlc (the small Python library) as a dependency. Installing that package, however, does require you to download vlc. Which I agree is problematic for users who don't want to install vlc (myself included).

I'm not sure the best solution to this. The main concern I have with making all of the libraries optional is that it adds an additional step to the castero installation process, which is to manually install some other library to actually use the client (and you'd also have to do that if you ever want to switch players). I could potentially have a prompt either on first-run or if no players were detected to tell the user to go install one. But again, I really don't like increasing the friction from installing castero to actually using it.

Originally posted by @rien333 in #29 (comment)

External downloader script

Noting this here just to track thoughts if anyone has any before I go off and implement things...

It would be nice if the installation included a non-interactive downloader that could be called from cron to handle periodic downloading of new episodes outside of when you were running the UI.

Feature Request: OPML Import

I have a lot of podcasts in a different app which would be nice to import en masse. I wonder if OPML import (and maybe export) could be implemented?

User-specified metadata on feeds

It would be nice to have the ability to store user-specified metadata on the feeds when they're persisted to disk. This would allow for things like an external downloader (for example.. :-)) to look at the Feed object and see if the user has set a custom schedule (why try to download new data 4 times a day when it's a weekly podcast that almost always comes out on mondays, or something).

Possibly also we could allow for some notes to be set that might optionally also show up in the UI, based on user configuration, or any number of other prospective use cases. You could imagine also wanting this for Episodes, if users wanted to take their own notes per episode, or subject-matter tags, etc. Even if the UI didn't really show these things, then you could write some custom scripts to find episodes based on a tag later when you wanted to dig them up.

Install issue - missing 'perspectives' directory

I'm installing this via archlinux PKGBUILD, which does a fairly simple python setup.py install --root="$pkgdir/" --optimize=1 (see https://aur.archlinux.org/packages/castero-git/).

The issue that I'm seeing is that the 'perspectives' directory doesn't get created under the installation directory, which causes castero to bomb as soon as a key is pressed.

Looking through your setup.py - is it possible you need to add the 'perspectives' directory to the package_data, i.e. here?:

    package_data={
        'castero': ['templates/*'],
},

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.