Personal tools
 
Document Actions

TuxDroid BOFH excuse generator

by Rutger Bazen last modified 2007-12-15 00:27

http://en.wikipedia.org/wiki/BOFH

Click here to get the file

Size 2.0 kB - File type text/python-source

File contents

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# -----------------------------------------------------------------------------
# Tux Droid - Pidgin InterFace
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# -----------------------------------------------------------------------------
# $Id: $
# -----------------------------------------------------------------------------

"""
CHANGES
=======

2007/12/03 - version 0.1:
    - Initial version

"""

__author__  = "Rutger Bazen"
__appname__ = "Empty Template"
__version__ = "0.1"
__date__    = "2007/12/03"
__license__ = "GPL"

# -----------------------------------------------
# Initalization of modules
# uses objects "tux" and "tss"
# -----------------------------------------------
import sys
sys.path.append('/opt/tuxdroid/api/python')
from tux import *
from urllib import *

tux.daemon.connect()
tux.tts.connect()
print "Press Control+C to exit loop and close program"

def get_messages(url, line):
    html = urlopen(url).readlines()
    usefullone = html[line]
    return usefullone

def awnsering_machine():
    excuse = get_messages('http://gt-rclub.com/bofh/index.php',34)
    print excuse
    tux.tts.speak(excuse)

def roll_over():
    tux.destroy()
    sys.exit(0)

tux.event.on_lwing_bt_pushed=roll_over

try:
    while True:
        tux.event.wait_head_bt_pushed(9999)
        awnsering_machine()

finally:
    tux.destroy()

You are here: Home Members zepher TuxDroid Scripts TuxDroid BOFH excuse generator

Powered by Plone CMS, the Open Source Content Management System