Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [186f91779d]

Overview
Comment:Update documentation files (dependencies and manual installation paths).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 186f91779db2b8a82b729c8fd824c93ee9561469
User & Date: mario on 2015-04-01 20:31:17
Other Links: manifest | tags
Context
2015-04-02
15:24
Removed dirble plugin for now (new API coming in April...?) check-in: 23f4e4608e user: mario tags: trunk
2015-04-01
20:31
Update documentation files (dependencies and manual installation paths). check-in: 186f91779d user: mario tags: trunk
17:39
Add conf.get_data() alias, which automatically fetches resource relative to config module (that is, works on the global path, or within pyzip archive). Move module_list() from channels. into config, as it combines plugins and config management anyway. check-in: 07d2a291cd user: mario tags: trunk
Changes

Added CREDITS version [d2d363e440].















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

· Mario Salzer, http://include-once.org/
  → Streamtuner2 maintainer

· Christian Ehm, http://ehm-edv.de/
  → MyOggRadio service, API and plugin

· gorgonz123, http://paste.ubuntuusers.de/399600/
  → SurfMusic channel plugin

· Matthias Haase, http://www.bennewitz.com/
  and Leigh Scott, B.Jones
  → Fedora package, many bug reports, fixes, etc.

· Abhisek Sanyal
  → Major fix/patch for Live365

· Heinrich Schwietering, http://ubuntuusers.de/
  → external + user-friendly documentation

· Jean-Yves Lefort and contributors,
  → For the original STREAMTUNER 0.99.xx!

Of course also many thanks to all users
reporting and helping to investigate bugs!

 · samanthax
 · aquarius 
 · kino
 · omelette
 · Daniel, http://www.librepc.com/
 · Troy
 · darose
 · b.nikola
 · stefantalpalaru
 · micha @ musicgoal
 · jay.l.h

And probably many others...

Added PACKAGERS version [1512d74c86].























































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

This is a short summary for distribution package maintainers.
For regular end-user documentation see the help/ pages.


Structural changes in 2.1.5 (2015-04-xx)
----------------------------------------

 → There's a new `bin` script. It's a lightweight invocation
   wrapper, intended to be installed as /usr/bin/streamtuner2
   now.

 → The previous `st2.py` still exists, but is now supposed to
   reside in `/usr/share/streamtuner2/st2.py` along with all
   other modules.

 → Theoretically it's now possible to change the target path
   even (just edit `bin`).

I'd still advise to use /usr/share/streamtuner2/ as main target
directory though. It's not yet practical to extract into Python
site-package directories.

The channel PNG files still need to reside alongside the Python
modules. Later versions may complete soak the images into the
source code (meta data section) for simpicity.


Aux files
---------

 → Help files still need to go to share/docs/streamtuner2/help/
   unless you patch the source.

 → *.desktop as usual

 → and `logo.png` is the pixmap/app icon


Removed
-------

Some plugin PNGs may have been removed already.

And the streamtuner2.png logo is now source-embedded instead
(`logo.py` provides a `logo.png`).

The old `gtk2.xml` file is gone. It probably became obsolete
a long while back. The gtk3.xml is instead runtime-patched
to work with PyGTK/gtk2.


Dependencies
------------

If possible, make ST2 dependend on Python2 -or- Python3.
It's not yet practical, and probably against distro standards,
and only APT could so anyway. But if feasible...

Also, hard dependencies are meanwhile:

  - gtk (>= 2.16)
  - pygtk || python-gi
  - python-requests (>> 1.2.0)
  - python-pyquery     [though most plugins would work without]
  - and its implied python-lxml

Optional dependencies (just affects a single plugin, which
semi-gracefully disables itself):

  - python-keybinder   [for global_key]
  - python-dbus        [for radiotray]

Very optional dependencies (everything should work without):

  - python-xdg

Strongly suggest:

  - Streamripper

Suggest:

  - any audio player of course
  - youtube-dl


Lazy installation
-----------------

The new .PYZ archive bundles everything into a ZIP file. Which,
given the right shebang, could just be "installed" as literal
/usr/bin/streamtuner2 even.
I'm sure nobody is going to do so. But you know, it's at least
a theoretical option now..


FPM/XPM packaging
-----------------

You may have noticed (and scoffed at ;) the newer packaging
method. It's now using http://fossil.include-once.org/xpm/
with the `src` filter. (That's what the meta comment blocks
in the source modules were always meant for.)


Repo
----

The source code is hosted in a Fossil repo.

You can get a Git export however easily even per web interface:

  http://fossil.include-once.org/streamtuner2/git-fast-export

Git may or may not choke on its own export format though..


Fin
---

Thanks guys!

Modified README from [b84883b320] to [d424df7f25].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

16

17
18


19
20

21






22
23
24

25
26
27
28
29
30
31
32


33
















































34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50


51


streamtuner2
============

ST2 is a internet radio browser. It queries online directories like
shoutcast and xiph.org for music stations.

It mimics the original streamtuner 1 to some extend. It's however
written in Python now instead of C.


installation howto
------------------

You can just execute the main binary "st2.py".

All the other files need to be copied into /usr/share/streamtuner2/ however.

In particular the channel/ directory needs to reside there, so ST2 can find
all its plugins.



If it doesn't work, make sure you have Python and gtk/pygtk installed:








  sudo apt-get install python python-gtk2 python-glade2 python-xdg

