diff --git a/.gitignore b/.gitignore index b60c736..222ad78 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,15 @@ !/etc /etc/* + +!/etc/apt/ +/etc/apt/* +!/etc/apt/apt.conf.d/ +/etc/apt/apt.conf.d/* +!/etc/apt/apt.conf.d/90norecommend + !/etc/hostname + !/etc/nginx/sites-available/ !/floppies/ @@ -15,3 +23,6 @@ /usr/local/* !/usr/local/sbin/ /usr/local/sbin/*/ + +*.pyc +.DS_Store diff --git a/etc/apt/apt.conf.d/90norecommend b/etc/apt/apt.conf.d/90norecommend new file mode 100644 index 0000000..a62feb1 --- /dev/null +++ b/etc/apt/apt.conf.d/90norecommend @@ -0,0 +1,2 @@ +APT::Install-Recommends "0"; +APT::Install-Suggests "0"; diff --git a/floppies/Kimmy_Rest/.DS_Store b/floppies/Kimmy_Rest/.DS_Store deleted file mode 100644 index 57c3d4f..0000000 Binary files a/floppies/Kimmy_Rest/.DS_Store and /dev/null differ diff --git a/floppies/claudia/fine-line/.DS_Store b/floppies/claudia/fine-line/.DS_Store deleted file mode 100644 index cf5da4b..0000000 Binary files a/floppies/claudia/fine-line/.DS_Store and /dev/null differ diff --git a/floppies/claudia/fine-line/libraries/.DS_Store b/floppies/claudia/fine-line/libraries/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/floppies/claudia/fine-line/libraries/.DS_Store and /dev/null differ diff --git a/floppies/franc/.DS_Store b/floppies/franc/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/floppies/franc/.DS_Store and /dev/null differ diff --git a/floppies/franc/common.pyc b/floppies/franc/common.pyc deleted file mode 100644 index 809781f..0000000 Binary files a/floppies/franc/common.pyc and /dev/null differ diff --git a/floppies/franc/video.pyc b/floppies/franc/video.pyc deleted file mode 100644 index 24e2adb..0000000 Binary files a/floppies/franc/video.pyc and /dev/null differ diff --git a/floppies/nadine2/readnew.py b/floppies/nadine2/readnew.py index ccfd630..0df95ed 100755 --- a/floppies/nadine2/readnew.py +++ b/floppies/nadine2/readnew.py @@ -1,8 +1,10 @@ #! /usr/bin/env python -import re, subprocess, random +import re, subprocess, random, os from time import sleep -# requires: espeak to be installed +devnull = open(os.devnull, 'w') + +# requires: espeak and aplay (alsa-utils) to be installed dic={ "narrator": "en-us", @@ -17,33 +19,25 @@ f=open("transcripts-drone-attack.txt","r") txt=f.readlines() p= re.compile(r"^(\d\d\:\d\d) \((.*?)\)\: (.*)") # regex for capturing groups: time, character, sentence for line in txt: - print line if p.findall(line): time,char,sentence = (p.findall(line))[0] - print char.upper() voice=dic[char] # play time - subprocess.call(["espeak", time +" "+char, "-v", dic['narrator'], "-p", "20"]) # narrator speaks: time and character + subprocess.call(["espeak", time +" "+char, "-v", dic['narrator'], "-p", "20"], stdout=devnull, stderr=devnull) # narrator speaks: time and character sleep(0.5) #short pause before sentence - print sentence if "*expletive*" in sentence: #"*expletive*" in sentence is True: sentence_parts=re.split(r"(\*\w+\*)", sentence) - print sentence_parts for part in sentence_parts: if part == '*expletive*': - print 'EXPLETIVE', part - subprocess.call(["aplay", 'swear.wav']) + subprocess.call(["aplay", 'swear.wav'], stdout=devnull, stderr=devnull) else: - print 'SPEECH', part - subprocess.call(["espeak", part, "-v", voice]) # character speaks: his + subprocess.call(["espeak", part, "-v", voice], stdout=devnull, stderr=devnull) # character speaks: his sleep(float(random.randint(1,10))/100) else: - subprocess.call(["espeak", sentence, "-v", voice]) # character speaks: his + subprocess.call(["espeak", sentence, "-v", voice], stdout=devnull, stderr=devnull) # character speaks: his # else: # line w/out time or character (narrator) - print "NARRATOR" - subprocess.call(["espeak", line, "-v", dic['narrator'], "-p", "20"]) - + subprocess.call(["espeak", line, "-v", dic['narrator'], "-p", "20"], stdout=devnull, stderr=devnull) sleep(1) # make pause after each text line