Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to class #2

Open
emibcn opened this issue Oct 20, 2018 · 0 comments
Open

Convert to class #2

emibcn opened this issue Oct 20, 2018 · 0 comments
Assignees

Comments

@emibcn
Copy link
Owner

emibcn commented Oct 20, 2018

Use real OOP instead of structural programming inside a class :/

@emibcn emibcn self-assigned this Oct 20, 2018
emibcn added a commit that referenced this issue Oct 28, 2018
WIP #2 - Use real OOP:
- Switch from distributed `exit()` & `print()` to `raise` own exceptions and only print on `main()` and exit if `__main__` or in `signal_handler`
- Move args to `Rac1` member, possibly assigned on instantiation
- Separate class method to allow easy command line player overriding
- Allow to change class used on main to allow easy overriding
- Better functions & methods naming
emibcn added a commit that referenced this issue Nov 11, 2018
emibcn added a commit that referenced this issue Nov 11, 2018
emibcn added a commit that referenced this issue Nov 11, 2018
emibcn added a commit that referenced this issue Nov 11, 2018
emibcn added a commit that referenced this issue Nov 11, 2018
emibcn added a commit that referenced this issue Nov 11, 2018
WIP #2 - Use generators and some other improvements
- Fix some comments and strings
- Add option to only print URL of filtered podcasts
- Mark some class members as private
- Add podcast data cache
- Use internal date instead of taking it from parameter
- Discard parsing pages once all have been obtained
- Simplify page data parser
- Use generators `(x for x in whatever)` and `yield` wherever possible
emibcn added a commit that referenced this issue Nov 11, 2018
…hich:

- Cycles over downloaded and filtered podcasts
- Retries the list once finished listening (looking for new podcasts)
- Yields the podcasts that should be listened/printed
emibcn added a commit that referenced this issue Nov 11, 2018
…lasses:

- Rac1: Handles podcasts list
- PlayerCommand: Abstracts playing a podcast using a command
- MPlayerCommand: Plays a podcast using MPlayer command
emibcn added a commit that referenced this issue Nov 11, 2018
emibcn added a commit that referenced this issue Nov 11, 2018
- Parser: Parses data from servers
- Filter: Filters parsed data from server with arguments and exposes the autoreloaded podcast generator
emibcn added a commit that referenced this issue Nov 11, 2018
WIP #2 - Pop class method `get_page` and separate Rac1 class into 4 classes:
- Parser: Parses data from servers
- Filter: Filters parsed data from server with arguments and exposes the autoreloaded podcast generator
- PlayerCommand: Abstracts playing a podcast using a command
- MPlayerCommand: Plays a podcast using MPlayer command
emibcn added a commit that referenced this issue Nov 11, 2018
… `__get_attr__` to serve ConfigArgParse results
emibcn added a commit that referenced this issue Nov 12, 2018
- Parser: caller method to easily get a date's UUIDs generator
- Filter: Generator methods to operate on parser's generator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant