pyradio

Post links to your 64bit module repos here. Repo maintainers are responsible for resolving any issues caused by their xzm's.
vinnie
Shogun
Shogun
Posts: 210
Joined: 13 Jun 2024, 08:25
Distribution: alpine

pyradio

Post#1 by vinnie » 17 Jun 2024, 08:39

PyRadio version: 0.9.3.9

MODULE
version 1
https://oshi.at/Zudx 9.6mb
SHA1 Hashsum 4ccbfddc5ede9bc09c6d78a5a3a249cf68bec959

version 2
https://oshi.at/HkqJ 5.5mb
SHA1 Hashsum 500797cc2942a5c7f4405a1ba8d7834d870e4f10


UPDATE FOR VERSION 2
I tried compressing the package by removing all the precompiled .pyc and docs.
I've also tried putting /usr/share/applications/pyradio.desktop and adapting it, however in my menu it doesn't show up, it miss some triggers? don't know
Yes, now it's possible to see the iitem in the menus after logging out and logging in, I don't know why it doesn't show up when mounting the module.


INFO
It is a python application for listening to radios, it uses third-party players (mpv, mplayer or vlc, mpv is already by default in porteus).
Salix (slapt-mod) repo have it but is the pipy version which is no longer updated.

It is my first package so it should be considered experimental, however I am using it and it seems to work.
Here is more or less what I did:
1) created a virtual env with python
2) installed the dependencies with pip (rich requests dnspython psutil netifaces2 python-dateutil)
3) started the installer with python3
4) recreated the porteus structure manually by correcting lib to lib64, bin to usr/bin and the doc inside usr
5) dir2xzm to create the package

NOTES TO REPORT
- pyradio.desktop is missing, the installer generated it but put it in ~/.local/sharere/applications so I didn't know how to edit it and didn't put it.
- as I already said I also put the man and docs, you can always remove them later, now it was to not think about it

SHORT HOWTO
The player has a reasonable amount of controls, when you first run it, it starts with default stations, pressing "O" opens the list of online stations and with "s" the search.
With other sets of keys you can save stations to the default initial list.
The default stations end up in the file ~/.config/pyradio/stations.csv.

SHOOT
Image

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

pyradio

Post#2 by dreadbird » 14 Jan 2025, 18:05

Hi any chance you could update the links? was going to try it out

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

pyradio

Post#3 by dreadbird » 15 Jan 2025, 23:43

Pyradio 0.9.3.11.3 xzm for porteus

https://drive.google.com/file/d/1nBmI5- ... sp=sharing
sha1sum 89cf23cb7b40f2ffe6babbc2e6302497d78eda69

cd home/guest/.local/bin/pyradio

./pyradio to run


Managed to get the icon in the start menu. :good:

the desktop icon is in
/home/guest/.local/share/applications/
/usr/share/application/


manpages included in /home/guest/.local/share/man/man1/


Or if you prefer to leave it in the /Download folder in its own environment (all libraries are in Download)

pyradio 0.9.3.11.3.tar.gz extract in Download folder
https://drive.google.com/file/d/1TsWMAV ... sp=sharing
sha1sum 1853d552d4e50e95bf676eeb77f70da8e5099157

Extract the tarball to pyradio0.9.3.11.3 directory in /Downloads/
Pull the icon in /Downloads/pyradio0.9.3.11.3/ to desktop

you can launch from there or

cd /Downloads/pyradio0.9.3.11.3/myenv/bin/

./pyradio

With this tarball you have to keep it in /Downloads/pyradio0.9.3.11.3/

if you want to change that location go to /home/guest/Downloads/pyradio-0.9.3.11.3/myenv/bin/pyradio

edit #!/home/guest/Downloads/pyradio-0.9.3.11.3/myenv/bin/python

and change it to the new directory. also update the .desktop file then move /home/guest/Downloads/pyradio-0.9.3.11.3/
to where you want it.

Configuring

It it setup with default stations. if you want to add station pls links edit the stations.csv

pyradio will automatically creates /home/guest/.config/pyradio/ with the config files stations.csv

you can add .pls to that file (link from soma)

or search for any radio station url and paste


from inside pyradio to add radio links

press a to add station url press ok
press s to save changes


