diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-02-11 18:22:05 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-02-11 18:33:57 +0100 |
commit | 07954626c6925f22e4d59b6d68f0947d4e54b8b9 (patch) | |
tree | e691a26dbb8ada6f708f08c529c1e8af826d61e2 /contrib | |
parent | fe0621bafd21acaf9909cb2f8ea65fa56560faed (diff) | |
download | calcurse-07954626c6925f22e4d59b6d68f0947d4e54b8b9.zip |
Support format strings when dumping imported items
In commit 3eae7ce (Add --list-imported command line option, 2016-01-12),
we added an option to print the hashes of imported items to stdout.
Extend this command line option such that it dumps the items using the
specified formatting strings. With the new behavior it is, for example,
easier to check items for import errors.
Also, rename the option from --list-imported to --dump-imported (it is
not part of any official release yet so we do not need to care about
backwards compatibility).
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/caldav/calcurse-caldav.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index c569009..1751897 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -45,7 +45,11 @@ def calcurse_wipe(): def calcurse_import(icaldata): - p = subprocess.Popen([calcurse, '-i', '-', '--list-imported', '-q'], + p = subprocess.Popen([calcurse, '-i', '-', '--dump-imported', '-q', + '--format-recur-apt=%(hash)\\n', + '--format-event=%(hash)\\n', + '--format-recur-event=%(hash)\\n', + '--format-todo=%(hash)\\n'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) return p.communicate(icaldata.encode('utf-8'))[0].decode('utf-8').rstrip() |