diff options
Diffstat (limited to 'blog/2022-07-25-curseradio.org')
-rw-r--r-- | blog/2022-07-25-curseradio.org | 173 |
1 files changed, 94 insertions, 79 deletions
diff --git a/blog/2022-07-25-curseradio.org b/blog/2022-07-25-curseradio.org index 9dc6b67..351c4b9 100644 --- a/blog/2022-07-25-curseradio.org +++ b/blog/2022-07-25-curseradio.org @@ -1,99 +1,114 @@ -+++ -date = 2022-07-25 -title = "CurseRadio: Listening to the Radio on the Command Line" -description = "A quick and easy installation for CurseRadio on Fedora Linux." -+++ - -## Overview - -While exploring some interesting Linux applications, I stumbled across -[curseradio](https://github.com/chronitis/curseradio), a command-line radio -player based on Python. - -This application is fantastic and incredibly easy to install, so I wanted to -dedicate a post today to this app. Let's look at the features within the app and -then walk through the installation process I took to get `curseradio` working. - -## Features - - - -The radio player itself is quite minimal. As you can see in the screenshot -above, it contains a simple plaintext list of all available categories, which -can be broken down further and further. In addition, radio shows are available -for listening, alongside regular radio stations. - -For example, the `Sports` > `Pro Basketball` > `Shows` category contains a -number of specific shows related to Professional Basketball. - -Aside from being able to play any of the listed stations/shows, you can make -a channel your favorite by pressing `f`. -It will now show up at the top of the radio player in the `Favourites` category. - -### Commands/Shortcuts - -| 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 | - -## Installation - -### Dependencies - -Before installing `curseradio`, a handful of system and Python packages are -required. To get started, install `python3`, `pip3`, and `mpv` on your system. -In this example, I'm using Fedora Linux, which uses the `dnf` package manager. -You may need to adjust this if you're using a different system. - -```sh +#+title: CurseRadio: Listening to the Radio on the Command Line +#+date: 2022-07-25 + +** Overview +:PROPERTIES: +:CUSTOM_ID: overview +:END: +While exploring some interesting Linux applications, I stumbled across +[[https://github.com/chronitis/curseradio][curseradio]], a command-line +radio player based on Python. + +This application is fantastic and incredibly easy to install, so I +wanted to dedicate a post today to this app. Let's look at the features +within the app and then walk through the installation process I took to +get =curseradio= working. + +** Features +:PROPERTIES: +:CUSTOM_ID: features +:END: +#+caption: curseradio +[[https://img.cleberg.net/blog/20220725-curseradio/curseradio.png]] + +The radio player itself is quite minimal. As you can see in the +screenshot above, it contains a simple plaintext list of all available +categories, which can be broken down further and further. In addition, +radio shows are available for listening, alongside regular radio +stations. + +For example, the =Sports= > =Pro Basketball= > =Shows= category contains +a number of specific shows related to Professional Basketball. + +Aside from being able to play any of the listed stations/shows, you can +make a channel your favorite by pressing =f=. It will now show up at the +top of the radio player in the =Favourites= category. + +*** Commands/Shortcuts +:PROPERTIES: +:CUSTOM_ID: commandsshortcuts +:END: +| 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 | + +** Installation +:PROPERTIES: +:CUSTOM_ID: installation +:END: +*** Dependencies +:PROPERTIES: +:CUSTOM_ID: dependencies +:END: +Before installing =curseradio=, a handful of system and Python packages +are required. To get started, install =python3=, =pip3=, and =mpv= on +your system. In this example, I'm using Fedora Linux, which uses the +=dnf= package manager. You may need to adjust this if you're using a +different system. + +#+begin_src sh sudo dnf install python3 pip3 mpv -``` +#+end_src -Next, use `pip3` to install `requests`, `xdg`, and `lxml`: +Next, use =pip3= to install =requests=, =xdg=, and =lxml=: -```sh +#+begin_src sh pip3 install requests xdg lxml -``` +#+end_src -### Repository Source Installation +*** Repository Source Installation +:PROPERTIES: +:CUSTOM_ID: repository-source-installation +:END: +Once all the dependencies are installed, we can clone the source code +and enter that directory: -Once all the dependencies are installed, we can clone the source code and enter -that directory: - -```sh +#+begin_src sh git clone https://github.com/chronitis/curseradio && cd curseradio -``` +#+end_src -Once you're within the `curseradio` directory, you can install the application -with the provided `setup.py` script. +Once you're within the =curseradio= directory, you can install the +application with the provided =setup.py= script. -```sh +#+begin_src sh sudo python3 setup.py install -``` +#+end_src -In my case, I ran into a few errors and needed to create the folders that -curseradio wanted to use for its installation. If you don't get any errors, you -can skip this and run the app. +In my case, I ran into a few errors and needed to create the folders +that curseradio wanted to use for its installation. If you don't get any +errors, you can skip this and run the app. -```sh +#+begin_src sh sudo mkdir /usr/local/lib/python3.10/ sudo mkdir /usr/local/lib/python3.10/site-packages/ -``` +#+end_src -```sh +#+begin_src sh sudo chown -R $USER:$USER /usr/local/lib/python3.10/ -``` - -## Run the Application +#+end_src +** Run the Application +:PROPERTIES: +:CUSTOM_ID: run-the-application +:END: Once fully installed without errors, you can run the application! -```sh +#+begin_src sh python3 /usr/local/bin/curseradio -``` +#+end_src |