How to install by building yourself pyradio 0.9.3.9

Build in virtual environment

Activate 05devel.xzm

download source
https://github.com/coderholic/pyradio/r ... ag/0.9.3.9

extract in downloads and open terminal in that location

python3 -m venv myenv

source myenv/bin/activate

The above commands create a virtual environment for pyradio install


python3 -m pip install -r requirements_pipx.txt

Code: Select all

curl -L https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py \               
    -o install.py
python3 install.py

deactivate <----- deactivate the virtual environment



A menu icon will be installed and pyradio will be in /Downloads/pyradio-0.9.3.9/myenv/bin


pyradio requires a virtual environment to install. so pretty much what this does is to prevent the install from botching a system library. so the install directory has all the necessary libraries to run the application.
you keep the pyradio in your Downloads folder to keep it simple.



Building pyradio (Without a virtual environment)
this is what I did to make the .xzm

source code
https://github.com/coderholic/pyradio/r ... 0.9.3.11.3

set the path variable

export PATH=$PATH":~/.local/bin:/home/guest/.local/bin"


you need to use pip to build pyradio
It is not by default on the user python modules. as default user do the following.

You can install it by bootstraping from the library

python3 -m ensurepip --default-pip

https://packaging.python.org/en/latest/ ... -packages/
if you want to read more about python modules


drop into the source code directory and run
python3 -m pip install -r requirements_pipx.txt

this will install all the other dependencies in .local/lib

Get the install script from the developer

Code: Select all

 curl -L https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py -o install.py 

That should be all you need

now run the install script

python3 install.py



If you run into any kind of problems install rich

python -m pip install rich

then run the script

python3 install.py




and sure enough it works install to /home/guest/.local/bin/
Last edited by dreadbird on 22 Jan 2025, 21:47, edited 3 times in total.

vinnie
Shogun
Shogun
Posts: 210
Joined: 13 Jun 2024, 08:25
Distribution: alpine

pyradio

Post#4 by vinnie » 22 Jan 2025, 11:32

Sorry I didn't reply to you but I didn't receive any notification in email and just now realized your message.
I could pass you the module I made but I see you did a better job than I did.
I have also been using this player's appimage lately: https://sayonara-player.com/
I like it because it also allows you to record tracks (and also splits them)

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

pyradio

Post#5 by dreadbird » 22 Jan 2025, 18:30

looks sweet. ill try it out

I would like to compare how you did lib to lib64 and then add everything in if I missed something. also the virtual environment requires a file in / so I didnt know how to package that. so had to make it without a virtual environment turned out to work. can you update the link and ill have a look

vinnie
Shogun
Shogun
Posts: 210
Joined: 13 Jun 2024, 08:25
Distribution: alpine

pyradio

Post#6 by vinnie » 22 Jan 2025, 19:30

this is the module although I don't remember what I did when I did it
https://oshi.at/bwfm

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

pyradio

Post#7 by dreadbird » 22 Jan 2025, 20:36

hang on checking it

updated it for you had to change the topline in /usr/bin/pyradio to !#/usr/bin/python
https://drive.google.com/file/d/1pR-QcH ... sp=sharing


now I can take what you did and convert my virtual environment type into an .xzm as well ill try that next

yeah it works as well you just have to change the topline of pyradio to the system python directory when moving it to /usr

this is nice all of them work out of the box with no dependencies

being able to just download a vm built app and run it from the directory is great especially for portability. Its another tool in the box for building apps as well.

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

pyradio

Post#8 by dreadbird » 18 Feb 2025, 14:19

Pyradio version 0.9.3.11.4

Thought I would share my thoughts on how to install pyradio on any linux with Python 3.7 or newer.

First download pip for python it can be named differently depending on the repositories. for fedora it is python3-pip package. on others it called python-pip.

Once you have installed pip download the source for pyradio https://github.com/coderholic/pyradio/r ... 0.9.3.11.4

Go to source directory

Code: Select all

python3 -m venv myenv
source myenv/bin/activate
python3 -m pip install -r requirements_pipx.txt
curl -L https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py -o install.py
python3 install.py
deactivate
cd myenv/bin/
./pyradio
An icon will also be in your app menu. This is will work everytime

Post Reply