summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2018-07-06 08:38:41 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2018-09-08 16:12:30 +0200
commit87ce8402c1c3c62dadce1537bd255c27c94959eb (patch)
tree9f115b148a4070a2590d24f4b0832be1fa47fad6
parent0655d2ef47e6388a4d1121da23b0854dd381bbed (diff)
downloadcaldr-87ce8402c1c3c62dadce1537bd255c27c94959eb.tar.gz
toreminder: add calendar → reminder conversion script
-rwxr-xr-xtoreminder.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/toreminder.lua b/toreminder.lua
new file mode 100755
index 0000000..e0216f4
--- /dev/null
+++ b/toreminder.lua
@@ -0,0 +1,20 @@
+#!/usr/bin/env lua
+local cal = require "cal"
+local rem = require "rem"
+local common = require "common"
+
+common.set_verbosity (2)
+
+local main = function (argv)
+ local ok, parsed = cal.parse_stdin ()
+ if not ok then
+ return -1
+ end
+
+ local ok = rem.output_calendar (parsed)
+
+ return ok and 0 or -1
+end
+
+os.exit (main ())
+