message = 'now playing: %s #%s #%s' % (self.song.replace('_', ' '), self.artist.replace(' ', ''), self.short_name)
tags = '#' + ' #'.join(self.twitter_tags)
message = message + ' ' + tags
+ message = message[:113] + ' ' + self.tinyurl
message = message.decode('utf8')
- self.twitter.post(message[:113] + ' ' + self.tinyurl)
+ self.logger.write('Twitting : "' + message + '"')
+ self.twitter.post(message)
def update_rss(self, media_list, rss_file, sub_title):
rss_item_list = []
song = str(self.current_media_obj[0].file_name)
else:
song = self.artist + ' : ' + self.title
- self.song = str(song.encode('utf-8'))
- self.artist = str(self.artist.encode('utf-8'))
+ self.song = song.encode('utf-8')
+ self.artist = self.artist.encode('utf-8')
self.metadata_file = self.metadata_dir + os.sep + self.current_media_obj[0].file_name + '.xml'
self.update_rss(self.current_media_obj, self.metadata_file, '')
self.password = password
self.api = twitter.Api(username=self.username, password=self.password)
- def set_message(self, message):
- self.message = message
-
def post(self, message):
try:
self.api.PostUpdate(message)
# and video data through icecast2 servers.
# This software is governed by the CeCILL license under French law and
-# abiding by the rules of distribution of free software. You can use,
+# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL
# license as circulated by CEA, CNRS and INRIA at the following URL
-# "http://www.cecill.info".
+# "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
-# liability.
+# liability.
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
-# requirements in conditions enabling the security of their systems and/or
-# data to be ensured and, more generally, to use and operate it in the
+# requirements in conditions enabling the security of their systems and/or
+# data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security.
# The fact that you are presently reading this means that you have had
os.system('rm -r /usr/bin/deefuzzer')
os.system('ln -s '+install_dir+os.sep+'deefuzzer.py '+'/usr/bin/deefuzzer')
-os.system('ln -s '+install_dir+os.sep+'deefuzzer-deamon.sh '+'/usr/bin/deefuzzer-deamon')
print """
- Installation successfull !
+ Installation successfull !
Type 'deefuzzer' now...
"""