From: Guillaume Pellerin Date: Wed, 23 Dec 2009 23:48:26 +0000 (+0000) Subject: fix twitter except, add new features to README X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a925a4dc45ce538401ecaa4ac9056ba8a3d74df3;p=deefuzzer.git fix twitter except, add new features to README --- diff --git a/INSTALL b/INSTALL index 1a89412..9c518db 100644 --- a/INSTALL +++ b/INSTALL @@ -14,14 +14,14 @@ provides : shout-python -python-shout is included in DeeFuzz but needs to be compiled and installed +python-shout is included in the DeeFuzzer but needs to be compiled and installed if you don't install deefuzzer from its debian package with aptitude. As explained in shout-python/INSTALL, you just have to run this command : $ cd shout-python $ sudo python setup.py install -To install deefuzzer (from the main deefuzzer directory) : +To install the DeeFuzzer (from the main deefuzzer directory) : $ sudo python install.py diff --git a/README b/README index 3befd67..a846e13 100644 --- a/README +++ b/README @@ -3,6 +3,17 @@ deefuzzer : an easy and light media streaming tools +# 0. Aknowledgements +# ================== + +This work is inspired by the great - C coded - Oddsock's streaming program : Ezstream. +Since I needed to patch it in order to modify the playlist (randomize for example) +and make external batch tools to create multiple channels, I decided to rewrite it +from scratch in python. + +Some parts of this work are also taken from another Parisson's project : Telemeta +(see http://telemeta.org). + # 1. Introduction # =============== @@ -11,17 +22,20 @@ DeeFuzzer Tools are new light and easy tools to stream audio and video over inte Here are the main features of the DeeFuzzer Tools: - * MP3 and OGG (audio & video) file streaming over internet + * MP3 and OGG (audio & video) file streaming over internet (Icecast) * Full metadata encapsulation and management * RSS podcast generator (current tracks and playlists) * M3U playlist generator * Recursive, random (shuffled) or pre-defined playlists - * Multi-threaded architecture (multiple stations now authorized !) - * Auto TWITTER posting of the current playing track - * VERY light and optimized streaming process ! + * Multi-threaded architecture : multiple station streaming with one config file + * Auto Twitter posting of the current playing tracks + * Jingling between main tracks + * OSC controller : control the main functions from a distant terminal + * Station relay : stream other stations like *LIVE* sessions ! + * Very light and optimized streaming process It is neccessary to provide a config file which sets all needed parameters -(see example/myfuzz.xml for an example). +Please see example/myfuzz.xml for an example. # 2. Installation @@ -42,40 +56,50 @@ see INSTALL # ========= Usage : deefuzzer CONFIGFILE - + where CONFIGFILE is the path for a XML config file. For example: $ deefuzzer example/myfuzz.xml -Note that you must edit the config file with right parameters before executing. -You can find an example for the XML file in the directory "example/" of this -application (maybe in /usr/share/deefuzzer if installed with the help of install.py) +To make the deefuzzer act as a deamon, just play it in the background : + + $ deefuzzer example/myfuzz.xml & + +Note that you must edit the config file with right parameters before playing. +You can find an example for a draft XML file in the directory "example/" of this +application (maybe in /usr/share/deefuzzer/example/ if installed with the help of install.py) Since 0.3, deefuzzer doesn't print anything into the shell, then a right parameter is needed in the XML config file. -BE CAREFULL : at the moment, the multi-threading implementation of deefuzzer instances -avoids to shut down the streams with CTRL+C... You have to kill them manually, +BE CAREFULL : at the moment, the multi-threaded implementation of deefuzzer instances +avoids shutting down the streams with CTRL+C... You have to kill them manually, after a CTRL+Z, making this: + $ kill -9 PROCESS_ID +or $ kill -9 `pgrep deefuzzer` -# 5. Author -# ========= +# 5. OSC Control +# =============== -Guillaume Pellerin +We can now control some functions of the deefuzzer with external commands +coming from an OSC client. These are accessible only if the "control" tag is +set up in the config file (see example/myfuzz.xml again...). +* Next track (see tools/osc_next.py) +* Start relaying (see tools/osc_relay_start.py) +* Stop relaying (see tools/osc_relay_stop.py) +* Start jingling (see tools/osc_jingles_start.py) +* Stop jingling (see tools/osc_jingles_stop.py) -# 6. Aknowledgements -# ================== -This work is inspired by the great - C - Oddsock's streaming program : Ezstream. -Since I needed to patch it in order to modify the playlist (randomize for example) -and make external batch tools to create multiple channels, I decided to rewrite it -from scratch in python. -Some parts of this work are also taken from another Parisson's project : Telemeta -(see http://svn.parisson.org/telemeta). +# 6. Author +# ========= + +Guillaume Pellerin + # 7. Licence # ========== diff --git a/install.py b/install.py index 6c61526..ad90102 100644 --- a/install.py +++ b/install.py @@ -43,7 +43,7 @@ import os, sys if len(sys.argv) == 1: install_dir = '/usr/share/deefuzzer/' elif len(sys.argv) > 2: - sys.exit('Give just one directory to install Telemeta, or none.') + sys.exit('Give just one directory to install the DeeFuzzer, or none.') else: install_dir = sys.argv[1] diff --git a/tools/twitt.py b/tools/twitt.py index a03907c..a0e212d 100644 --- a/tools/twitt.py +++ b/tools/twitt.py @@ -45,6 +45,9 @@ class Twitter: self.api = twitter.Api(username=self.username, password=self.password) def post(self, message): - self.api.PostUpdate(message) + try: + self.api.PostUpdate(message) + except: + pass