Commit c1b40a73 authored by Gaute Hope's avatar Gaute Hope Committed by Gaute Hope

Tweaked parsing of text strings in crontab, need more info about how to

2007-11-20  Gaute Hope  <eg@gaute.vetsj.com>

        * Tweaked parsing of text strings in crontab, need more info about how to interprent textstring in the dom field
        * Changed version number to 1.2.1

svn path=/trunk/; revision=971
parent 3a5d8ce9
2007-12-01 Gaute Hope <eg@gaute.vetsj.com>
* Changed version number to 1.2.1
* Tweaked parsing of text strings in crontab, need more info about how to interprent textstring in the dom field
2007-11-20 Gaute Hope <eg@gaute.vetsj.com>
* Fixed some confusing expressions for weekday easy translations
......@@ -8,7 +13,7 @@
* removed README.cvs, we have a HACKING file that says the same
* updated AUTHORS file to honour the documentor
* updated copyrights
2007-11-10 Gaute Hope <eg@gaute.vetsj.com>
* Changed version number to 1.2.0
......
......@@ -12,22 +12,13 @@ Development:
* "gnome-schedule --addtemplate foo" (will add a template) (console only)
* "gnome-schedule --addtask task user" (will add a task for a user) (console only)
http://docs.python.org/lib/module-getopt.html
* Include a default icon for at, and a default icon for crontab
and also make it the default-selected icon
* bug 325271, frank arnold: "ally - scan all dialogs for missing accelerators"
Unassigned would make it to the release but are non-blocking it
* We need more exception handlers and let functions return if an operation failed
(in savetemplate for example)
* look into (to see what could be interresting to use in our project):
http://docs.python.org/lib/module-locale.html
http://docs.python.org/lib/module-calendar.html
http://docs.python.org/lib/module-datetime.html
http://docs.python.org/lib/module-grp.html
Translations:
* Check out the ngettext stuff for python, perhaps send python/gettext folks a note about the missing features. bug 325053
......
AC_INIT(src/gnome-schedule.py)
AM_INIT_AUTOMAKE(gnome-schedule, 1.2.0)
AM_INIT_AUTOMAKE(gnome-schedule, 1.2.1)
dnl check for python
dnl AM_PATH_PYTHON
......
......@@ -79,29 +79,54 @@ class Crontab:
}
self.monthnames = {
"1" : "Jan",
"2" : "Feb",
"3" : "Mar",
"4" : "Apr",
"5" : "May",
"6" : "Jun",
"7" : "Jul",
"8" : "Aug",
"9" : "Sep",
"10" : "Oct",
"11" : "Nov",
"12" : "Dec"
"1" : "jan",
"2" : "feb",
"3" : "mar",
"4" : "apr",
"5" : "may",
"6" : "jun",
"7" : "jul",
"8" : "aug",
"9" : "sep",
"10" : "oct",
"11" : "nov",
"12" : "dec"
}
self.monthnumbers = {
"jan" : "1",
"feb" : "2",
"mar" : "3",
"apr" : "4",
"may" : "5",
"jun" : "6",
"jul" : "7",
"aug" : "8",
"sep" : "9",
"oct" : "10",
"nov" : "11",
"dec" : "12"
}
self.downames = {
"0" : "Sun",
"1" : "Mon",
"2" : "Tue",
"3" : "Wed",
"4" : "Thu",
"5" : "Fri",
"6" : "Sat",
"7" : "Sun"
"0" : "sun",
"1" : "mon",
"2" : "tue",
"3" : "wed",
"4" : "thu",
"5" : "fri",
"6" : "sat",
"7" : "sun"
}
self.downumbers = {
"sun" : "0",
"mon" : "1",
"tue" : "2",
"wed" : "3",
"thu" : "4",
"fri" : "5",
"sat" : "6",
"sun" : "7"
}
......@@ -422,6 +447,7 @@ class Crontab:
# 2: Standard expression
# 3: Comment
origline = line
line = line.lstrip()
comment = ""
......@@ -492,20 +518,25 @@ class Crontab:
# Day of Month
dom, line = self.get_exp_sec (line)
if dom.isdigit() == False:
dom = dom.lower ()
for day in self.downumbers:
dom = dom.replace (day, self.downumbers[day])
# Month of Year
moy, line = self.get_exp_sec (line)
if moy.isdigit () == False:
moy = moy.lower ()
for m in self.monthnumbers:
moy = moy.replace (m, self.monthnumbers[m])
# Day of Week
dow, line = self.get_exp_sec (line)
dow = dow.lower ()
dow = dow.replace ("mon", "1")
dow = dow.replace ("tue", "2")
dow = dow.replace ("wed", "3")
dow = dow.replace ("thu", "4")
dow = dow.replace ("fri", "5")
dow = dow.replace ("sat", "6")
dow = dow.replace ("sun", "7")
if dow.isdigit() == False:
dow = dow.lower ()
for day in self.downumbers:
dow = dow.replace (day, self.downumbers[day])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment