changeset 1:a3fe8e4e9184

- To exit getan you now can use double BACKSPACE, too. - Fixed typo, added hint to Sascha Wilde's projects converter. - Added Sascha Wilde's converter to import existing worklog configuration files.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 29 Jul 2008 16:38:40 +0200
parents 7eb7886ed8fd
children 49aa271aa3d0
files ChangeLog README contrib/convert-projects getan
diffstat 4 files changed, 27 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jul 28 22:33:36 2008 +0200
+++ b/ChangeLog	Tue Jul 29 16:38:40 2008 +0200
@@ -1,3 +1,12 @@
+2008-07-29	Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* getan: To exit getan you now can use double BACKSPACE, too. 
+
+	* README: Fixed typo, added hint to Sascha Wilde's projects converter.
+
+	* contrib/convert-projects: Added Sascha Wilde's converter to import existing
+	  worklog configuration files.
+
 2008-07-28	Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* ChangeLog, LICENSE, README, TODO, getan, schema.sql: Initial import
--- a/README	Mon Jul 28 22:33:36 2008 +0200
+++ b/README	Tue Jul 29 16:38:40 2008 +0200
@@ -11,7 +11,7 @@
 
     # apt-get install sqlite3
 
-    $ echo '.r schema.sql' | sqlite3 time.db:
+    $ echo '.r schema.sql' | sqlite3 time.db
 
 2 - adding new projects to time.db:
 
@@ -20,6 +20,10 @@
     sqlite> INSERT INTO projects (key, description) VALUES ('b', 'BAR');
     sqlite> .q
 
+    To import an old worklog configuration you may use:
+
+    ./contrib/convert-projects </PATH/TO/projects | sqlite3 time.db
+
 3 - starting getan:
 
     $ ./getan 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/convert-projects	Tue Jul 29 16:38:40 2008 +0200
@@ -0,0 +1,11 @@
+#!/usr/bin/awk -f
+
+# Convert classic worklog projects file to SQL statements for inseration in the getan database.
+# USAGE:
+# ./convert-projects </PATH/TO/projects | sqlite3 time.db
+
+BEGIN { FS=":"; }
+
+/[^# \t]/ {
+    printf "INSERT INTO projects (key, description) VALUES ('%s', '%s');\n", $1, $2;
+}
--- a/getan	Mon Jul 28 22:33:36 2008 +0200
+++ b/getan	Tue Jul 29 16:38:40 2008 +0200
@@ -322,7 +322,7 @@
 
             if self.state == PAUSED:
 
-                if c == curses.KEY_DC:
+                if c in (curses.KEY_DC, curses.KEY_BACKSPACE):
                     stdscr.erase()
                     ofs = render_quit(self.render())
                     stdscr.refresh()
@@ -468,7 +468,7 @@
                     self.state = RUNNING
 
             elif self.state == PRE_EXIT:
-                if c == curses.KEY_DC:
+                if c in (curses.KEY_DC, curses.KEY_BACKSPACE):
                     break
                 else:
                     stdscr.erase()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)