* letzte genutzte Version + Scripte
* Texte fuer Frieda
This commit is contained in:
parent
f3341b093a
commit
6e9743a34f
5 changed files with 54 additions and 6 deletions
|
@ -31,7 +31,7 @@ MAIL_ADDRESS_REGEX = r"^[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+\.[a-zA-Z]{2,6}$"
|
|||
# TODO: this path is relative - to be fixed!
|
||||
MAIL_SIGNATURE_FILE = os.path.join(os.getcwd(), "mail_signature.txt")
|
||||
MAIL_FROM_ADDRESS = '"Fusion-Fotokiste" <fotokiste@glasmensch.org>'
|
||||
MAIL_SUBJECT = "Ein überwachungskritisches Foto von der Fusion!"
|
||||
MAIL_SUBJECT = "Ein überwachungskritisches Foto aus der Frieda!"
|
||||
MAIL_ATTACHMENT_FILENAME = "fusion" + IMAGE_SUFFIX
|
||||
SMTP_HOST = "localhost"
|
||||
SMTP_PORT = "25"
|
||||
|
@ -141,7 +141,7 @@ def send_mail(address, text):
|
|||
# send the mail
|
||||
try:
|
||||
con = smtplib.SMTP(SMTP_HOST, SMTP_PORT)
|
||||
con.sendmail(address, MAIL_FROM_ADDRESS, writer.getvalue())
|
||||
con.sendmail(MAIL_FROM_ADDRESS, address, writer.getvalue())
|
||||
con.quit()
|
||||
except (smtplib.SMTPHeloError, smtplib.SMTPRecipientsRefused,
|
||||
smtplib.SMTPSenderRefused, smtplib.SMTPDataError), msg:
|
||||
|
@ -181,7 +181,12 @@ class Root(controllers.RootController):
|
|||
def mailtext(self, mailaddress="", mailtext="", already_captured="no", already_stored="no", **kargs):
|
||||
# store the picture if necessary
|
||||
if already_captured != "yes":
|
||||
try:
|
||||
urllib.urlretrieve(SNAPSHOT_URL, IMAGE_STORE)
|
||||
except:
|
||||
#os.system("reboot")
|
||||
flash("Achtung: dein Foto enthaelt moeglicherweise menschenverachtende Inhalte. Bitte wende dich fuer einen umfassenden Persoenlichkeitstest an der Bar. Danke fuer deine Kooperation!")
|
||||
redirect("index", DEFAULT_DICT)
|
||||
already_captured = "no"
|
||||
if already_stored != "yes":
|
||||
already_stored = "no"
|
||||
|
@ -226,7 +231,8 @@ class Root(controllers.RootController):
|
|||
if send_mail(mailaddress, mailtext):
|
||||
return return_dict
|
||||
else:
|
||||
redirect("error")
|
||||
flash("Fehler beim Senden der Mail! Ist die Adresse korrekt?")
|
||||
redirect("mailtext", return_dict)
|
||||
|
||||
@expose()
|
||||
def get_current_shot(self):
|
||||
|
|
|
@ -20,6 +20,8 @@ function createImageLayer() {
|
|||
webcam.insertBefore(img, webcam.firstChild);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Two layers are always present (except at the very beginning), to avoid flicker
|
||||
function imageOnload() {
|
||||
this.style.zIndex = imageNr; // Image finished, bring to front!
|
||||
|
@ -28,7 +30,7 @@ function imageOnload() {
|
|||
del.parentNode.removeChild(del);
|
||||
}
|
||||
finished.push(this);
|
||||
if (!paused) createImageLayer();
|
||||
if (!paused) window.setTimeout(createImageLayer(), 1000);
|
||||
}
|
||||
|
||||
function imageOnclick() { // Clicking on the image will pause the stream
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Hallo,
|
||||
|
||||
diese Mail wurde Ihnen von der panoptischen Fotokiste auf der Fusion 2008 in Lärz geschickt.
|
||||
diese Mail wurde Ihnen mit der panoptischen Fotokiste vom Frieda Hoffest 2008 in Rostock geschickt.
|
||||
Die Personen auf dem Foto möchten damit ein Zeichen gegen zunehmend verschärfte Überwachungsbestrebungen setzen und sie mit den folgenden Punkten auf Ihre Handlungsmöglichkeiten aufmerksam machen.
|
||||
|
||||
|
||||
|
|
39
fotokiste/system-scripts/fotokiste
Executable file
39
fotokiste/system-scripts/fotokiste
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
set -u
|
||||
FOTOKISTE_DIR="/usr/local/src/fotokiste"
|
||||
FOTOKISTE_EXEC="start-fotokiste.py"
|
||||
PID_FILE="/var/run/fotokiste.pid"
|
||||
LOG_FILE="/var/log/fotokiste.log"
|
||||
MJPG_STREAMER=/usr/local/src/mjpg-streamer/start-fotokiste.sh
|
||||
LOG_FILE_MJPG=/var/log/mjpg-streamer.log
|
||||
PID_FILE_MJPG=/var/run/mjpg-streamer.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting Fotokiste ... "
|
||||
"$MJPG_STREAMER" &>"$LOG_FILE_MJPG" </dev/null &
|
||||
echo "$!" >"$PID_FILE_MJPG"
|
||||
cd "$FOTOKISTE_DIR"; python "$FOTOKISTE_EXEC" </dev/null &>"$LOG_FILE" &
|
||||
echo "$!" >"$PID_FILE"
|
||||
echo done
|
||||
X &
|
||||
export DISPLAY=:0
|
||||
xhost +
|
||||
sleep 30
|
||||
su glasmensch /usr/bin/iceweasel &
|
||||
;;
|
||||
stop)
|
||||
killall X
|
||||
for pfile in "$PID_FILE" "$PID_FILE_MJPG"
|
||||
do test -e "$pfile" && kill "$(cat "$pfile")"
|
||||
rm -f "$pfile"
|
||||
done
|
||||
;;
|
||||
restart)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
1
fotokiste/system-scripts/mjpg-streamer.sh
Normal file
1
fotokiste/system-scripts/mjpg-streamer.sh
Normal file
|
@ -0,0 +1 @@
|
|||
LD_LIBRARY_PATH="$(pwd)" ./mjpg_streamer -i "input_uvc.so -r 320x240 -f 25" -o "output_http.so -w $(pwd)/www --port 8081"
|
Loading…
Reference in a new issue