", el, flags=re.DOTALL)
+ if val: # skip if no value for this property (ie, it is just a header)
+ properties[prop.group(1).strip()] = re.sub("<.*>| ", "", val.group(1).strip())
+ # Add latitude and longitude keys for direct ease of use
+ [properties['latitude'],properties['longitude']] = \
+ re.findall("[0-9\.\-]+", properties['City Lat/Lon'])
+ return properties
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Commands/Commands.glade wakeup-1.2/data/wakeup/plugin_scripts/Commands/Commands.glade
--- wakeup-1.1/data/wakeup/plugin_scripts/Commands/Commands.glade 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/plugin_scripts/Commands/Commands.glade 2011-12-26 20:08:14.000000000 -0800
@@ -0,0 +1,253 @@
+
+
+
+
+
+
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Commands/Commands.py wakeup-1.2/data/wakeup/plugin_scripts/Commands/Commands.py
--- wakeup-1.1/data/wakeup/plugin_scripts/Commands/Commands.py 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/plugin_scripts/Commands/Commands.py 2012-01-03 12:29:36.000000000 -0800
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# plugin GUI preferences class for Commands
+# Copyright (C) 2012 David Glass
+# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gtk.glade
+import os
+import re
+
+
+class Commands:
+
+ def __init__(self, pluginfolder):
+ self.wTree = gtk.Builder()
+ self.wTree.add_from_file("Commands.glade")
+ self.wTree.connect_signals(self)
+ self.window = self.wTree.get_object("window1")
+ self.item_entry = self.wTree.get_object("entry1")
+ self.command_entry = self.wTree.get_object("entry2")
+ self.command_list = self.wTree.get_object("liststore1")
+ self.selection = self.wTree.get_object("treeview-selection1")
+ self.remove_button = self.wTree.get_object("toolbutton2")
+ self.plugin_file = os.path.join(pluginfolder, "Commands.config")
+ c_file = open(self.plugin_file, "r")
+ self.lines = ''.join(c_file.readlines())
+ c_file.close()
+ old_items = re.search("dataitems=(.*)", self.lines).group(1).split(",")
+ old_commands = re.search("scripts=(.*)", self.lines).group(1).split(",")
+ for i in xrange(len(old_items)):
+ myiter = self.command_list.insert_after(None, None)
+ self.command_list.set_value(myiter, 0, '$'+old_items[i])
+ self.command_list.set_value(myiter, 1, old_commands[i])
+ # Select first item in list
+ self.selection.select_path(self.command_list.get_path(self.command_list.get_iter_first()))
+ if old_items == ['']:
+ old_items = []
+ old_command = []
+ self.on_remove_clicked(self.remove_button)
+
+ '''On Clicking Ok'''
+ def on_ok_clicked(self, widget, data=None):
+ new_item_list = ''
+ new_command_list = ''
+ item = self.command_list.get_iter_first()
+ dataitems = {}
+ if item:
+ while item:
+ if self.command_list.get_value(item, 0)[1:] in dataitems:
+ self.selection.select_path(self.command_list.get_path(item))
+ self.item_entry.set_text(self.item_entry.get_text() + 'NamesMustBeUnique')
+ return
+ else:
+ dataitems[self.command_list.get_value(item, 0)[1:]]=True
+ comma = ','
+ if new_item_list == '':
+ comma = ''
+ new_item_list = self.command_list.get_value(item, 0)[1:] + comma + new_item_list
+ new_command_list = self.command_list.get_value(item, 1) + comma + new_command_list
+ item = self.command_list.iter_next(item)
+ self.lines = "dataitems=" + new_item_list + "\nscripts=" + new_command_list
+ c_file = open(self.plugin_file, "w")
+ c_file.write(self.lines)
+ c_file.close()
+ self.on_window_destroy(self)
+
+ '''On Clicking Add'''
+ def on_add_clicked(self, widget, data=None):
+ myiter = self.command_list.append()
+ self.command_list.set_value(myiter, 0, '$newitem')
+ self.command_list.set_value(myiter, 1, 'echo "newitem"')
+ self.selection.select_path(self.command_list.get_path(myiter))
+ self.item_entry.set_sensitive(True)
+ self.command_entry.set_sensitive(True)
+ self.remove_button.set_sensitive(True)
+
+ '''On pressing delete in the list'''
+ def on_remove_clicked(self, widget, data=None):
+ model, paths = self.selection.get_selected_rows()
+ position_selected = self.command_list.get_iter_from_string(str(paths[0][0]))
+ pos = self.command_list.get_path(position_selected)[0]
+ if pos == 0:
+ newpos = (1,)
+ else:
+ newpos = (pos-1,)
+ self.selection.select_path(newpos)
+ self.command_list.remove(position_selected)
+
+ '''On Changing the item entry'''
+ def on_itementry_changed(self, widget, data=None):
+ model, paths = self.selection.get_selected_rows()
+ try:
+ position_selected = self.command_list.get_iter_from_string(str(paths[0][0]))
+ except: # setting to blank in exception in on_selection_changed
+ return
+ self.command_list.set_value(position_selected, 0, '$'+widget.get_text())
+
+ '''On Changing the command entry'''
+ def on_commandentry_changed(self, widget, data=None):
+ model, paths = self.selection.get_selected_rows()
+ try:
+ position_selected = self.command_list.get_iter_from_string(str(paths[0][0]))
+ except: # setting to blank in exception in on_selection_changed
+ return
+ self.command_list.set_value(position_selected, 1, widget.get_text())
+
+ '''On changing selection in command list'''
+ def on_selection_changed(self, widget, data=None):
+ model, paths = self.selection.get_selected_rows()
+ try:
+ position_selected = self.command_list.get_iter_from_string(str(paths[0][0]))
+ except: # empty list
+ self.item_entry.set_text("")
+ self.command_entry.set_text("")
+ self.item_entry.set_sensitive(False)
+ self.command_entry.set_sensitive(False)
+ self.remove_button.set_sensitive(False)
+ return
+ dataitem = self.command_list.get_value(position_selected, 0)
+ command = self.command_list.get_value(position_selected, 1)
+ self.item_entry.set_text(dataitem[1:])
+ self.command_entry.set_text(command)
+
+ '''On Clicking Cancel'''
+ def on_cancel_clicked(self, widget, data=None):
+ self.on_window_destroy(self)
+
+ '''Exit'''
+ def on_window_destroy(self, widget, data=None):
+ self.window.destroy()
+ gtk.main_quit()
+
+ '''Run the GUI'''
+ def main(self):
+ gtk.main()
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Commands/run_commands.sh wakeup-1.2/data/wakeup/plugin_scripts/Commands/run_commands.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/Commands/run_commands.sh 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/plugin_scripts/Commands/run_commands.sh 2012-01-03 12:29:44.000000000 -0800
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Run user-defined commands
+# Copyright (C) 2012 David Glass
+# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+
+IFS=,
+plugin_file=/home/$1/.wakeup/$ALARM/plugins/Commands/Commands.config
+dataitems=($(sed -rn 's/dataitems\s*=\s*(.*)\s*$/\1/p' $plugin_file))
+scripts=($(sed -rn 's/scripts\s*=\s*(.*)\s*$/\1/p' $plugin_file))
+
+# Make hash of dataitems->scripts
+declare -A itemscripts
+for (( i = 0; i < ${#dataitems[@]}; i++ )); do
+ itemscripts[${dataitems[$i]}]=${scripts[$i]}
+done
+
+# Execute scripts and output any text output properly
+for item in ${*:2}; do
+ eval ${itemscripts[$item]} 2>/dev/null; echo ""
+done
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/DateTime/DateTime.py wakeup-1.2/data/wakeup/plugin_scripts/DateTime/DateTime.py
--- wakeup-1.1/data/wakeup/plugin_scripts/DateTime/DateTime.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/DateTime/DateTime.py 2012-01-03 12:30:07.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for DateTime
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/DateTime/date_time.sh wakeup-1.2/data/wakeup/plugin_scripts/DateTime/date_time.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/DateTime/date_time.sh 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/DateTime/date_time.sh 2012-01-03 12:29:59.000000000 -0800
@@ -1,6 +1,6 @@
#!/bin/bash
# plugin script for DateTime outputting current date and/or time
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
plugin_file=/home/$1/.wakeup/$ALARM/plugins/DateTime/DateTime.config
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/EvolutionData/EvolutionData.py wakeup-1.2/data/wakeup/plugin_scripts/EvolutionData/EvolutionData.py
--- wakeup-1.1/data/wakeup/plugin_scripts/EvolutionData/EvolutionData.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/EvolutionData/EvolutionData.py 2012-01-03 12:30:29.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for EvolutionData
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/EvolutionData/read_evolution.py wakeup-1.2/data/wakeup/plugin_scripts/EvolutionData/read_evolution.py
--- wakeup-1.1/data/wakeup/plugin_scripts/EvolutionData/read_evolution.py 2011-10-16 10:46:25.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/EvolutionData/read_evolution.py 2012-01-05 13:39:02.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/python
# plugin script for EvolutionData outputting schedule and/or tasks
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import evolution, urllib, vobject, datetime, dateutil
@@ -47,13 +47,19 @@
parsedEvent = ev
start = parsedEvent.dtstart.value
if hasattr(parsedEvent, "rrule"):
- rrule = parsedEvent.rrule.value
- recurrences = dateutil.rrule.rrulestr(rrule, dtstart=start)
- for day in recurrences:
- if day.date() == today:
- todays_events.append(parsedEvent)
- if day.date() > today:
- break
+ try:
+ rrule = parsedEvent.rrule.value
+ rrule_until = re.search("UNTIL=[A-Za-z0-9]+",rrule)
+ if rrule_until and rrule_until.group(0)[-1] == "Z": # some weird dateutil error in time zones
+ rrule = re.sub(rrule_until.group(0), rrule_until.group(0)[:-1], rrule)
+ recurrences = dateutil.rrule.rrulestr(rrule, dtstart=start)
+ for day in recurrences:
+ if day.date() == today:
+ todays_events.append(parsedEvent)
+ if day.date() > today:
+ break
+ except TypeError:
+ pass # some weird dateutil error in time zones, just in case it's still missed
elif type(start) == datetime.date and start == today:
d=parsedEvent.dtstart.value
parsedEvent.dtstart.value = datetime.datetime.combine(d, datetime.time(0,0,0,0))
@@ -67,7 +73,7 @@
continue
for td in todos.get_all_objects():
parsedTd = vobject.readOne(td.get_as_string())
- if hasattr(parsedTd, "percent_complete") and parsedTd.percent_complete != "100":
+ if not (hasattr(parsedTd, "percent_complete") and parsedTd.percent_complete == "100"):
todo_list.append(parsedTd)
for out in to_output:
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/EvolutionData/read_evolution.sh wakeup-1.2/data/wakeup/plugin_scripts/EvolutionData/read_evolution.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/EvolutionData/read_evolution.sh 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/EvolutionData/read_evolution.sh 2012-01-03 12:30:50.000000000 -0800
@@ -1,6 +1,6 @@
#!/bin/bash
# wrapper for read_evolution.py that removes unwanted DEBUG and newlines
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
$(dirname $0)/read_evolution.py $* 2>/dev/null | sed -r '/.*DEBUG.*/d' | sed -r ':a;N;$!ba;s/\n{3,}//g'
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/GmailCounter/check_gmail.sh wakeup-1.2/data/wakeup/plugin_scripts/GmailCounter/check_gmail.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/GmailCounter/check_gmail.sh 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/GmailCounter/check_gmail.sh 2012-01-14 19:40:49.000000000 -0800
@@ -1,17 +1,18 @@
#!/bin/bash
# plugin script for GmailCounter outputting number of new emails on a gmail account.
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
eval $(cat /home/$1/.wakeup/$ALARM/plugins/GmailCounter/GmailCounter.config);
password=$(echo $password | base64 -d)
-tmpfile=/tmp/gmailcheck_tmp
-curl -u $username:$password --silent "https://mail.google.com/mail/feed/atom" \
+IFS=$'\n'
+times=($(curl -u $username:$password --silent "https://mail.google.com/mail/feed/atom" \
| grep -P ".*" | sed -r 's/(.*)T24:(.*)/\1T0:\2/' \
- | sed -r 's/(.*)T(.*)Z<\/issued>/date +%s --date "\1 \2"/' > $tmpfile
-chmod +x $tmpfile
-times=($($tmpfile))
+ | sed -r 's/(.*)T(.*)Z<\/issued>/date +%s --date "\1 \2"/'))
+for (( i = 0; i < ${#times[@]}; i++ )); do
+ times[$i]=$(date +%s -d ${times[$i]})
+done
last_checked=$(curl -u $username:$password --silent \
"https://mail.google.com/mail/feed/atom" | grep -m 1 "" \
| sed -r 's/(.*)T24:(.*)/\1T0:\2/' \
@@ -25,7 +26,5 @@
fi
done
-rm $tmpfile
-
plural="s"; if [[ $num_new_emails == 1 ]]; then plural=""; fi
echo "$num_new_emails new e-mail$plural"
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/GmailCounter/GmailCounter.py wakeup-1.2/data/wakeup/plugin_scripts/GmailCounter/GmailCounter.py
--- wakeup-1.1/data/wakeup/plugin_scripts/GmailCounter/GmailCounter.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/GmailCounter/GmailCounter.py 2012-01-03 12:31:39.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for GmailCounter
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.py wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.py
--- wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.py 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.py 2012-01-05 09:55:38.000000000 -0800
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# get hebcal data
+# Copyright (C) 2012 David Glass
+# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+
+import re
+import sys, os
+import subprocess
+
+
+# Get preferences
+plugin_file = open('/home/' + sys.argv[1] + '/.wakeup/' + os.environ['ALARM'] + '/plugins/HebrewCalendar/HebrewCalendar.config', 'r')
+plugin_text = ''.join(plugin_file.readlines())
+plugin_file.close()
+latitude = re.search("latitude=(.*)", plugin_text).group(1)
+longitude = re.search("longitude=(.*)", plugin_text).group(1)
+manual_location = re.search("manual_location=(.*)", plugin_text).group(1)
+
+# Output
+for out in sys.argv[2:len(sys.argv)]:
+ if (out == "hebdate"):
+ date = subprocess.check_output(['hebcal', '-Th'])
+ print date + '\n'
+ if (out == "hebcalevents"):
+ if (manual_location == "false"):
+ # Get location
+ sys.path.append('/usr/share/wakeup')
+ import location
+ loc = location.get_location()
+ latitude = float(loc['latitude'])
+ longitude = float(loc['longitude'])
+ else:
+ latitude = float(latitude)
+ longitude = float(longitude)
+ # Convert to hebcal +/-deg,min
+ lat_deg = int(abs(latitude))
+ lat_min = int(60 * (abs(latitude) - lat_deg))
+ lat_deg = int(latitude/abs(latitude)) * lat_deg
+ lon_deg = int(abs(longitude))
+ lon_min = int(60 * (abs(longitude) - lon_deg))
+ lon_deg = -1 * int(longitude/abs(longitude)) * lon_deg
+ latitude = str(lat_deg) + ',' + str(lat_min)
+ longitude = str(lon_deg) + ',' + str(lon_min)
+ zone = subprocess.check_output(['date','+%:::z'])
+ events = subprocess.check_output(['hebcal', '-Toc', '-l', latitude, '-L', longitude, '-z', zone])
+ events = re.sub("^[0-9].*\n", "", events)
+ print events + '\n'
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.sh wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.sh 2011-10-16 10:46:25.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/check_hebcal.sh 1969-12-31 16:00:00.000000000 -0800
@@ -1,25 +0,0 @@
-#!/bin/bash
-# plugin script for HebrewCalendar outputting Hebrew date and/or events
-# Copyright (C) 2011 David Glass
-# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
-
-plugin_file="/home/$1/.wakeup/$ALARM/plugins/HebrewCalendar/HebrewCalendar.config"
-manual_location=$(sed -rn 's/manual_location\s*=\s*(.*)\s*/\1/p' $plugin_file)
-lat=$(sed -rn 's/latitude\s*=\s*(.*)\s*/\1/p' $plugin_file)
-long=$(sed -rn 's/longitude\s*=\s*(.*)\s*/\1/p' $plugin_file)
-for i in ${*:2}; do
- if [[ $i == hebdate ]]; then
- echo $(hebcal -Th); echo ""
- fi
- if [[ $i == hebcalevents ]]; then
- if [[ $manual_location == "false" ]]; then
- latln=$(wget -q -U DummyBrowser/1.0 -O - www.ip-adress.com/ip_tracer | grep GLatLng)
- lat=$(echo $latln | grep -oP "\([0-9\-\.]+" | sed 's/(//')
- long=$(echo $latln | grep -oP "[0-9\-\.]+\)" | sed 's/)//')
- fi
- # put longitude and latitude in deg,min format. Hebcal requires that longitude sign is switched
- lat=$(echo $lat | perl -ne '$lat = abs($_); $deg = int($lat); $min = int(60 * ($lat - $deg)); print "$deg,$min"')
- long=$(echo $long | perl -ne '$long = abs($_); $deg = int($long); $min = int(60 * ($long - $deg)); $deg *= -1 if not /-/; print "$deg,$min"')
- echo $(hebcal -Toc -l $lat -L $long -z $(date +%:::z) | sed /^[0-9].*/d); echo ""
- fi
-done
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.glade wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.glade
--- wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.glade 2011-05-22 10:43:25.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.glade 2011-12-26 20:08:14.000000000 -0800
@@ -1,7 +1,6 @@
-
TrueFalse
@@ -17,7 +16,7 @@
False
- Manually set longitude, latitude:
+ Manually set decimal longitude, latitude: TrueTrueFalse
@@ -42,8 +41,6 @@
•FalseFalse
- True
- TrueTrue
@@ -70,8 +67,6 @@
•FalseFalse
- True
- TrueTrue
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.py wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.py
--- wakeup-1.1/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.py 2011-05-24 11:02:12.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/HebrewCalendar/HebrewCalendar.py 2012-01-03 12:32:26.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for Hebrew Calendar
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
@@ -49,11 +49,10 @@
self.window = parent
threading.Thread.__init__(self)
def run(self):
- self.window.LonLat = commands.getoutput('wget -q -U DummyBrowser/1.0 -O - www.ip-adress.com/ip_tracer | grep GLatLng | grep -oP "[0-9\.\-, ]{2,}"')
- lon = re.search("^[0-9\.\-]+", self.window.LonLat).group(0)
- lat = re.search("[0-9\.\-]+$", self.window.LonLat).group(0)
- self.window.longitude.set_text(lon)
- self.window.latitude.set_text(lat)
+ import location
+ loc = location.get_location()
+ self.window.longitude.set_text(loc['longitude'])
+ self.window.latitude.set_text(loc['latitude'])
'''On Checking to set weather ID manually'''
@@ -71,12 +70,6 @@
lon=""
lat=""
manual_location = "false"
- #self.lines = re.sub("longitude\s*=\s*.*\s*", "longitude=" \
- # + lon + "\n", self.lines)
- #self.lines = re.sub("latitude\s*=\s*.*\s*", "latitude=" \
- # + lat + "\n", self.lines)
- #self.lines = re.sub("manual_location\s*=\s*.*\s*", "manual_location=" \
- # + manual_location + "\n", self.lines)
hc_file = open(self.plugin_file, "w")
hc_file.write("longitude=" + lon + "\n")
hc_file.write("latitude=" + lat + "\n")
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/LastfmPlayer/LastfmPlayer.py wakeup-1.2/data/wakeup/plugin_scripts/LastfmPlayer/LastfmPlayer.py
--- wakeup-1.1/data/wakeup/plugin_scripts/LastfmPlayer/LastfmPlayer.py 2011-05-23 06:30:54.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/LastfmPlayer/LastfmPlayer.py 2012-01-03 12:32:42.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for LastfmPlayer
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/LastfmPlayer/play_lastfm.sh wakeup-1.2/data/wakeup/plugin_scripts/LastfmPlayer/play_lastfm.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/LastfmPlayer/play_lastfm.sh 2011-05-23 06:48:34.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/LastfmPlayer/play_lastfm.sh 2012-01-05 13:47:16.000000000 -0800
@@ -1,8 +1,10 @@
#!/bin/bash
# plugin script for LastfmPlayer, a wrapper for shell-fm
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+trap "killall shell-fm; exit" SIGHUP SIGINT SIGTERM
+
export HOME=/home/$1
plugin_file=~/.shell-fm/shell-fm.rc
duration=$(sed -rn 's/#duration\s*=\s*(.*)\s*/\1/p' $plugin_file)
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/MusicPlayer/MusicPlayer.py wakeup-1.2/data/wakeup/plugin_scripts/MusicPlayer/MusicPlayer.py
--- wakeup-1.1/data/wakeup/plugin_scripts/MusicPlayer/MusicPlayer.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/MusicPlayer/MusicPlayer.py 2012-01-03 12:32:59.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for MusicPlayer
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/MusicPlayer/play_music.sh wakeup-1.2/data/wakeup/plugin_scripts/MusicPlayer/play_music.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/MusicPlayer/play_music.sh 2011-05-23 06:09:28.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/MusicPlayer/play_music.sh 2012-01-05 13:51:42.000000000 -0800
@@ -1,12 +1,13 @@
#!/bin/bash
# plugin script for MusicPlayer, which plays a given file with mpg123
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+trap "killall mpg123; exit" SIGHUP SIGINT SIGTERM
+
plugin_file=/home/$1/.wakeup/$ALARM/plugins/MusicPlayer/MusicPlayer.config
MUSIC=$(sed -rn 's/music_file\s*=\s*(.*)\s*$/\1/p' $plugin_file)
ENDPOS=$(sed -rn 's/time\s*=\s*(.*)\s*$/\1/p' $plugin_file)
-echo "hello: $ENDPOS"
# note making volume 3/4 is a hack to make the music volume equal the
# low festival volume. It only needs to be done when not logged in.
if [[ `who` == "" ]]; then
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/News/News.py wakeup-1.2/data/wakeup/plugin_scripts/News/News.py
--- wakeup-1.1/data/wakeup/plugin_scripts/News/News.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/News/News.py 2012-01-03 12:33:13.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for News
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/News/read_news.py wakeup-1.2/data/wakeup/plugin_scripts/News/read_news.py
--- wakeup-1.1/data/wakeup/plugin_scripts/News/read_news.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/News/read_news.py 2012-01-05 11:24:32.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin script for News outputting news items from an rss feed
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import feedparser
@@ -18,7 +18,7 @@
feed = feedparser.parse(rss_url)
j = 1;
for i in feed.entries:
- print i.title + ".\n"
+ print i.title + ". ",
if j >= max_feeds:
break
j = j + 1
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/format_weather.pl wakeup-1.2/data/wakeup/plugin_scripts/Weather/format_weather.pl
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/format_weather.pl 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/format_weather.pl 1969-12-31 16:00:00.000000000 -0800
@@ -1,62 +0,0 @@
-#!/usr/bin/perl
-# helper script for get_weather.sh that formats weather from weather-util
-# Copyright (C) 2011 David Glass
-# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
-
-my $plugin_file = "/home/$ARGV[1]/.wakeup/$ARGV[2]/plugins/Weather/Weather.config";
-open(my $file, $plugin_file);
-my @lines = <$file>;
-my @temp_line = grep(/^temperature_units/, @lines);
-my @wind_line = grep(/^wind_units/, @lines);
-(my $blank, my $temp_units) = split(/\s*=\s*/, $temp_line[0]);
-$temp_units =~ s/\s*$//;
-(my $blank, my $wind_units) = split(/\s*=\s*/, $wind_line[0]);
-$wind_units =~ s/\s*$//;
-close($file);
-
-my $weather = `weather -qi $ARGV[0]`;
-$_ = $weather;
-s/\n/.\n/g; # put periods to distinguish sentences
-s/;/ and /g; # ; is used as an "and"
-s/SE / south east /g; # directions, including NNE, SSW, etc.
-s/NE / north east /g;
-s/NW / north west /g;
-s/SW / south west /g;
-s/N /north /g;
-s/E /east /g;
-s/W /west /g;
-s/S /south /g;
-s/\(.*? degrees\)//g; # remove exact direction
-if ($wind_units eq "mph") {
-s/MPH \(.*? KT\)/miles per hour/g; # write out MPH, remove KT
-}
-else {
-s/[0-9\.\-]*? MPH \((.*?) KT\)/\1 knots/g; # write out KT, remove MPH
-}
-if ($temp_units eq "F") {
-s/F \(.*? C\)/degrees/g; # remove C, only prints degrees
-}
-else {
-s/[0-9\.\-]*? F \((.*?) C\)/\1 degrees/g; # remove F, only prints degrees
-}
-s/ / /g; # clean up spaces
-
-# set up for splitting into array
-s/.\n/|/g;
-s/: /|/g;
-
-my $bl = "", $temperature = "", $humidity = "", $weather = "", $sky = "";
-if (/Weather/) {
- ($bl,$temp,$bl, $hum,$bl, $wind,$bl, $weather,$bl, $sky) = split(/\|/, $_);
-}
-else {
- ($bl,$temp,$bl, $hum,$bl, $wind, $bl, $sky) = split(/\|/, $_);
-}
-
-for my $to_output (@ARGV[3..$#ARGV]) {
- if ($to_output eq "temperature") {print "$temp\n\n";}
- if ($to_output eq "skyconditions") {print "$sky\n\n";}
- if ($to_output eq "humidity") {print "$hum\n\n";}
- if ($to_output eq "windconditions") {print "$wind\n\n";}
- if ($to_output eq "weatherconditions") {print "$weather\n\n";}
-}
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/get_weather.py wakeup-1.2/data/wakeup/plugin_scripts/Weather/get_weather.py
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/get_weather.py 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/get_weather.py 2012-01-15 11:50:19.000000000 -0800
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+# get weather for Weather
+# Copyright (C) 2012 David Glass
+# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+
+import re
+import pywapi
+import sys, os
+
+# Get unit preferences
+plugin_file = open('/home/' + sys.argv[1] + '/.wakeup/' + os.environ['ALARM'] + '/plugins/Weather/Weather.config', 'r')
+plugin_text = ''.join(plugin_file.readlines())
+plugin_file.close()
+temp_unit = re.search("temperature_units=(.*)", plugin_text).group(1)
+wind_unit = re.search("wind_units=(.*)", plugin_text).group(1)
+if (wind_unit == "mph"):
+ wind_unit = "miles per hour"
+manual_location = re.search("location=(.*)", plugin_text).group(1)
+
+if (manual_location != 'none'):
+ # Using manual location
+ weather = pywapi.get_weather_from_google(manual_location)
+else:
+ # Get location
+ sys.path.append('/usr/share/wakeup')
+ import location
+ loc = location.get_location()
+ weather = pywapi.get_weather_from_google(loc['City']+','+loc['State']+','+loc['Country'])
+
+
+# Output the weather
+for out in sys.argv[2:len(sys.argv)]:
+ if (out == "temperature"):
+ if temp_unit == "C":
+ print weather['current_conditions']['temp_c'] + '\n'
+ else:
+ print weather['current_conditions']['temp_f'] + '\n'
+ if (out == "skyconditions"):
+ print weather['current_conditions']['condition'] + '\n'
+ if (out == "humidity"):
+ print re.sub("Humidity: ", "", weather['current_conditions']['humidity']) + '\n'
+ if (out == "windconditions"):
+ winds = weather['current_conditions']['wind_condition']
+ magnitude = re.search("at (.*) mph", winds).group(1)
+ direction = re.search("Wind: (.*) at", winds).group(1)
+ direction = re.sub("N", "north ", direction)
+ direction = re.sub("E", "east ", direction)
+ direction = re.sub("S", "south ", direction)
+ direction = re.sub("W", "west ", direction)
+ if wind_unit == "knots":
+ magnitude = int(round(float(magnitude) * 0.868976242))
+ print direction + " at " + str(magnitude) + " " + wind_unit + '\n'
+ if (out == "high"):
+ high = int(weather['forecasts'][0]['high'])
+ if temp_unit == "C":
+ print str(int(round((high - 32)*5/9))) + '\n'
+ else:
+ print str(high) + '\n'
+ if (out == "low"):
+ low = int(weather['forecasts'][0]['low'])
+ if temp_unit == "C":
+ print str(int(round((low - 32)*5/9))) + '\n'
+ else:
+ print str(low) + '\n'
+ if (out == "todays_forecast"):
+ print weather['forecasts'][0]['condition'] + '\n'
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/get_weather.sh wakeup-1.2/data/wakeup/plugin_scripts/Weather/get_weather.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/get_weather.sh 2011-05-20 08:05:47.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/get_weather.sh 1969-12-31 16:00:00.000000000 -0800
@@ -1,12 +0,0 @@
-#!/bin/bash
-# plugin script for Weather outputting various weather conditions
-# Copyright (C) 2011 David Glass
-# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
-
-plugin_file="/home/$1/.wakeup/$ALARM/plugins/Weather/Weather.config"
-manual_location=$(sed -rn 's/location\s*=\s*(.*)\s*/\1/p' $plugin_file)
-if [[ $manual_location == "none" ]]; then
- $(dirname $0)/format_weather.pl $($(dirname $0)/id_by_ip.sh) $1 $ALARM ${*:2}
-else
- $(dirname $0)/format_weather.pl $manual_location $1 $ALARM ${*:2}
-fi
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/id_by_ip.sh wakeup-1.2/data/wakeup/plugin_scripts/Weather/id_by_ip.sh
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/id_by_ip.sh 2011-09-23 08:34:07.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/id_by_ip.sh 1969-12-31 16:00:00.000000000 -0800
@@ -1,66 +0,0 @@
-#!/bin/bash
-# plugin script for Weather to get closest metar station based on ip geolocation
-# Copyright (C) 2011 David Glass
-# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
-
-# Get ISP longitude and latitude, as well as country code and state
-wget -q -U DummyBrowser/1.0 -O /tmp/ip_tracer www.ip-adress.com/ip_tracer
-latln=$(grep GLatLng /tmp/ip_tracer)
-my_lat=$(echo $latln | grep -oP "\([0-9\-\.]+" | sed 's/(//')
-my_lon=$(echo $latln | grep -oP "[0-9\-\.]+\)" | sed 's/)//')
-countrycode=$(grep -A 2 "country code" /tmp/ip_tracer | grep -oP "[A-Z]{2}" | sed '/IP/d')
-state=$(grep -A 2 "state" /tmp/ip_tracer | tr '\n' ' ' | grep -oP "
.*
" | sed -r 's/\s*<\/?td>\s*//g')
-rm /tmp/ip_tracer
-
-# filter metar stations by country, or by state if in United States or Canada
-wget -q http://aviationweather.gov/adds/metars/stations.txt -O /tmp/metar_stations
-if [[ $countrycode == "US" || $countrycode == "CA" ]]; then
- statecode=$(grep -i -A 2 "$state" /tmp/metar_stations | grep -P "US$|CA$" | grep -oP "^[A-Z]{2}")
- grep "^$statecode" /tmp/metar_stations > /tmp/Stations
-else
- grep "$countrycode$" /tmp/metar_stations > /tmp/Stations
-fi
-rm /tmp/metar_stations
-
-# find closest metar station
-distance=40000.0 # km, approximate circumference of the earth (starting minimum dist)
-my_metar=""
-while IFS='' read line; do
- # skip useless lines
- if [[ $line =~ ^!.* || $line =~ ^$ ]]; then flag=1; continue
- elif [[ $flag == 1 ]]; then flag=0; continue
- elif [[ $line =~ " ICAO " ]]; then continue
- fi
-
- # get metar ID and skip metar stations without ID
- id=${line:20:4}
- if [[ $id == " " ]]; then continue; fi
- # convert longitude and latitude to decimal format
- lat=${line:39:6}
- lon=${line:47:7}
- lat_deg=$(echo "${lat:0:2}" | sed 's/^0//')
- lat_min=$(echo "${lat:3:2}" | sed 's/^0//')
- lat_sign=$(if [[ ${lat:5:1} == "S" ]]; then echo "-"; fi)
- lon_deg=$(echo "${lon:0:3}" | sed 's/^0//')
- lon_min=$(echo "${lon:4:2}" | sed 's/^0//')
- lon_sign=$(if [[ ${lon:6:1} == "W" ]]; then echo "-"; fi)
- lat_dec="$lat_sign$lat_deg.$(( 10000 * lat_min / 60 ))"
- lon_dec="$lon_sign$lon_deg.$(( 10000 * lon_min / 60 ))"
-
- # find shortest distance
- d=$($(dirname $0)/sphereDist.pl $my_lat $my_lon $lat_dec $lon_dec)
- d_whole=$(echo $d | grep -oP "^[0-9]+")
- d_dec=$(echo $d | grep -oP "[0-9]+$")
- dist_whole=$(echo $distance | grep -oP "^[0-9]+")
- dist_dec=$(echo $distance | grep -oP "[0-9]+$")
- if [[ $d_whole -lt $dist_whole
- || ($d_whole -eq $dist_whole && ${d_dec:1:4} < ${dist_dec:1:4}) ]]; then
- distance=$d
- my_metar=$id
- min_lat=$lat_dec
- min_lon=$lon_dec
- fi
-done < /tmp/Stations
-# output closest metar station
-echo "$my_metar"
-rm /tmp/Stations
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/sphereDist.pl wakeup-1.2/data/wakeup/plugin_scripts/Weather/sphereDist.pl
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/sphereDist.pl 2011-05-20 07:21:12.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/sphereDist.pl 1969-12-31 16:00:00.000000000 -0800
@@ -1,26 +0,0 @@
-#!/usr/bin/perl
-# plugin script for determining closest metar station. This finds distance
-# between two latitude, longitude points (+/- decimal format)
-# Copyright (C) 2011 David Glass
-# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
-# See http://en.wikipedia.org/wiki/Haversine_formula
-
-use Math::Trig;
-
-$lat1 = $ARGV[0];
-$lon1 = $ARGV[1];
-$lat2 = $ARGV[2];
-$lon2 = $ARGV[3];
-$R = 6378; # km, earth's radius assuming perfect sphere
-$havdoverR = &haversin($lat2 - $lat1) + cos($lat1)*cos($lat2)*&haversin($lon2-$lon1);
-$distance = $R * &archaversin($havdoverR) * 3.14/180;
-
-
-sub haversin {
- return (1 - cos(@_[0]))/2;
-}
-sub archaversin {
- return acos(1 - 2 * @_[0]);
-}
-
-print $distance;
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/Weather.glade wakeup-1.2/data/wakeup/plugin_scripts/Weather/Weather.glade
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/Weather.glade 2011-05-22 10:44:07.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/Weather.glade 2011-12-26 20:08:14.000000000 -0800
@@ -1,7 +1,6 @@
-
@@ -52,7 +51,7 @@
3
- Manually set location ID:
+ Manually set location (e.g.: city,state): TrueTrueFalse
@@ -69,8 +68,6 @@
•FalseFalse
- True
- True1
diff -Nru wakeup-1.1/data/wakeup/plugin_scripts/Weather/Weather.py wakeup-1.2/data/wakeup/plugin_scripts/Weather/Weather.py
--- wakeup-1.1/data/wakeup/plugin_scripts/Weather/Weather.py 2011-05-23 12:10:54.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_scripts/Weather/Weather.py 2012-01-15 11:52:20.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# plugin GUI preferences class for Weather
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
@@ -47,9 +47,9 @@
self.location = manual_id
threading.Thread.__init__(self)
def run(self):
- ip_script = '/usr/share/wakeup/plugin_scripts/Weather/id_by_ip.sh'
- ip_process = subprocess.Popen(ip_script, stdout=subprocess.PIPE)
- self.location.set_text(ip_process.communicate()[0][:-1])
+ import location
+ loc = location.get_location()
+ self.location.set_text(loc['City']+','+loc['State']+','+loc['Country'])
'''On Checking to set weather ID manually'''
diff -Nru wakeup-1.1/data/wakeup/plugin_settings/Commands.plugin wakeup-1.2/data/wakeup/plugin_settings/Commands.plugin
--- wakeup-1.1/data/wakeup/plugin_settings/Commands.plugin 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/plugin_settings/Commands.plugin 2011-12-26 20:08:14.000000000 -0800
@@ -0,0 +1,23 @@
+(dp0
+S'description'
+p1
+S'Run arbitrary command'
+p2
+sS'script'
+p3
+S'Commands/run_commands.sh'
+p4
+sS'text_output'
+p5
+I01
+sS'data_items'
+p6
+(lp7
+sS'has_preferences'
+p8
+I01
+sS'name'
+p9
+S'Commands'
+p10
+s.
\ No newline at end of file
diff -Nru wakeup-1.1/data/wakeup/plugin_settings/HebrewCalendar.plugin wakeup-1.2/data/wakeup/plugin_settings/HebrewCalendar.plugin
--- wakeup-1.1/data/wakeup/plugin_settings/HebrewCalendar.plugin 2011-05-22 10:13:32.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_settings/HebrewCalendar.plugin 2011-12-26 20:08:14.000000000 -0800
@@ -5,7 +5,7 @@
p2
sS'script'
p3
-S'HebrewCalendar/check_hebcal.sh'
+S'HebrewCalendar/check_hebcal.py'
p4
sS'text_output'
p5
diff -Nru wakeup-1.1/data/wakeup/plugin_settings/Weather.plugin wakeup-1.2/data/wakeup/plugin_settings/Weather.plugin
--- wakeup-1.1/data/wakeup/plugin_settings/Weather.plugin 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/plugin_settings/Weather.plugin 2011-12-26 20:08:14.000000000 -0800
@@ -5,7 +5,7 @@
p2
sS'script'
p3
-S'Weather/get_weather.sh'
+S'Weather/get_weather.py'
p4
sS'text_output'
p5
@@ -19,15 +19,19 @@
p9
aS'skyconditions'
p10
-aS'weatherconditions'
-p11
aS'windconditions'
+p11
+aS'high'
p12
-asS'has_preferences'
+aS'low'
p13
+aS'todays_forecast'
+p14
+asS'has_preferences'
+p15
I01
sS'name'
-p14
+p16
S'Weather'
-p15
+p17
s.
\ No newline at end of file
diff -Nru wakeup-1.1/data/wakeup/setnextalarm.py wakeup-1.2/data/wakeup/setnextalarm.py
--- wakeup-1.1/data/wakeup/setnextalarm.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/setnextalarm.py 2012-01-15 00:45:12.000000000 -0800
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# Using setalarm, finds the earliest alarm in the future which requires
# a computer wakeup and sets the computer to wake up and run that alarm.
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import sys
@@ -11,7 +11,7 @@
wakeup_folder = "/usr/share/wakeup/"
sys.path.append(wakeup_folder)
from alarm import alarm
-from commands import getstatusoutput
+import subprocess
thisscript = os.path.join(wakeup_folder, "setnextalarm.py") + " " + sys.argv[1]
setalarm_script = "/usr/bin/setalarm"
@@ -37,52 +37,54 @@
for alarm in alarms:
cronstring = alarm.get_property("cronvalue")
cronstring = re.sub("\*", '"*"', cronstring)
- [status, output] = getstatusoutput(setalarm_script + " -p -c " + \
- cronstring + " -o 0")
- if status == 0:
+ crontimes.append(re.sub('"', '', cronstring))
+ try:
+ output = subprocess.check_output([setalarm_script, '-p', '-c'] + re.split(' ', cronstring) + ['-o', '0'])
alarmtimes.append(output)
- crontimes.append(re.sub('"', '', cronstring))
- elif output == "The specified cron time does not occur within a year":
- del alarms[alarms.index(alarm)]
- else:
- print "Unable to set alarms. Some crontimes are invalid."
+ except subprocess.CalledProcessError as e:
+ if e.output == "The specified cron time does not occur within a year\n":
+ print "A specified cron time does not occur within a year; please check preferences."
+ else:
+ print "Unable to set alarms. Some crontimes are invalid."
exit(1)
# If no alarms in list, clear root's cron file and unset computer wakeup
if len(alarms) == 0:
- [status1, output] = getstatusoutput('tmpfile=/tmp/setnextalarm_tmp.txt\n' + \
- 'sudo crontab -l > $tmpfile\n' + \
- 'sed -i /^.*setnextalarm.*$/d $tmpfile\n' + \
- 'sudo crontab $tmpfile\n' + \
- 'rm $tmpfile')
- [status2, output] = getstatusoutput('sudo ' + setalarm_script + ' -u 0')
+ curcron = subprocess.check_output(['sudo', 'crontab', '-l'])
+ curcron = re.sub('[^\n]*setnextalarm.*\n', '', curcron)
+ updatecron = subprocess.Popen(['crontab', '-'], stdin = subprocess.PIPE)
+ updatecron.communicate(curcron)
+ subprocess.call(['sudo', setalarm_script, '-d'])
exit()
minalarm = min(alarmtimes)
minindex = alarmtimes.index(minalarm)
mincron = crontimes[minindex]
# make sure the wakeup is preserved through shutdowns and at alarm times. Set alarms.
-command = 'tmpfile=/tmp/setnextalarm_tmp.txt\n' + \
- 'sudo crontab -l > $tmpfile\n' + \
- 'sed -i /^.*setnextalarm.*$/d $tmpfile\n' + \
- 'echo \'' + mincron + ' DISPLAY=:0 ' + thisscript + \
- ' >/dev/null 2>&1\' >> $tmpfile\n' + \
- 'echo \'@reboot DISPLAY=:0 ' + thisscript + \
- ' >/dev/null 2>&1\' >> $tmpfile\n'
+curcron = subprocess.check_output(['sudo', 'crontab', '-l'])
+curcron = re.sub('[^\n]*setnextalarm.*\n', '', curcron)
+updatecron = subprocess.Popen(['crontab', '-'], stdin = subprocess.PIPE)
+newline1 = mincron + ' ' + thisscript + ' >/dev/null 2>&1\n'
+newline2 = '@reboot ' + thisscript + ' >/dev/null 2>&1\n'
+newcron = curcron + newline1 + newline2
for i in range(0, len(alarmtimes)):
if alarmtimes[i] == minalarm:
alarmnum = re.search("\d+$", alarmfolders[i]).group(0)
- command += 'echo \'' + mincron + ' DISPLAY=:0 ' + \
- wakeup_script + " " + sys.argv[1] + " " + alarmnum + \
- ' >/dev/null 2>&1 #entered by setnextalarm\' >> $tmpfile\n'
-command += 'sudo crontab $tmpfile\n' + \
- 'rm $tmpfile'
-[status1, output] = getstatusoutput(command)
-# set the computer to wake at the earliest of the wakeup times
-[status2, output] = getstatusoutput('sudo ' + setalarm_script + ' -u ' + minalarm)
-if status1 == 0 and status2 == 0:
- [status, output] = getstatusoutput('date -d @' + minalarm)
+ newline = mincron + ' ' + wakeup_script + ' ' + sys.argv[1] + ' ' + alarmnum + \
+ ' >/dev/null 2>&1 #entered by setnextalarm\n'
+ newcron = newcron + newline
+updatecron.communicate(newcron)
+
+success = True
+try:
+ subprocess.check_output(['sudo', setalarm_script, '-u', minalarm])
+except subprocess.CalledProcessError:
+ success = False
+try:
+ output = subprocess.check_output(['date', '-d', '@' + minalarm])
print output
-else:
+except subprocess.CalledProcessError:
+ success = False
+if not success:
print "Unable to set alarms. Check alarm time preferences."
exit(1)
diff -Nru wakeup-1.1/data/wakeup/stopalarm.glade wakeup-1.2/data/wakeup/stopalarm.glade
--- wakeup-1.1/data/wakeup/stopalarm.glade 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/stopalarm.glade 2011-12-27 11:00:54.000000000 -0800
@@ -1,38 +1,102 @@
-
+
-
+
+ 100
+ 1
+ 5
+
+
+ 59
+ 5
+ 1
+ 10
+
+ False5
+ Stop AlarmFalsecenterappointment-newnormal
- False
-
+
-
+ True
+ False2
+
+
+ True
+ False
+ end
+
+
+ Snooze
+ True
+ True
+ True
+ False
+
+
+
+ False
+ False
+ 0
+
+
+
+
+ gtk-stop
+ True
+ True
+ True
+ True
+ False
+ True
+
+
+
+ False
+ False
+ 1
+
+
+
+
+ False
+ True
+ 5
+ end
+ 0
+
+ True
+ FalseTrue
+ FalseTrue
+ False49appointment-new
+ True
+ True0True
+ FalseWakeup: press "stop" to end alarm or "snooze" to postpone.True
@@ -53,13 +117,17 @@
True
+ FalseTrue
+ False1Snooze time:
+ True
+ True50
@@ -68,7 +136,7 @@
TrueTrue
- •
+ •adjustment1True
@@ -81,6 +149,7 @@
True
+ Falsehours
@@ -94,7 +163,7 @@
TrueTrue
- •
+ •adjustment2True
@@ -107,6 +176,7 @@
True
+ Falseminutes
@@ -131,48 +201,6 @@
1
-
-
- True
- end
-
-
- Snooze
- True
- True
- True
-
-
-
- False
- False
- 0
-
-
-
-
- gtk-stop
- True
- True
- True
- True
- True
-
-
-
- False
- False
- 1
-
-
-
-
- False
- 5
- end
- 0
-
-
@@ -180,15 +208,4 @@
button1
-
- 100
- 1
- 5
-
-
- 5
- 59
- 1
- 10
-
diff -Nru wakeup-1.1/data/wakeup/stopalarm.py wakeup-1.2/data/wakeup/stopalarm.py
--- wakeup-1.1/data/wakeup/stopalarm.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/data/wakeup/stopalarm.py 2012-01-03 12:28:09.000000000 -0800
@@ -2,7 +2,7 @@
# Display GUI dialog from which the user can stop or snooze an alarm.
# Output of the script is snooze time in minutes (0=stop). Output is
# read by wakeup.
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
import pygtk
diff -Nru wakeup-1.1/data/wakeup/voice_list.sh wakeup-1.2/data/wakeup/voice_list.sh
--- wakeup-1.1/data/wakeup/voice_list.sh 2011-05-23 12:25:55.000000000 -0700
+++ wakeup-1.2/data/wakeup/voice_list.sh 2012-01-14 23:28:54.000000000 -0800
@@ -1,12 +1,12 @@
#!/bin/bash
# Output a list of "voicename\ndescription" for each voice available to
# festival. Uses voice name as description if no description found.
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
-out1=/tmp/voice_out1
-out2=/tmp/voice_out2
-out3=/tmp/voice_out3
+out1=$(mktemp)
+out2=$(mktemp)
+out3=$(mktemp)
echo "" > $out1; echo "" > $out2; echo "" > $out3
festival --server >/dev/null 2>&1 &
diff -Nru wakeup-1.1/data/wakeup/wakeup.glade wakeup-1.2/data/wakeup/wakeup.glade
--- wakeup-1.1/data/wakeup/wakeup.glade 2011-11-09 22:29:43.000000000 -0800
+++ wakeup-1.2/data/wakeup/wakeup.glade 2012-01-17 03:13:38.000000000 -0800
@@ -1,502 +1,360 @@
-
+
-
-
-
-
-
-
+
+ 110
+ 5
+ 10
+ 10
-
-
-
-
-
-
-
-
-
+
+ 23
+ 8
+ 1
+ 5
-
-
-
-
-
-
-
-
Minute
-
-
-
Hour
-
-
-
Day
-
-
-
Week
-
-
-
Month
-
-
+
+ 59
+ 30
+ 1
+ 10
-
-
-
-
-
-
-
-
-
-
-
+
+ 1
+ 31
+ 1
+ 1
+ 10
-
-
-
-
-
-
-
-
-
+
+ 100
+ 1
+ 10
+ 10
-
- True
- Wakeup Settings Configuration
- center
- 605
- 440
- appointment-new
-
-
-
+
+ False
+ 5
+ Wakeup
+ True
+ center-on-parent
+ dialog
+ True
+
+
+ True
-
-
+ False
+ immediate
+ 2
+
+ True
+ False
+ center
-
- True
- _File
- True
-
-
- True
-
-
- gtk-new
- True
- True
- True
-
-
-
-
-
- gtk-apply
- True
- True
- True
-
-
-
-
-
- True
-
-
-
-
- gtk-quit
- True
- True
- True
-
-
-
-
-
-
-
-
-
- True
- _Edit
- True
-
-
- True
-
-
- gtk-preferences
- True
- True
- True
-
-
-
-
-
- gtk-media-play
- True
- True
- True
-
-
-
-
-
- gtk-remove
- True
- True
- True
-
-
-
-
-
-
-
-
-
+
+ gtk-okTrue
- _Help
- True
-
-
- True
-
-
- True
- _Usage
- True
-
-
-
-
-
- gtk-about
- True
- True
- True
-
-
-
-
-
+ True
+ True
+ False
+ True
+
+
+ False
+ False
+ 0
+ False
- False
+ True
+ end0
-
+ True
- 7
- 5
-
-
- True
- 3
- 6
- True
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- liststore1
- False
- False
- 0
-
-
-
- dataitems
-
-
-
- 0
-
-
-
-
-
-
-
-
- 2
- 3
-
-
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- immediate
- word-char
- 6
- 6
- textbuffer1
-
-
-
-
- 2
-
-
-
-
- 0
-
-
+ False
+ label13
+ True
+ center
+
+
+ False
+ True
+ 1
+
+
+
+
+
+ button13
+
+
+
+ False
+ 5
+ Wakeup Introduction
+ center-on-parent
+ True
+ dialog
+ True
+
+
+
+ True
+ False
+ 2
+
+
+ True
+ False
+ end
-
- True
- True
-
-
-
- True
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- liststore5
- False
- 0
-
-
- Text
- True
-
-
- 7
-
-
- 0
-
-
-
-
-
-
- Time
- 0.5
-
-
-
- 1
-
-
-
-
-
-
- Recurrence
- 0.5
-
-
-
- 2
-
-
-
-
-
-
- Boot
- 0.5
-
-
-
- 3
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- True
- vertical
- icons
- False
-
-
- True
- Add alarm
- toolbutton1
- True
- gtk-add
-
-
-
- False
- True
-
-
-
-
- True
- Remove alarm
- toolbutton2
- True
- gtk-remove
-
-
-
- False
- True
-
-
-
-
- False
- False
- end
- 1
-
-
-
-
-
-
- True
- Edit multiple alarms...
-
-
+
+ gtk-ok
+ True
+ True
+ True
+ False
+ True
+
+
+
+ False
+ False
+ 0
+
+
+
+
+ False
+ True
+ end
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 0
+ 0
+ Welcome to Wakeup! Wakeup is a talking alarm clock which will set your computer to wake itself up - from shutdown if your bios allows.
+The alarm is spoken from the text in the text box on the left. A list of available data items, which allow the alarm to tell you useful information, is available from installed plugins in the list on the right. Simply type them into the alarm text or double click them. To set the alarm or plugin settings, click "Preferences." For more detailed instruction, click "Help."
+
+Note that for any part of the alarm which depends on information from the web to work when you are not logged in, you will need to set the wireless network(s) you connect to so that they connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
+ fill
+ True
+ 54
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ Always show this message at startup
+ True
+ True
+ False
+ False
+ True
+ TrueFalseFalse
+ 41
+
+
+ False
+ True
+ 1
+
+
+
+
+
+ button16
+
+
+
+ 450
+ 400
+ False
+ GDK_KEY_PRESS_MASK | GDK_STRUCTURE_MASK
+ Help
+ False
+ mouse
+ True
+ appointment-new
+ dialog
+ window
+
+
+
+
+ True
+ True
+
+
+ True
+ False
+ 6
-
+ True
- 5
- True
- start
-
-
- gtk-preferences
- True
- True
- True
- True
-
-
-
- False
- False
- 0
- True
-
-
-
-
- gtk-media-play
- True
- True
- True
- True
-
-
-
- False
- False
- 1
- True
-
-
+ True
-
- gtk-apply
+ True
- True
- True
- True
-
+ False
+ queue
+ adjustment6
+
+
+ True
+ False
+ 10
+ <b>Alarm Text</b>
+In the main text window, simply type the text that you want to have spoken when the alarm runs.
+<b>Hot Text</b>
+Available hot-text items are listed in the list at the right in the main window. These can be inserted into the text by double-clicking on them or simply typing them into your alarm text. A blank line signifies a new paragraph. Each paragraph's hot-text items are updated immediately before the text is spoken, so if you want the $time, for instance, to reflect the current time somewhere in the middle of your text, leave a blank line before the sentence in which it occurs.
+<b>Note</b> that for hot-text items dependent on data from the web to work when not logged in (see Computer Wakeup below), you need to set the wireless network(s) you connect to so that they also connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
+<b>Plugins</b>
+Available plugins are listed in the "Plugins" tab under "Preferences." Each plugin adds hot-text items to the list in the main window. A plugin's hot-text items are only interpreted if the plugin is active.
+<b>Alarm Settings</b>
+The alarm time and recurrence settings can be set under the "General" tab of "Preferences." The volume of the alarm and preferences for all hot-text items can be set as well.
+<b>Computer Wakeup</b>
+In the general preferences, there is a default option to wake the computer for alarms. With this checked, your computer will be set to wake up - from shutdown if your computer allows - five minutes prior to the set alarm time. The alarm will run even if you are not logged in. Note that this option requires administrative (root) permission.
+<b>Multiple Alarms</b>
+Each alarm's settings are completely independent. Click "Edit multiple alarms..." to create and delete alarms.
+ True
+ fill
+ True
+
+
-
- False
- False
- 2
- True
-
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
-
- gtk-close
+
+ gtk-okTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 3
- True
+ 3
+ end
+ 0
+
+
+ False
+ False
+ 3
+ 1
+
+
+
+
+
+
+ True
+ False
+ Usage
+
+
+ False
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 1
+ 1
+ <big><big><big><b>Wakeup 1.2</b></big></big></big>
+
+Copyright (c) David Glass 2012
+<dsglass@gmail.com>
+
+Copyright is GPLv3 or later
+(/usr/share/common-licenses/GPL-3)
+ True
+ center
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
-
- gtk-help
+
+ gtk-okTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 4
+ 3
+ end
+ 0FalseFalse
- end
- 2
+ 3
+ 1
@@ -504,19 +362,92 @@
1
+
+
+ True
+ False
+ About
+
+
+ 1
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Minute
+
+
+
Hour
+
+
+
Day
+
+
+
Week
+
+
+
Month
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False5
- Plugins
+ Preferencesmouse500300appointment-newdialog
-
-
+
+ True
@@ -524,29 +455,36 @@
True
+ False5True
+ False8True
+ FalseTrue
+ False0.059999998658895493True
+ False12True
+ False6True
+ FalseTime:
@@ -573,6 +511,7 @@
True
+ False :
@@ -603,6 +542,7 @@
True
+ False006
@@ -614,34 +554,40 @@
False
+ True0True
+ False0.070000000298023224True
+ False12TrueFalse
+ FalseTrueTrue
+ FalseEvery: TrueTrueFalse
+ FalseTrueTrue
-
+ False
@@ -652,9 +598,10 @@
True
+ Falseliststore31
-
+
@@ -672,6 +619,7 @@
TrueFalse
+ False Day of month:
@@ -685,7 +633,7 @@
TrueFalseTrue
- •
+ •adjustment4
@@ -696,12 +644,15 @@
+ True
+ True0True
+ FalseSun
@@ -709,9 +660,12 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True0
@@ -722,9 +676,12 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True1
@@ -735,9 +692,12 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True2
@@ -748,9 +708,12 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True3
@@ -761,9 +724,12 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True4
@@ -774,9 +740,12 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True5
@@ -787,32 +756,41 @@
FalseTrueFalse
+ FalseTrue
+ True
+ True6
+ True
+ True1True
+ FalseCron format (m h dom mon dow): TrueTrueFalse
+ FalseTrueTrueradiobutton1
-
+
+ True
+ True0
@@ -821,15 +799,19 @@
TrueFalseTrue
- •
+ •
+ True
+ True31
+ True
+ True2
@@ -843,17 +825,22 @@
TrueTrueFalse
+ FalseTrue
-
+
+ True
+ True1
+ True
+ True30
@@ -861,9 +848,11 @@
True
+ FalseTrue
+ False3Volumecenter
@@ -883,78 +872,64 @@
0
+ True
+ True1False
+ True61
+ True
+ True0
-
- True
-
-
- Set computer to wake up for alarm (requires root permission)
- True
- True
- False
- True
- True
-
-
- 10
- 0
-
-
-
-
- 2
-
-
- True
+ False6
-
- gtk-ok
+
+ gtk-cancelTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
+ 4end
- 1
+ 0
-
- gtk-cancel
+
+ gtk-okTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 4end
- 0
+ 1
@@ -966,11 +941,40 @@
1
+
+
+ True
+ False
+
+
+ Set computer to wake up for alarm (requires root permission)
+ True
+ True
+ False
+ False
+ True
+ True
+
+
+ True
+ True
+ 10
+ 0
+
+
+
+
+ True
+ True
+ 2
+
+ True
+ FalseGeneral
@@ -980,12 +984,15 @@
True
+ FalseTrue
+ FalseTrue
+ False095
@@ -1001,8 +1008,6 @@
TrueTrue
- automatic
- automaticetched-in
@@ -1012,6 +1017,9 @@
FalseFalse0
+
+
+ fixed
@@ -1029,7 +1037,7 @@
column
-
+ 1
@@ -1053,20 +1061,24 @@
+ True
+ True1True
+ FalseUse other speech tool: TrueTrueFalse
+ FalseTrue
-
+ False
@@ -1080,9 +1092,11 @@
TrueFalseTrue
- •
+ •
+ True
+ True51
@@ -1097,37 +1111,219 @@
- 0
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 6
+
+
+ gtk-cancel
+ True
+ True
+ True
+ False
+ True
+
+
+
+ False
+ False
+ 4
+ end
+ 0
+
+
+
+
+ More Voices...
+ True
+ True
+ True
+ False
+ none
+ http://ubuntuforums.org/showthread.php?t=751169
+
+
+ False
+ False
+ end
+ 1
+
+
+
+
+ gtk-ok
+ True
+ True
+ True
+ False
+ True
+
+
+
+ False
+ False
+ end
+ 2
+
+
+
+
+ False
+ False
+ 6
+ end
+ 1
+
+
+
+
+ 1
+
+
+
+
+ True
+ False
+ Voices
+
+
+ 1
+ False
+
+
+
+
+ True
+ False
+ 4
+
+
+ True
+ False
+
+
+ True
+ False
+ 9
+ 5
+ Available Plugins:
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ False
+ 0
+
+
+
+
+ True
+ True
+ etched-in
+
+
+ True
+ True
+ liststore2
+ False
+ 0
+
+
+
+
+
+
+ Active
+ 1
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ Plugin
+ True
+
+
+
+ 0
+
+
+
+
+
+
+ Description
+ True
+
+
+
+ 1
+
+
+
+
+
+
+
+
+ True
+ True
+ 1
-
+ True
+ False6
-
- gtk-ok
+
+ gtk-cancelTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
+ 4end
- 2
+ 0
-
- More Voices...
+
+ gtk-preferencesTrue
+ FalseTrueTrue
- none
- http://ubuntuforums.org/showthread.php?t=751169
+ False
+ True
+ False
@@ -1137,20 +1333,20 @@
-
- gtk-cancel
+
+ gtk-okTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 4end
- 0
+ 2
@@ -1159,554 +1355,543 @@
False6end
- 1
+ 2
- 1
+ 2
-
+ True
- Voices
+ False
+ Plugins
- 1
+ 2False
+ True
+
+
+
+
+ Type your alarm text here, inserting hot text items from the list at the right as desired. For example:
+
+Good morning. Today is $date. The time is $time. It is $temperature degrees outside with $skyconditions skies, and winds $windconditions. Expect $todays_forecast, with a high of $high and low of $low.
+
+Be sure to modify individual plug-in preferences under the "plugins" tab in the Preferences window. This allows you to specify which mp3 file you will hear from the music item, whether to present weather in Farenheit or Celsius, and so on.
+
+Note that hot text items are loaded at the beginning of each paragraph (a new paragraph is specified by leaving one or more blank lines). Hence the time is now $time, whereas in the previous paragraph it might have been a minute earlier.
+
+
+ Alarm Text
+In the main text window, simply type the text that you want to have spoken when the alarm runs.
+Hot Text
+Available hot-text items are listed in the list at the right in the main window. These can be inserted into the text by double-clicking on them or simply typing them into your alarm text. A blank line signifies a new paragraph. Each paragraph's hot-text items are updated immediately before the text is spoken, so if you want the $time, for instance, to reflect the current time somewhere in the middle of your text, leave a blank line before the sentence in which it occurs.
+Note that for hot-text items dependent on data from the web to work when not logged in (see Computer Wakeup below), you need to set the wireless network(s) you connect to so that they also connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
+Plugins
+Available plugins are listed in the "Plugins" tab under "Preferences." Each plugin adds hot-text items to the list in the main window. A plugin's hot-text items are only interpreted if the plugin is active.
+Alarm Settings
+The alarm time and recurrence settings can be set under the "General" tab of "Preferences." The volume of the alarm and preferences for all hot-text items can be set as well.
+Computer Wakeup
+In the general preferences, there is a default option to wake the computer for alarms. With this checked, your computer will be set to wake up - from shutdown if your computer allows - five minutes prior to the set alarm time. The alarm will run even if you are not logged in. Note that this option requires administrative (root) permission.
+
+
+ True
+ False
+ Wakeup Settings Configuration
+ center
+ 605
+ 440
+ appointment-new
+
+
+
+ True
+ False
-
+ True
- 4
+ False
-
+
+ True
+ False
+ False
+ _File
+ True
+
+
+ True
+ False
+
+
+ gtk-new
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+ gtk-apply
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+ True
+ False
+
+
+
+
+ gtk-quit
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+
+
+
+
+ True
+ False
+ False
+ _Edit
+ True
+
+
+ True
+ False
+
+
+ gtk-preferences
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+ gtk-media-play
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+ gtk-remove
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+
+
+
+
+ True
+ False
+ False
+ _Help
+ True
+
+
+ True
+ False
+
+
+ True
+ False
+ False
+ _Usage
+ True
+
+
+
+
+
+ gtk-about
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ False
+ 0
+
+
+
+
+ True
+ False
+ 7
+ 5
+
+ True
+ False
+ 3
+ 6
+ True
-
+ True
- 9
- 5
- Available Plugins:
+ True
+ etched-in
+
+
+ True
+ True
+ liststore1
+ False
+ False
+ 0
+
+
+
+
+
+
+ dataitems
+
+
+
+ 0
+
+
+
+
+
+
- False
- 0
+ 2
+ 3
+
+
+
+
+ True
+ True
+ etched-in
+
+
+ True
+ True
+ immediate
+ word-char
+ 6
+ 6
+ textbuffer1
+
+
+
+
+ 2
- False
- False
+ True
+ True0
-
+ TrueTrue
- automatic
- automatic
- etched-in
+
-
+ True
- True
- liststore2
- False
- 0
-
+ False
-
- Active
- 1
+
+ True
+ True
+ etched-in
-
-
+
+ True
+ True
+ liststore5
+ False
+ 0
+
+
+
+
+
+ Text
+ True
+
+
+ 7
+
+
+ 0
+
+
+
+
+
+
+ Time
+ 0.5
+
+
+
+ 1
+
+
+
+
+
+
+ Recurrence
+ 0.5
+
+
+
+ 2
+
+
+
+
+
+
+ Boot
+ 0.5
+
+
+
+ 3
+
+
+
+
-
- 2
-
+
+ True
+ True
+ 0
+
-
- Plugin
- True
+
+ True
+ False
+ vertical
+ icons
+ False
-
-
- 0
-
+
+ True
+ False
+ Add alarm
+ False
+ toolbutton1
+ True
+ gtk-add
+
+
+
+ False
+ True
+
-
-
-
-
- Description
- True
-
-
- 1
-
+
+ True
+ False
+ Remove alarm
+ False
+ toolbutton2
+ True
+ gtk-remove
+
+
+
+ False
+ True
+
+
+ False
+ False
+ end
+ 1
+
+
+
+ True
+ False
+ Edit multiple alarms...
+
+
+ False
+ False1
-
+ True
- 6
+ False
+ 5
+ True
+ start
-
- gtk-ok
+
+ gtk-preferencesTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- end
- 2
+ 1
+ True
-
- gtk-preferences
+
+ gtk-media-playTrue
- FalseTrueTrue
+ FalseTrue
-
+ FalseFalse
- end
- 1
+ 3
+ True
-
- gtk-cancel
+
+ gtk-helpTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 4
- end
- 0
+ 4
-
-
- False
- False
- 6
- end
- 2
-
-
-
-
- 2
-
-
-
-
- True
- Plugins
-
-
- 2
- False
- True
-
-
-
-
-
-
- 450
- 400
- GDK_KEY_PRESS_MASK | GDK_STRUCTURE_MASK
- Help
- False
- mouse
- True
- appointment-new
- dialog
- window
-
-
-
-
- True
- True
-
-
- True
- 6
-
-
- True
- True
- automatic
- automatic
-
-
- True
- queue
- adjustment6
-
-
- True
- 10
- <b>Alarm Text</b>
-In the main text window, simply type the text that you want to have spoken when the alarm runs.
-<b>Hot Text</b>
-Available hot-text items are listed in the list at the right in the main window. These can be inserted into the text by double-clicking on them or simply typing them into your alarm text. A blank line signifies a new paragraph. Each paragraph's hot-text items are updated immediately before the text is spoken, so if you want the $time, for instance, to reflect the current time somewhere in the middle of your text, leave a blank line before the sentence in which it occurs.
-<b>Note</b> that for hot-text items dependent on data from the web to work when not logged in (see Computer Wakeup below), you need to set the wireless network(s) you connect to so that they also connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
-<b>Plugins</b>
-Available plugins are listed in the "Plugins" tab under "Preferences." Each plugin adds hot-text items to the list in the main window. A plugin's hot-text items are only interpreted if the plugin is active.
-<b>Alarm Settings</b>
-The alarm time and recurrence settings can be set under the "General" tab of "Preferences." The volume of the alarm and preferences for all hot-text items can be set as well.
-<b>Computer Wakeup</b>
-In the general preferences, there is a default option to wake the computer for alarms. With this checked, your computer will be set to wake up - from shutdown if your computer allows - five minutes prior to the set alarm time. The alarm will run even if you are not logged in. Note that this option requires administrative (root) permission.
-<b>Multiple Alarms</b>
-Each alarm's settings are completely independent. Click "Edit multiple alarms..." to create and delete alarms.
- True
- fill
- True
-
-
-
-
-
-
- 0
-
-
-
-
- True
-
-
- gtk-ok
+
+
+ gtk-applyTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 3
- end
- 0
+ 4
+ True
-
-
- False
- False
- 3
- 1
-
-
-
-
-
-
- True
- Usage
-
-
- False
-
-
-
-
- True
-
-
- True
- 1
- 1
- <big><big><big><b>Wakeup 1.1</b></big></big></big>
-
-Copyright (c) David Glass 2011
-<dsglass@gmail.com>
-
-Copyright is GPLv3 or later
-(/usr/share/common-licenses/GPL-3)
- True
- center
-
-
- 0
-
-
-
-
- True
-
- gtk-ok
+
+ gtk-closeTrueTrueTrue
+ FalseTrue
-
+ FalseFalse
- 3
- end
- 0
+ 5
+ TrueFalseFalse
- 3
- 1
-
-
-
-
- 1
-
-
-
-
- True
- About
-
-
- 1
- False
-
-
-
-
-
-
- Type your alarm text here, inserting hot text items from the list at the right as desired. For example:
-
-Good morning. Today is $date. The time is $time. It is $temperature outside with $skyconditions skies, $weatherconditions, and winds $windconditions.
-
-Note that hot text items are loaded at the beginning of each paragraph (a new paragraph is specified by leaving one or more blank lines). Hence the time is now $time, whereas in the previous paragraph it might have been a minute earlier.
-
-
- 110
- 5
- 10
- 10
-
-
- 1
- 1
- 31
- 1
- 10
-
-
- 30
- 59
- 1
- 10
-
-
- 8
- 23
- 1
- 5
-
-
- 5
- Wakeup
- True
- center-on-parent
- dialog
- True
- False
-
-
-
- True
- immediate
- 2
-
-
- True
- label13
- True
- center
-
-
- 1
-
-
-
-
- True
- center
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- 0
-
-
-
-
- False
- end
- 0
-
-
-
-
-
- button13
-
-
-
- 5
- Wakeup Introduction
- center-on-parent
- True
- dialog
- True
- False
-
-
-
- True
- 2
-
-
- True
-
-
- True
- 0
- 0
- Welcome to Wakeup! Wakeup is a talking alarm clock which will set your computer to wake itself up - from shutdown if your bios allows.
-The alarm is spoken from the text in the text box on the left. A list of available data items, which allow the alarm to tell you useful information, is available from installed plugins in the list on the right. Simply type them into the alarm text or double click them. To set the alarm or plugin settings, click "Preferences." For more detailed instruction, click "Help."
-
-Note that for any part of the alarm which depends on information from the web to work when you are not logged in, you will need to set the wireless network(s) you connect to so that they connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
- fill
- True
- 54
-
-
-
- False
- 0
-
-
-
-
- Always show this message at startup
- True
- True
- False
- True
- True
-
-
- False
- False
- 4
- 1
+ end
+ 2
+ True
+ True1
-
-
- True
- end
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- 0
-
-
-
-
- False
- end
- 0
-
-
-
- button16
-
-
-
- Alarm Text
-In the main text window, simply type the text that you want to have spoken when the alarm runs.
-Hot Text
-Available hot-text items are listed in the list at the right in the main window. These can be inserted into the text by double-clicking on them or simply typing them into your alarm text. A blank line signifies a new paragraph. Each paragraph's hot-text items are updated immediately before the text is spoken, so if you want the $time, for instance, to reflect the current time somewhere in the middle of your text, leave a blank line before the sentence in which it occurs.
-Note that for hot-text items dependent on data from the web to work when not logged in (see Computer Wakeup below), you need to set the wireless network(s) you connect to so that they also connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
-Plugins
-Available plugins are listed in the "Plugins" tab under "Preferences." Each plugin adds hot-text items to the list in the main window. A plugin's hot-text items are only interpreted if the plugin is active.
-Alarm Settings
-The alarm time and recurrence settings can be set under the "General" tab of "Preferences." The volume of the alarm and preferences for all hot-text items can be set as well.
-Computer Wakeup
-In the general preferences, there is a default option to wake the computer for alarms. With this checked, your computer will be set to wake up - from shutdown if your computer allows - five minutes prior to the set alarm time. The alarm will run even if you are not logged in. Note that this option requires administrative (root) permission.
-
-
- 100
- 1
- 10
- 10
diff -Nru wakeup-1.1/data/wakeup/wakeup.glade~ wakeup-1.2/data/wakeup/wakeup.glade~
--- wakeup-1.1/data/wakeup/wakeup.glade~ 2011-09-23 10:16:06.000000000 -0700
+++ wakeup-1.2/data/wakeup/wakeup.glade~ 1969-12-31 16:00:00.000000000 -0800
@@ -1,1712 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Minute
-
-
-
Hour
-
-
-
Day
-
-
-
Week
-
-
-
Month
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Wakeup Settings Configuration
- center
- 605
- 440
- appointment-new
-
-
-
- True
-
-
- True
-
-
- True
- _File
- True
-
-
- True
-
-
- gtk-new
- True
- True
- True
-
-
-
-
-
- gtk-apply
- True
- True
- True
-
-
-
-
-
- True
-
-
-
-
- gtk-quit
- True
- True
- True
-
-
-
-
-
-
-
-
-
- True
- _Edit
- True
-
-
- True
-
-
- gtk-preferences
- True
- True
- True
-
-
-
-
-
- gtk-media-play
- True
- True
- True
-
-
-
-
-
- gtk-remove
- True
- True
- True
-
-
-
-
-
-
-
-
-
- True
- _Help
- True
-
-
- True
-
-
- True
- _Usage
- True
-
-
-
-
-
- gtk-about
- True
- True
- True
-
-
-
-
-
-
-
-
-
- False
- False
- 0
-
-
-
-
- True
- 7
- 5
-
-
- True
- 3
- 6
- True
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- liststore1
- False
- False
- 0
-
-
-
- dataitems
-
-
-
- 0
-
-
-
-
-
-
-
-
- 2
- 3
-
-
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- immediate
- word-char
- 6
- 6
- textbuffer1
-
-
-
-
- 2
-
-
-
-
- 0
-
-
-
-
- True
- True
-
-
-
- True
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- liststore5
- False
- 0
-
-
- Text
- True
-
-
- 7
-
-
- 0
-
-
-
-
-
-
- Time
- 0.5
-
-
-
- 1
-
-
-
-
-
-
- Recurrence
- 0.5
-
-
-
- 2
-
-
-
-
-
-
- Boot
- 0.5
-
-
-
- 3
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- True
- vertical
- icons
- False
-
-
- True
- Add alarm
- toolbutton1
- True
- gtk-add
-
-
-
- False
- True
-
-
-
-
- True
- Remove alarm
- toolbutton2
- True
- gtk-remove
-
-
-
- False
- True
-
-
-
-
- False
- False
- end
- 1
-
-
-
-
-
-
- True
- Edit multiple alarms...
-
-
-
-
- False
- False
- 1
-
-
-
-
- True
- 5
- True
- start
-
-
- gtk-preferences
- True
- True
- True
- True
-
-
-
- False
- False
- 0
- True
-
-
-
-
- gtk-media-play
- True
- True
- True
- True
-
-
-
- False
- False
- 1
- True
-
-
-
-
- gtk-apply
- True
- True
- True
- True
-
-
-
- False
- False
- 2
- True
-
-
-
-
- gtk-close
- True
- True
- True
- True
-
-
-
- False
- False
- 3
- True
-
-
-
-
- gtk-help
- True
- True
- True
- True
-
-
-
- False
- False
- 4
-
-
-
-
- False
- False
- end
- 2
-
-
-
-
- 1
-
-
-
-
-
-
- 5
- Plugins
- mouse
- 500
- 300
- appointment-new
- dialog
-
-
-
-
- True
- True
-
-
- True
- 5
-
-
- True
- 8
-
-
- True
-
-
- True
- 0.059999998658895493
-
-
- True
- 12
-
-
- True
- 6
-
-
- True
- Time:
-
-
- False
- False
- 0
-
-
-
-
- True
- True
- 2
- 0
- adjustment2
- 1
-
-
- False
- False
- 1
-
-
-
-
- True
- :
-
-
- False
- False
- 2
-
-
-
-
- True
- True
- 2
- 0
- adjustment3
- 1
-
-
- False
- False
- 3
-
-
-
-
-
-
-
-
- True
- 0
- 0
- 6
- 6
- Alarm time
- True
-
-
-
-
- False
- 0
-
-
-
-
- True
- 0.070000000298023224
-
-
- True
- 12
-
-
- True
- False
- True
-
-
- True
-
-
- Every:
- True
- True
- False
- True
- True
-
-
-
- False
- False
- 0
-
-
-
-
- True
- liststore3
- 1
-
-
-
-
- 0
-
-
-
-
- False
- False
- 1
-
-
-
-
- True
- False
- Day of month:
-
-
- False
- False
- 2
-
-
-
-
- True
- False
- True
- •
- adjustment4
-
-
- False
- False
- 3
-
-
-
-
- 0
-
-
-
-
- True
-
-
- Sun
- True
- False
- True
- False
- True
-
-
- 0
-
-
-
-
- Mon
- True
- False
- True
- False
- True
-
-
- 1
-
-
-
-
- Tue
- True
- False
- True
- False
- True
-
-
- 2
-
-
-
-
- Wed
- True
- False
- True
- False
- True
-
-
- 3
-
-
-
-
- Thu
- True
- False
- True
- False
- True
-
-
- 4
-
-
-
-
- Fri
- True
- False
- True
- False
- True
-
-
- 5
-
-
-
-
- Sat
- True
- False
- True
- False
- True
-
-
- 6
-
-
-
-
- 1
-
-
-
-
- True
-
-
- Cron format (m h dom mon dow):
- True
- True
- False
- True
- True
- radiobutton1
-
-
-
- 0
-
-
-
-
- True
- False
- True
- •
-
-
- 3
- 1
-
-
-
-
- 2
-
-
-
-
-
-
-
-
- Recurrs
- True
- True
- False
- True
-
-
-
-
-
- 1
-
-
-
-
- 3
- 0
-
-
-
-
- True
-
-
- True
- 3
- Volume
- center
-
-
- False
- False
- 0
-
-
-
-
- True
- True
- adjustment1
- True
- 0
-
-
- 1
-
-
-
-
- False
- 6
- 1
-
-
-
-
- 0
-
-
-
-
- True
-
-
- Set computer to wake up for alarm (requires root permission)
- True
- True
- False
- True
- True
-
-
- 10
- 0
-
-
-
-
- 2
-
-
-
-
- True
- 6
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- end
- 1
-
-
-
-
- gtk-cancel
- True
- True
- True
- True
-
-
-
- False
- False
- 4
- end
- 0
-
-
-
-
- False
- False
- 6
- end
- 1
-
-
-
-
-
-
- True
- General
-
-
- False
-
-
-
-
- True
-
-
- True
-
-
- True
- 0
- 9
- 5
- Choose voice (using festival speech tool):
-
-
- False
- False
- 0
-
-
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- liststore4
- False
- False
- 0
-
-
- fixed
- 1
- 0
- column
-
-
-
-
-
-
-
- 40
- column
-
-
-
-
-
- 1
-
-
-
-
-
-
- 400
- column
-
-
-
- 0
-
-
-
-
-
-
-
-
- 1
-
-
-
-
- True
-
-
- Use other speech tool:
- True
- True
- False
- True
-
-
-
- False
- False
- 5
- 0
-
-
-
-
- True
- False
- True
- •
-
-
- 5
- 1
-
-
-
-
- False
- False
- 4
- 2
-
-
-
-
- 0
-
-
-
-
- True
- 6
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- end
- 2
-
-
-
-
- More Voices...
- True
- True
- True
- none
- http://ubuntuforums.org/showthread.php?t=751169
-
-
- False
- False
- end
- 1
-
-
-
-
- gtk-cancel
- True
- True
- True
- True
-
-
-
- False
- False
- 4
- end
- 0
-
-
-
-
- False
- False
- 6
- end
- 1
-
-
-
-
- 1
-
-
-
-
- True
- Voices
-
-
- 1
- False
-
-
-
-
- True
- 4
-
-
- True
-
-
- True
- 9
- 5
- Available Plugins:
-
-
- False
- 0
-
-
-
-
- False
- False
- 0
-
-
-
-
- True
- True
- automatic
- automatic
- etched-in
-
-
- True
- True
- liststore2
- False
- 0
-
-
-
- Active
- 1
-
-
-
-
-
- 2
-
-
-
-
-
-
- Plugin
- True
-
-
-
- 0
-
-
-
-
-
-
- Description
- True
-
-
-
- 1
-
-
-
-
-
-
-
-
- 1
-
-
-
-
- True
- 6
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- end
- 2
-
-
-
-
- gtk-preferences
- True
- False
- True
- True
- True
-
-
-
- False
- False
- end
- 1
-
-
-
-
- gtk-cancel
- True
- True
- True
- True
-
-
-
- False
- False
- 4
- end
- 0
-
-
-
-
- False
- False
- 6
- end
- 2
-
-
-
-
- 2
-
-
-
-
- True
- Plugins
-
-
- 2
- False
- True
-
-
-
-
-
-
- 450
- 400
- GDK_KEY_PRESS_MASK | GDK_STRUCTURE_MASK
- Help
- False
- mouse
- True
- appointment-new
- dialog
- window
-
-
-
-
- True
- True
-
-
- True
- 6
-
-
- True
- True
- automatic
- automatic
-
-
- True
- queue
- adjustment6
-
-
- True
- 10
- <b>Alarm Text</b>
-In the main text window, simply type the text that you want to have spoken when the alarm runs.
-<b>Hot Text</b>
-Available hot-text items are listed in the list at the right in the main window. These can be inserted into the text by double-clicking on them or simply typing them into your alarm text. A blank line signifies a new paragraph. Each paragraph's hot-text items are updated immediately before the text is spoken, so if you want the $time, for instance, to reflect the current time somewhere in the middle of your text, leave a blank line before the sentence in which it occurs.
-<b>Note</b> that for hot-text items dependent on data from the web to work when not logged in (see Computer Wakeup below), you need to set the wireless network(s) you connect to so that they also connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
-<b>Plugins</b>
-Available plugins are listed in the "Plugins" tab under "Preferences." Each plugin adds hot-text items to the list in the main window. A plugin's hot-text items are only interpreted if the plugin is active.
-<b>Alarm Settings</b>
-The alarm time and recurrence settings can be set under the "General" tab of "Preferences." The volume of the alarm and preferences for all hot-text items can be set as well.
-<b>Computer Wakeup</b>
-In the general preferences, there is a default option to wake the computer for alarms. With this checked, your computer will be set to wake up - from shutdown if your computer allows - five minutes prior to the set alarm time. The alarm will run even if you are not logged in. Note that this option requires administrative (root) permission.
-<b>Multiple Alarms</b>
-Each alarm's settings are completely independent. Click "Edit multiple alarms..." to create and delete alarms.
- True
- fill
- True
-
-
-
-
-
-
- 0
-
-
-
-
- True
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- 3
- end
- 0
-
-
-
-
- False
- False
- 3
- 1
-
-
-
-
-
-
- True
- Usage
-
-
- False
-
-
-
-
- True
-
-
- True
- 1
- 1
- <big><big><big><b>Wakeup 1.0</b></big></big></big>
-
-Copyright (c) David Glass 2011
-<dsglass@gmail.com>
-
-Copyright is GPLv3 or later
-(/usr/share/common-licenses/GPL-3)
- True
- center
-
-
- 0
-
-
-
-
- True
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- 3
- end
- 0
-
-
-
-
- False
- False
- 3
- 1
-
-
-
-
- 1
-
-
-
-
- True
- About
-
-
- 1
- False
-
-
-
-
-
-
- Type your alarm text here, inserting hot text items from the list at the right as desired. For example:
-
-Good morning. Today is $date. The time is $time. It is $temperature outside with $skyconditions skies, $weatherconditions, and winds $windconditions.
-
-Note that hot text items are loaded at the beginning of each paragraph (a new paragraph is specified by leaving one or more blank lines). Hence the time is now $time, whereas in the previous paragraph it might have been a minute earlier.
-
-
- 110
- 5
- 10
- 10
-
-
- 1
- 1
- 31
- 1
- 10
-
-
- 30
- 59
- 1
- 10
-
-
- 8
- 23
- 1
- 5
-
-
- 5
- Wakeup
- True
- center-on-parent
- dialog
- True
- False
-
-
-
- True
- immediate
- 2
-
-
- True
- label13
- True
- center
-
-
- 1
-
-
-
-
- True
- center
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- 0
-
-
-
-
- False
- end
- 0
-
-
-
-
-
- button13
-
-
-
- 5
- Wakeup Introduction
- center-on-parent
- True
- dialog
- True
- False
-
-
-
- True
- 2
-
-
- True
-
-
- True
- 0
- 0
- Welcome to Wakeup! Wakeup is a talking alarm clock which will set your computer to wake itself up - from shutdown if your bios allows.
-The alarm is spoken from the text in the text box on the left. A list of available data items, which allow the alarm to tell you useful information, is available from installed plugins in the list on the right. Simply type them into the alarm text or double click them. To set the alarm or plugin settings, click "Preferences." For more detailed instruction, click "Help."
-
-Note that for any part of the alarm which depends on information from the web to work when you are not logged in, you will need to set the wireless network(s) you connect to so that they connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
- fill
- True
- 54
-
-
-
- False
- 0
-
-
-
-
- Always show this message at startup
- True
- True
- False
- True
- True
-
-
- False
- False
- 4
- 1
-
-
-
-
- 1
-
-
-
-
- True
- end
-
-
- gtk-ok
- True
- True
- True
- True
-
-
-
- False
- False
- 0
-
-
-
-
- False
- end
- 0
-
-
-
-
-
- button16
-
-
-
- Alarm Text
-In the main text window, simply type the text that you want to have spoken when the alarm runs.
-Hot Text
-Available hot-text items are listed in the list at the right in the main window. These can be inserted into the text by double-clicking on them or simply typing them into your alarm text. A blank line signifies a new paragraph. Each paragraph's hot-text items are updated immediately before the text is spoken, so if you want the $time, for instance, to reflect the current time somewhere in the middle of your text, leave a blank line before the sentence in which it occurs.
-Note that for hot-text items dependent on data from the web to work when not logged in (see Computer Wakeup below), you need to set the wireless network(s) you connect to so that they also connect before you log in. This can be done through NetworkManager, by selecting a connection, clicking "Edit..." and checking "Available to all users."
-Plugins
-Available plugins are listed in the "Plugins" tab under "Preferences." Each plugin adds hot-text items to the list in the main window. A plugin's hot-text items are only interpreted if the plugin is active.
-Alarm Settings
-The alarm time and recurrence settings can be set under the "General" tab of "Preferences." The volume of the alarm and preferences for all hot-text items can be set as well.
-Computer Wakeup
-In the general preferences, there is a default option to wake the computer for alarms. With this checked, your computer will be set to wake up - from shutdown if your computer allows - five minutes prior to the set alarm time. The alarm will run even if you are not logged in. Note that this option requires administrative (root) permission.
-
-
- 100
- 1
- 10
- 10
-
-
diff -Nru wakeup-1.1/data/wakeup/wakeupRootHelper wakeup-1.2/data/wakeup/wakeupRootHelper
--- wakeup-1.1/data/wakeup/wakeupRootHelper 1969-12-31 16:00:00.000000000 -0800
+++ wakeup-1.2/data/wakeup/wakeupRootHelper 2012-02-07 10:21:14.000000000 -0800
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Helper program to allow elevated privaleges for wakeup-settings (and alarm.py)
+# using pkexec without giving away privaleges to other scripts
+# Copyright (C) 2012 David Glass
+# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
+
+commands=(/usr/bin/setalarm /usr/bin/crontab /usr/share/wakeup/setnextalarm.py /usr/share/wakeup/createRootPlayfile.py)
+allowed=false
+for i in ${commands[@]}; do
+ if [[ $1 = $i ]]; then
+ allowed=true
+ fi
+done
+if [[ $allowed != true ]]; then
+ echo "$1: Elevated command not allowed."
+ exit 1
+else
+ eval $*
+fi
+
diff -Nru wakeup-1.1/debian/changelog wakeup-1.2/debian/changelog
--- wakeup-1.1/debian/changelog 2011-11-22 18:15:10.000000000 -0800
+++ wakeup-1.2/debian/changelog 2012-02-07 10:40:24.000000000 -0800
@@ -1,3 +1,26 @@
+wakeup (1.2-0ubuntu1) precise; urgency=low
+
+ * New upstream release (LP: #909189).
+ - Moved from using gksudo to using pkexec. Added policy file.
+ - Changed weather source to google using python-pywapi
+ - Added location.py in wakeup directory as plugin helper
+ - Added plugin "Commands" which allows arbitrary user dataitems
+ - Changed HebrewCalendar to use location from location.py
+ - fixed problems to do with hard-coded DISPLAY variable
+ - fixed issues with stopping the alarm
+ - removed calls to os.system and commands.get(status)output
+ - use secure temp files (LP: #912762)
+ - root-owned chmod 700 playable_text file for boot alarms
+ - small bug fixes
+ * Updated packaging
+ - replaced gksu with python-dbus in debian/control
+ - Removed all perl dependencies
+ - wrap-and-sort debian/
+ - converted copyright to dep5 format
+ - use dh_python2 instead of pysupport
+
+ -- David Glass Tue, 07 Feb 2012 10:36:30 -0800
+
wakeup (1.1-0ubuntu1) precise; urgency=low
* New upstream release (LP: #876649).
diff -Nru wakeup-1.1/debian/control wakeup-1.2/debian/control
--- wakeup-1.1/debian/control 2011-05-23 06:50:56.000000000 -0700
+++ wakeup-1.2/debian/control 2012-02-07 10:39:28.000000000 -0800
@@ -3,13 +3,26 @@
Priority: optional
Maintainer: Ubuntu Developers
XSBC-Original-Maintainer: David Glass
-Build-Depends: cdbs (>= 0.4.62), debhelper (>= 7), python (>=2.4), python-support
+Build-Depends: cdbs (>= 0.4.90~), debhelper (>= 7), python (>=2.6.6-3~)
Standards-Version: 3.9.2
Homepage: https://launchpad.net/wakeup
Package: wakeup
Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, weather-util, python-evolution, python-dateutil, python-vobject, python-feedparser, python-glade2, festival, perl, curl, gksu, shell-fm, mpg123
+Depends: curl,
+ festival,
+ mpg123,
+ python-dateutil,
+ python-dbus,
+ python-evolution,
+ python-feedparser,
+ python-glade2,
+ python-pywapi,
+ python-vobject,
+ shell-fm,
+ weather-util,
+ ${misc:Depends},
+ ${python:Depends}
Suggests: hebcal
Description: Fully customizable and extensible talking alarm clock
This package has a complete graphical front end with which a user can set an
diff -Nru wakeup-1.1/debian/copyright wakeup-1.2/debian/copyright
--- wakeup-1.1/debian/copyright 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/debian/copyright 2012-01-10 01:50:07.000000000 -0800
@@ -1,36 +1,24 @@
-This work was created by:
-
- David Glass on Sun, 04 Jul 2011 15:34:46 -0400
-
-Upstream Author(s):
-
- David Glass
-
-Copyright:
-
-
-
-License:
-
- This program, including all source files and
- documentation, 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 3 of the License, or
- (at your option) any later version.
-
- This package 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, see .
-
-On Debian systems, the complete text of the GNU General
-Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'.
-
-The Debian packaging is:
-
- Copyright (C) 2011 David Glass
-
-and is licensed under the GPL version 3, see above.
+Format: http://dep.debian.net/deps/dep5/
+Upstream-Name: Wakeup
+Upstream-Contact: David Glass
+Source: https://launchpad.net/wakeup
+
+Files: *
+Copyright: Copyright (C) 2012 David Glass
+License: GPL-3+
+ This program, including all source files and documentation,
+ 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 3
+ of the License, or (at your option) any later version.
+ .
+ This package 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, see .
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 3 can be found in `/usr/share/common-licenses/GPL-3'.
diff -Nru wakeup-1.1/debian/pyversions wakeup-1.2/debian/pyversions
--- wakeup-1.1/debian/pyversions 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/debian/pyversions 1969-12-31 16:00:00.000000000 -0800
@@ -1 +0,0 @@
-2.4-
diff -Nru wakeup-1.1/debian/rules wakeup-1.2/debian/rules
--- wakeup-1.1/debian/rules 2011-05-28 22:06:30.000000000 -0700
+++ wakeup-1.2/debian/rules 2012-01-03 13:45:18.000000000 -0800
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-DEB_PYTHON_SYSTEM=pysupport
+export DEB_PYTHON2_MODULE_PACKAGES=wakeup
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
diff -Nru wakeup-1.1/doc/setalarm.1 wakeup-1.2/doc/setalarm.1
--- wakeup-1.1/doc/setalarm.1 2011-11-09 22:28:43.000000000 -0800
+++ wakeup-1.2/doc/setalarm.1 2012-02-07 10:25:28.000000000 -0800
@@ -1,4 +1,4 @@
-.TH setalarm 1 "Version 1.1" "Nov 2011"
+.TH setalarm 1 "Version 1.2" "Feb 2012"
.SH NAME
setalarm
\- sets the system to start and run a script at specified times.
@@ -66,7 +66,7 @@
.SH "SEE ALSO"
\fBwakeup\fR(1), \fBwakeup\-settings\fR(1), \fBcron\fR, \fBcrontab\fR
.SH AUTHOR
-The program and its documentation are copyrighted (c) 2011 by David Glass
+The program and its documentation are copyrighted (C) 2012 by David Glass
. All rights reserved. They are distributed under the terms
of the GNU General Public License version 3 or later.
diff -Nru wakeup-1.1/doc/setalarm.1~ wakeup-1.2/doc/setalarm.1~
--- wakeup-1.1/doc/setalarm.1~ 2011-05-18 15:02:08.000000000 -0700
+++ wakeup-1.2/doc/setalarm.1~ 1969-12-31 16:00:00.000000000 -0800
@@ -1,72 +0,0 @@
-.TH setalarm 1 "Version 1.0.0" "May 2011"
-.SH NAME
-setalarm
-\- sets the system to start and run a script at specified times.
-.SH SYNOPSIS
-.B setalarm
-[ \-p ] [ [h]h:mm ] [ \-o offset ] [ command ]
-
-.B setalarm
-[ \-p ] [ \-c m h dom mon dow ] [ \-o offset ] [ command ]
-
-.B setalarm
-[ \-p ] [ \-u utc ] [ \-o offset ] [ command ]
-
-.B setalarm
-\-d
-.SH DESCRIPTION
-This should be run as root, unless using the
-.B \-p
-option. The time to wake the computer can be given in three possible formats.
-The simplest is just a time, written hh:mm or h:mm. This time is
-interpreted as the earliest time in the future when that time occurs.
-If the
-.B \-c
-option is provided, a cron\-formatted recurrence (minute hour day_of_month month
-day_of_week) may follow. Special times such as "@hourly" are not accepted.
-With the
-.B \-u
-option, the time to wake the computer should be provided in UTC format.
-.P
-.B command
-is run at the closest time in the future that matches the recurrence rules or at
-the time specified using an exact hh:mm or UTC time. For this to occur, the
-computer is woken up several minutes in advance to allow for boot time. By
-default, this "offset" is 5 minutes, but can be changed with the
-.B \-o
-option, in which case the computer is woken up
-.B offset
-minutes in advance. To ensure that the computer will wake given the
-.B \-c
-option, crontab entries are made in root's crontab to rerun
-.B setalarm
-as necessary.
-.P
-With the
-.B \-p
-option,
-.B setalarm
-will not make any changes to the system wake time or to root's crontab. Instead,
-.B
-setalarm
-just prints the time, in UTC, at which the computer would be set to wake up with
-the given input.
-.P
-Given the
-.B \-d
-option,
-.B setalarm
-removes all alarms.
-.SH "NOTES"
-.B setalarm
-was created for use with
-\fBwakeup\fR, a fully customizable and extensible talking alarm clock. However, it is
-generally usable as a convenient wrapper for setting the system wakeup (see
-http://www.mythtv.org/wiki/ACPI_Wakeup for details about ACPI wakeup)
-.SH "SEE ALSO"
-\fBwakeup\fR(1), \fBwakeup\-settings\fR(1), \fBcron\fR, \fBcrontab\fR
-.SH AUTHOR
-The program and its documentation are copyrighted (c) 2011 by David Glass
-. All rights reserved. They are distributed under the terms
-of the GNU General Public License version 3 or later.
-
diff -Nru wakeup-1.1/doc/wakeup.1 wakeup-1.2/doc/wakeup.1
--- wakeup-1.1/doc/wakeup.1 2011-11-09 22:28:49.000000000 -0800
+++ wakeup-1.2/doc/wakeup.1 2012-02-07 10:25:36.000000000 -0800
@@ -1,4 +1,4 @@
-.TH wakeup 1 "Version 1.1" "Nov 2011"
+.TH wakeup 1 "Version 1.2" "Feb 2012"
.SH NAME
wakeup
\- A talking and fully customizable alarm clock
@@ -36,7 +36,7 @@
.SH "SEE ALSO"
\fBsetalarm\fR(1), \fBwakeup\-settings\fR(1), \fBcron\fR, \fBcrontab\fR
.SH AUTHOR
-The program and its documentation are copyrighted (c) 2011 by David Glass
+The program and its documentation are copyrighted (C) 2012 by David Glass
. All rights reserved. They are distributed under the terms
of the GNU General Public License version 3 or later.
diff -Nru wakeup-1.1/doc/wakeup.1~ wakeup-1.2/doc/wakeup.1~
--- wakeup-1.1/doc/wakeup.1~ 2011-05-24 12:25:37.000000000 -0700
+++ wakeup-1.2/doc/wakeup.1~ 1969-12-31 16:00:00.000000000 -0800
@@ -1,42 +0,0 @@
-.TH wakeup 1 "Version 1.0.0" "May 2011"
-.SH NAME
-wakeup
-\- A talking and fully customizable alarm clock
-.SH SYNOPSIS
-.B wakeup
-username alarmID
-.SH DESCRIPTION
-.B wakeup
-plays an alarm for the given username, whose settings for the alarm can be
-modified using the
-.B wakeup\-settings
-utility. The user's alarm that is run is specified by alarmID, which corresponds
-to the folder number in the user's wakeup settings folder ~/.wakeup. Alarm text
-and all associated options should be defined by running
-.B wakeup\-settings
-as
-\fBusername\fR. Although it is possible to modify the settings directly by
-editing the files in ~/.wakeup/, this is not recommended and make cause you to
-lose alarm settings.
-.P
-An option in
-.B wakeup\-settings
-allows the alarm to wake the computer (from poweroff if the bios
-allows). In this case,
-.B wakeup
-is set by
-to run from root's cron, and the alarm will run in this case even if no user is
-logged in. One must log in or be logged in to stop the alarm.
-.P
-Note that for any part of the alarm which depends on information from the web to
-work when you are not logged in, you will need to set the wireless network(s)
-you connect to so that they connect before you log in. This can be done through
-NetworkManager, by selecting a connection, clicking "Edit..." and checking
-"Available to all users."
-.SH "SEE ALSO"
-\fBsetalarm\fR(1), \fBwakeup\-settings\fR(1), \fBcron\fR, \fBcrontab\fR
-.SH AUTHOR
-The program and its documentation are copyrighted (c) 2011 by David Glass
-. All rights reserved. They are distributed under the terms
-of the GNU General Public License version 3 or later.
-
diff -Nru wakeup-1.1/doc/wakeup-settings.1 wakeup-1.2/doc/wakeup-settings.1
--- wakeup-1.1/doc/wakeup-settings.1 2011-11-09 22:28:57.000000000 -0800
+++ wakeup-1.2/doc/wakeup-settings.1 2012-02-07 10:25:43.000000000 -0800
@@ -1,4 +1,4 @@
-.TH wakeup\-settings 1 "Version 1.1" "Nov 2011"
+.TH wakeup\-settings 1 "Version 1.2" "Feb 2012"
.SH NAME
wakeup\-settings
\- GUI frontend to configure \fBwakeup\fR, a talking and fully customizable
@@ -26,7 +26,7 @@
.SH "SEE ALSO"
\fBsetalarm\fR(1), \fBwakeup\fR(1), \fBcron\fR, \fBcrontab\fR
.SH AUTHOR
-The program and its documentation are copyrighted (c) 2011 by David Glass
+The program and its documentation are copyrighted (C) 2012 by David Glass
. All rights reserved. They are distributed under the terms
of the GNU General Public License version 3 or later.
diff -Nru wakeup-1.1/doc/wakeup-settings.1~ wakeup-1.2/doc/wakeup-settings.1~
--- wakeup-1.1/doc/wakeup-settings.1~ 2011-05-18 15:02:01.000000000 -0700
+++ wakeup-1.2/doc/wakeup-settings.1~ 1969-12-31 16:00:00.000000000 -0800
@@ -1,32 +0,0 @@
-.TH wakeup\-settings 1 "Version 1.0.0" "May 2011"
-.SH NAME
-wakeup\-settings
-\- GUI frontend to configure \fBwakeup\fR, a talking and fully customizable
-alarm clock
-.SH SYNOPSIS
-.B wakeup\-settings
-.SH DESCRIPTION
-This runs a graphical setting in which to edit the alarms run by
-.B wakeup.
-The time, volume, plugin settings, etc. for all alarms can be set through this
-GUI. Given the "set computer to wake up for alarm" option,
-.B wakeup
-is set by
-.B wakeup\-settings
-to run from root's cron, and the alarms will run in this case even if no user is
-logged in. One must log in or be logged in to stop the alarm.
-Settings only pertain to the user who is running
-.B wakeup\-settings.
-.P
-Note that for any part of the alarm which depends on information from the web to
-work when you are not logged in, you will need to set the wireless network(s)
-you connect to so that they connect before you log in. This can be done through
-NetworkManager, by selecting a connection, clicking "Edit..." and checking
-"Available to all users."
-.SH "SEE ALSO"
-\fBsetalarm\fR(1), \fBwakeup\fR(1), \fBcron\fR, \fBcrontab\fR
-.SH AUTHOR
-The program and its documentation are copyrighted (c) 2011 by David Glass
-. All rights reserved. They are distributed under the terms
-of the GNU General Public License version 3 or later.
-
diff -Nru wakeup-1.1/setup.py wakeup-1.2/setup.py
--- wakeup-1.1/setup.py 2011-05-18 15:00:26.000000000 -0700
+++ wakeup-1.2/setup.py 2012-02-07 10:35:17.000000000 -0800
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (C) 2011 David Glass
+# Copyright (C) 2012 David Glass
# Copyright is GPLv3 or later, see /usr/share/common-licenses/GPL-3
from distutils.core import setup
@@ -9,7 +9,8 @@
('share/applications', ['data/wakeup.desktop']),
('share/man/man1', ['doc/wakeup.1']),
('share/man/man1', ['doc/setalarm.1']),
- ('share/man/man1', ['doc/wakeup-settings.1'])
+ ('share/man/man1', ['doc/wakeup-settings.1']),
+ ('share/polkit-1/actions', ['data/com.ubuntu.wakeup.policy'])
]
for root, dirs, files in os.walk('data/wakeup'):
for f in files:
@@ -20,7 +21,7 @@
setup(name='wakeup',
- version='1.0.0',
+ version='1.2',
description='Fully customizable and extensible talking alarm clock',
author='David Glass',
author_email='dsglass@gmail.com',