Skip to content

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
- Use new HTML parser that doesn't rely on third-party libraries.
- Normalize output to lower-case.
  • Loading branch information
rafikdraoui committed Jul 22, 2023
1 parent cb8eee1 commit ba7112c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 34 deletions.
56 changes: 23 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
# nova-playlist

[Radio Nova][0] plays amazing music at night.
[Radio Nova][] plays amazing music at night.

There could be Fela Kuti, then hip-hop from the 1990s, then Motown, then Tuareg
music, then some minimal electro, then Hungarian folk songs, then David Bowie,
then Amazonian cumbia, then a French song that was released last month, then
Sufi devotional music from Punjab, then Nina Simone, then a tune from the
north-east of Brazil. It's wild.
There could be Fela Kuti, then hip-hop from the 1990s, then Motown, then Tuareg music, then some minimal electro, then Hungarian folk songs, then David Bowie, then Amazonian cumbia, then a French song that was released last month, then Sufi devotional music from Punjab, then Nina Simone, then a tune from the north-east of Brazil.
It's wild.

And if you, like me, live a few time zones west of Paris, you get to
conveniently enjoy it all in the evening instead of having to be up in the
middle of the night!

Often, I want to know which song is currently playing, so that I can find out
more about it and the artist. There is a [page][1] where one can find what
music has aired on the Radio in the past, but it's buggy and a bit annoying to
use. And even if the page was great to use, it wouldn't be as great as using
the command line for it! _Ergo_ this little script.
And if you, like me, live a few time zones west of Paris, you get to conveniently enjoy it all in the evening instead of having to be up in the middle of the night!

Often, I want to know which song is currently playing, so that I can find out more about it and the artist.
There is a [page][song-history] where one can find what music has aired on the Radio in the past, but it's buggy and a bit annoying to use.
And even if the page was great to use, it wouldn't be as great as using the command line for it!
_Ergo_ this little program.

## Installation

pipx install nova-playlist

Or use `pip`.

Python 3.9 is required, along with a IANA timezone database on your system
(Unix-y systems should have that already, otherwise you can try installing
`tzdata` from PyPI.)
The package is available on the Python Package Index (PyPI) as [nova-playlist][].
The recommended way of installing it is with [pipx][].

Python 3.9 or above is required, along with a IANA timezone database on your system.
Unix-y systems should alreay have it, otherwise you can try installing `tzdata` from PyPI.

## Usage

Expand All @@ -39,8 +29,8 @@ Python 3.9 is required, along with a IANA timezone database on your system
20:23 Brigitte Fontaine - Le Goudron
...

By default, the times are in the "Canada/Atlantic" time zone. If you want them
in another time zone, you can pass the `-t`/`--timezone` argument:
By default, the times are in the "Canada/Atlantic" time zone.
If you want them in another time zone, you can pass the `-t`/`--timezone` argument:

$ nova -t Europe/Berlin
03:12 Los Camperos De Valles - El Gallo
Expand All @@ -49,15 +39,15 @@ in another time zone, you can pass the `-t`/`--timezone` argument:
02:59 The Toraia Orchestra Of Algiers - Nar Houbi Techaal
...


## Caveat

This can be somewhat brittle. Sometimes, the data stops being updated on the
site. Or the data gets updated, but the timestamps are 11 minutes off from
what's playing in the stream. And of course, if they ever change their HTML
structure in any way, this could also start failing miserably. But so far, so
good!

This can be somewhat brittle.
Sometimes, the data stops being updated on the site.
Or the data gets updated, but the timestamps are 11 minutes off from what's playing in the stream.
Finally, if Radio Nova changes their HTML structure in any way, this could start failing miserably.
But so far, so good!

[0]: https://www.nova.fr/radios/nova-la-nuit/
[1]: https://www.nova.fr/radios/radio-nova/
[Radio Nova]: https://www.nova.fr/radios/nova-la-nuit/
[nova-playlist]: https://pypi.org/project/nova-playlist/
[pipx]: https://pypa.github.io/pipx/
[song-history]: https://www.nova.fr/radios/radio-nova/
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nova-playlist"
version = "0.3.0"
version = "0.4.0"
description = "Display information about the songs that recently played on Radio Nova"
authors = ["Rafik Draoui <rafik@rafik.ca>"]
license = "MIT"
Expand Down

0 comments on commit ba7112c

Please sign in to comment.