summaryrefslogtreecommitdiff
path: root/todb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'todb.lua')
-rwxr-xr-xtodb.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/todb.lua b/todb.lua
new file mode 100755
index 0000000..50799ec
--- /dev/null
+++ b/todb.lua
@@ -0,0 +1,20 @@
+#!/usr/bin/env lua
+local cal = require "cal"
+local db = require "db"
+local common = require "common"
+
+common.set_verbosity (1)
+
+local main = function (argv)
+ local ok, parsed = cal.parse_stdin ()
+ if not ok then
+ return -1
+ end
+
+ local ok = db.output_calendar (parsed)
+
+ return ok and 0 or -1
+end
+
+os.exit (main ())
+