From 6e4c9830d7a3dcc1fd069f707f1acf2b0199f69f Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 4 May 2009 07:47:56 +0000 Subject: [PATCH] rename it DeeFuzzer --- COPYING | 4 +- INSTALL | 8 ++-- README | 26 +++++------ deefuzz-deamon.sh => deefuzzer-deamon.sh | 4 +- deefuzz.py => deefuzzer.py | 58 ++++++++++++------------ example/myfuzz.xml | 4 +- example/test_mp3.xml | 4 +- example/test_mp3_8.xml | 4 +- 8 files changed, 56 insertions(+), 56 deletions(-) rename deefuzz-deamon.sh => deefuzzer-deamon.sh (60%) rename deefuzz.py => deefuzzer.py (91%) diff --git a/COPYING b/COPYING index 33cd1ec..ad5f994 100644 --- a/COPYING +++ b/COPYING @@ -18,7 +18,7 @@ the two main principles guiding its drafting: The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) license are: -Commissariat à l'Energie Atomique - CEA, a public scientific, technical +Commissariat à l'Energie Atomique - CEA, a public scientific, technical and industrial research establishment, having its principal place of business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. @@ -326,7 +326,7 @@ The Licensee expressly undertakes: The Licensee undertakes not to directly or indirectly infringe the intellectual property rights of the Holder and/or Contributors on the -Software and to take, where applicable, vis-à-vis its staff, any and all +Software and to take, where applicable, vis-�-vis its staff, any and all measures required to ensure respect of said intellectual property rights of the Holder and/or Contributors. diff --git a/INSTALL b/INSTALL index 0fec092..a02ecbd 100644 --- a/INSTALL +++ b/INSTALL @@ -5,7 +5,7 @@ # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms -# are also available at http://svn.parisson.org/deefuzz/DeeFuzzLicense. +# are also available at http://svn.parisson.org/deefuzzer/DeeFuzzLicense. # # Author: Guillaume Pellerin @@ -15,14 +15,14 @@ provides : shout-python python-shout is included in DeeFuzz but needs to be compiled and installed -if you don't install deefuzz from its debian package with aptitude. +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 deefuzz (from the main deefuzz directory) : +To install deefuzzer (from the main deefuzzer directory) : $ sudo python install.py -For more informations, see http://svn.parisson.org/deefuzz/ \ No newline at end of file +For more informations, see http://svn.parisson.org/deefuzzer/ \ No newline at end of file diff --git a/README b/README index cea32df..e580d44 100644 --- a/README +++ b/README @@ -1,15 +1,15 @@ # README # ====== -deefuzz : an easy and light media streaming tools +deefuzzer : an easy and light media streaming tools # 1. Introduction # =============== -DeeFuzz Tools are new light and easy tools to stream audio and video over internet. It is dedicated to people who wants to create playlisted webradios or webTVs with rich media contents. It depends on python, icecast2 server, libshout and some other tools. +DeeFuzzer Tools are new light and easy tools to stream audio and video over internet. It is dedicated to people who wants to create playlisted webradios or webTVs with rich media contents. It depends on python, icecast2 server, libshout and some other tools. -Here are the main features of the DeeFuzz Tools: +Here are the main features of the DeeFuzzer Tools: * MP3 and OGG (audio & video) file streaming over internet * Full metadata encapsulation and management @@ -34,34 +34,34 @@ see INSTALL This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms - are also available at http://svn.parisson.org/deefuzz/DeeFuzzLicense + are also available at http://svn.parisson.org/deefuzzer/DeeFuzzerLicense # 4. Usage # ========= -Usage : deefuzz CONFIGFILE +Usage : deefuzzer CONFIGFILE where CONFIGFILE is the path for a XML config file. For example: - $ deefuzz example/myfuzz.xml + $ 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/deefuzz if installed with the help of install.py) +application (maybe in /usr/share/deefuzzer if installed with the help of install.py) -DeeFuzz can also be run as a deamon using deefuzz-deamon: +DeeFuzzer can also be run as a deamon using deefuzzer-deamon: - $ deefuzz-deamon example/myfuzz.xml & + $ deefuzzer-deamon example/myfuzz.xml & -Since 0.3, deefuzz doesn't print anything into the shell, then a right parameter +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 deefuzz instances +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, after a CTRL+Z, making this: - $ kill -9 `pgrep deefuzz` + $ kill -9 `pgrep deefuzzer` # 5. Author @@ -89,5 +89,5 @@ See COPYING # 8. Contact / Infos # ================== -see http://svn.parisson.org/deefuzz/ or http://parisson.com for more info. +see http://svn.parisson.org/deefuzzer/ or http://parisson.com for more info. diff --git a/deefuzz-deamon.sh b/deefuzzer-deamon.sh similarity index 60% rename from deefuzz-deamon.sh rename to deefuzzer-deamon.sh index 8343ea9..4e2f9a6 100755 --- a/deefuzz-deamon.sh +++ b/deefuzzer-deamon.sh @@ -1,11 +1,11 @@ #!/bin/bash conf_file=$1 -log_file=/tmp/deefuzz.log +log_file=/tmp/deefuzzer.log set -e ulimit -c unlimited while true; do - deefuzz $1 > /dev/null + deefuzzer $1 > /dev/null sleep 3 done diff --git a/deefuzz.py b/deefuzzer.py similarity index 91% rename from deefuzz.py rename to deefuzzer.py index 6ebc49a..e5902e0 100755 --- a/deefuzz.py +++ b/deefuzzer.py @@ -53,39 +53,39 @@ year = datetime.datetime.now().strftime("%Y") def prog_info(): - desc = '\n deefuzz : easy and light streaming tool\n' + desc = '\n deefuzzer : easy and light streaming tool\n' ver = ' version : %s \n\n' % (version) info = """ Copyright (c) 2007-%s Guillaume Pellerin All rights reserved. This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms - are also available at http://svn.parisson.org/d-fuzz/DeeFuzzLicense + are also available at http://svn.parisson.org/d-fuzz/DeeFuzzerLicense depends : python, python-xml, python-shout, libshout3, icecast2 recommends : python-mutagen provides : python-shout - Usage : deefuzz $1 + Usage : deefuzzer $1 where $1 is the path for a XML config file - ex: deefuzz example/myfuzz.xml + ex: deefuzzer example/myfuzz.xml - see http://svn.parisson.org/deefuzz/ for more details + see http://svn.parisson.org/deefuzzer/ for more details """ % (year) text = desc + ver + info return text -class DeeFuzzError: - """The DeeFuzz main error class""" +class DeeFuzzerError: + """The DeeFuzzer main error class""" def __init__(self, message): self.message = message def __str__(self): - return 'DeeFuzz Error : ' + self.message + return 'DeeFuzzer Error : ' + self.message -class DeeFuzzStreamError: - """The DeeFuzz stream error class""" +class DeeFuzzerStreamError: + """The DeeFuzzer stream error class""" def __init__(self, message, command, subprocess): self.message = message self.command = str(command) @@ -101,21 +101,21 @@ class DeeFuzzStreamError: error) -class DeeFuzz(Thread): - """a DeeFuzz diffuser""" +class DeeFuzzer(Thread): + """a DeeFuzzer diffuser""" def __init__(self, conf_file): Thread.__init__(self) self.conf_file = conf_file self.conf = self.get_conf_dict() - if 'log' in self.conf['deefuzz'].keys(): - self.logger = Logger(self.conf['deefuzz']['log']) + if 'log' in self.conf['deefuzzer'].keys(): + self.logger = Logger(self.conf['deefuzzer']['log']) else: - self.logger = Logger('.' + os.sep + 'deefuzz.log') - if 'm3u' in self.conf['deefuzz'].keys(): - self.m3u = self.conf['deefuzz']['m3u'] + self.logger = Logger('.' + os.sep + 'deefuzzer.log') + if 'm3u' in self.conf['deefuzzer'].keys(): + self.m3u = self.conf['deefuzzer']['m3u'] else: - self.m3u = '.' + os.sep + 'deefuzz.m3u' + self.m3u = '.' + os.sep + 'deefuzzer.m3u' def get_conf_dict(self): confile = open(self.conf_file,'r') @@ -139,11 +139,11 @@ class DeeFuzz(Thread): m3u.close() def run(self): - if isinstance(self.conf['deefuzz']['station'], dict): + if isinstance(self.conf['deefuzzer']['station'], dict): # Fix wrong type data from xmltodict when one station (*) nb_stations = 1 else: - nb_stations = len(self.conf['deefuzz']['station']) + nb_stations = len(self.conf['deefuzzer']['station']) # Create a Queue # Not too much, otherwise, you will get memory leaks ! @@ -153,8 +153,8 @@ class DeeFuzz(Thread): p = Producer(q) p.start() - # Set the deefuzz logger - self.logger.write('Starting DeeFuzz v' + version) + # Set the deefuzzer logger + self.logger.write('Starting DeeFuzzer v' + version) self.logger.write('Using libshout version %s' % shout.version()) # Define the buffer_size @@ -165,10 +165,10 @@ class DeeFuzz(Thread): self.stations = [] self.logger.write('Number of stations : ' + str(nb_stations)) for i in range(0,nb_stations): - if isinstance(self.conf['deefuzz']['station'], dict): - station = self.conf['deefuzz']['station'] + if isinstance(self.conf['deefuzzer']['station'], dict): + station = self.conf['deefuzzer']['station'] else: - station = self.conf['deefuzz']['station'][i] + station = self.conf['deefuzzer']['station'][i] # Create a Station self.stations.append(Station(station, q, self.buffer_size, self.logger)) @@ -182,7 +182,7 @@ class DeeFuzz(Thread): class Producer(Thread): - """a DeeFuzz Producer master thread""" + """a DeeFuzzer Producer master thread""" def __init__(self, q): Thread.__init__(self) @@ -197,7 +197,7 @@ class Producer(Thread): class Station(Thread): - """a DeeFuzz shouting station thread""" + """a DeeFuzzer shouting station thread""" def __init__(self, station, q, buffer_size, logger): Thread.__init__(self) @@ -380,7 +380,7 @@ class Station(Thread): __chunk = proc.stdout.read(self.buffer_size) status = proc.poll() if status != None and status != 0: - raise DeeFuzzStreamError('Command failure:', command, proc) + raise DeeFuzzerStreamError('Command failure:', command, proc) if not __chunk: break yield __chunk @@ -447,7 +447,7 @@ class Station(Thread): def main(): if len(sys.argv) == 2: - d = DeeFuzz(sys.argv[1]) + d = DeeFuzzer(sys.argv[1]) d.start() else: text = prog_info() diff --git a/example/myfuzz.xml b/example/myfuzz.xml index 51fb682..a799e16 100644 --- a/example/myfuzz.xml +++ b/example/myfuzz.xml @@ -1,4 +1,4 @@ - + /tmp/deefuzz.log /tmp/deefuzz.m3u @@ -55,5 +55,5 @@ 1 - + diff --git a/example/test_mp3.xml b/example/test_mp3.xml index d9b569b..c2bb82a 100644 --- a/example/test_mp3.xml +++ b/example/test_mp3.xml @@ -1,4 +1,4 @@ - + /tmp/deefuzz.log @@ -48,5 +48,5 @@ 1 - + diff --git a/example/test_mp3_8.xml b/example/test_mp3_8.xml index e8373e4..410b96a 100644 --- a/example/test_mp3_8.xml +++ b/example/test_mp3_8.xml @@ -1,4 +1,4 @@ - + /tmp/deefuzz.log @@ -208,4 +208,4 @@ 0 - + -- 2.39.5