And a few modules like:


  sudo apt-get install python-requests python-pyquery python-keybinder

You can also install Python modules per `pip` with

  sudo pip install requests

The gtk*.xml file represents the GUI, btw.  So with glade installed, you


can inspect and adapt the interface.


















































alternatives
------------

* http://sourceforge.net/projects/radiotray/
* https://sites.google.com/site/glrpgreatlittleradioplayer/
* http://tunapie.sourceforge.net/
* VLC also has a few directory discovery services built-in
* Rythmbox comes with last.fm, libre.fm, radio lookups


license
-------

Public Domain.
(no rules: unrestricted copying, modification, distribution, etc.)















|


|
>
|
>
|
<
>
>

|
>

>
>
>
>
>
>
|

<
>

|

|



|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>















|
|
>
>

>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

streamtuner2
============

ST2 is a internet radio browser. It queries online directories like
shoutcast and xiph.org for music stations.

It mimics the original streamtuner 1 to some extend. It's however
written in Python now instead of C.


Installation howto
------------------

If possible, prefer the package directly from your BSD/Linux distribution.
Due to an excessive maintenance break, some still have older 2.0.8 version
however - which barely works anymore.
If so, you should use a manually installed version.


Dependencies
------------

Running streamtuner2 requires Python and Gtk packages. Which nowadays are
installed per default. There's a few more Python packages required though:

 · python | python3
 · pygtk | python-gi
 · python-requests
 · python-pyquery
 · python-lxml
 · python-keybinder (optional)
 · python-xdg (optional)


Use your distro package manager with e.g.:

  sudo apt-get install python python-gtk2 python-xdg python-requests ...

Or utilize Pythons local package installer even:

  sudo pip install requests


DEB / RPM
---------

There are rudimentary packages built as .DEB and .RPM version. Install
those if feasible. The dependencies may not match with your package
manger, and are somewhat incomplete. (See "Dependencies" section.)


PYZ
---

Other users may wish to try the new Python archive (.PYZ) instead. Which
requires little installation, but can just be run in-place:

    python streamtuner-2.1.5.pyz

You could even make this Python ZIP executable, and copy it in your PATH.


Manual installation
-------------------

If you've checked out the source code repository, or did download the
*.src.txz archive, then you can just run it right there:

   ./st2.py

To install it manually:

  · Create a /usr/share/streamtuner2/
  · Copy all *.py files there.
  · Also copy the "gtk3.xml" file into /usr/share/streamtuner2/
  · Copy the channels/ subdir into /usr/share/streamtuner2/channels/
  · Install "bin" as /usr/bin/streamtuner2.
  · If you want to use another target, just edit the "bin" wrapper.
  · Optionally copy the help/ folder to /usr/share/docs/streamtuner2/
  · And the logo.png into the system pixmaps/,
    as well as the *.desktop file into /usr/share/applications/

That's pretty much what the binary packages extract to.


Hacking
-------

If you want to edit a channel plugin, just have a look into the
channels/*.py files. It's often rather easy to adapt things.

Moreover you can also edit the user interface. You need glade-3
installed, and open the "gtk3.xml" file. There it's easy to
rename or rearrange things.


alternatives
------------

* http://sourceforge.net/projects/radiotray/
* https://sites.google.com/site/glrpgreatlittleradioplayer/
* http://tunapie.sourceforge.net/
* VLC also has a few directory discovery services built-in
* Rythmbox comes with last.fm, libre.fm, radio lookups


license
-------

Public Domain. (Unrestricted copying, modification, etc.)

If you wish you could thus redistribute it under a BSD/MIT
or even GNU-style license.


Modified action.py from [6e1dac85dc] to [93903d7a98].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# encoding: UTF-8
# api: streamtuner2
# type: functions
# title: play/record actions
# description: Starts audio applications, guesses MIME types for URLs
# version: 0.7
#
#
#  Multimedia interface for starting audio players, recording app,
#  or web browser (listed as "url/http" association in players).
#
#
#  Each channel plugin has a .listtype which describes the linked
#  audio playlist format. It's audio/x-scpls mostly, seldomly m3u,
#  but sometimes url/direct if the entry[url] directly leads to the
#  streaming server.
#
#  As fallback there is a regex which just looks for URLs in the
#  given resource (works for m3u/pls/xspf/asx/...). There is no
#  actual url "filename" extension guessing.
#
#
#


import re
import os
import ahttp as http
from config import conf, __print__, dbg
import platform
|







<
|
|

<
|
|
|
|

|
|
|
<
<
<







1
2
3
4
5
6
7
8

9
10
11

12
13
14
15
16
17
18
19



20
21
22
23
24
25
26

# encoding: UTF-8
# api: streamtuner2
# type: functions
# title: play/record actions
# description: Starts audio applications, guesses MIME types for URLs
# version: 0.7
#

# Multimedia interface for starting audio players, recording app,
# or web browser (listed as "url/http" association in players).
#

# Each channel plugin has a .listtype which describes the linked
# audio playlist format. It's audio/x-scpls mostly, seldomly m3u,
# but sometimes url/direct if the entry[url] directly leads to the
# streaming server.
#
# As fallback there is a regex which just looks for URLs in the
# given resource (works for m3u/pls/xspf/asx/...). There is no
# actual url "filename" extension guessing.





import re
import os
import ahttp as http
from config import conf, __print__, dbg
import platform