Skip to content

Commit

Permalink
release 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tobixen committed Feb 15, 2015
1 parent dc39a88 commit 90b4f04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There is a "competing" project at https://github.com/geier/khal - you may want t
Support
-------

\#calendar-cli at irc.freenode.org, eventually [email protected]
\#calendar-cli at irc.freenode.org, eventually [email protected], eventually the issue tracker at https://github.com/tobixen/calendar-cli/issues

Status
------
Expand Down Expand Up @@ -125,13 +125,11 @@ Status
2013-12 - 2014-03: helped cyrilrbt on making a new release of the caldav library
2014-03-07: version 0.05 - rewrote parts of the tool to using the caldav library. Nice!!!
2014-03-14: version 0.6 - now agenda works quite smooth. I think this is becoming a useful tool.
2015-02-15: version 0.7 - supports deletion of events, alternative templates for the event output and a small testing script

Roadmap
-------
* Allow specification of event duration when adding events to calendar
* Delete events. Needed for making a functional test suite.
* Fix a functional test suite.
* CLI-interface for creating ical todo events
* Wrap it into an easy-to-install package
* Fix easy-to-use symlinks

* Fix easy-to-use symlinks (or alternatively wrapper scripts)
* Make some nosetests
16 changes: 9 additions & 7 deletions calendar-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import logging
import sys

__version__ = "0.7-devel"
__version__ = "0.7"
__author__ = "Tobias Brox"
__author_short__ = "tobixen"
__copyright__ = "Copyright 2013, Tobias Brox"
Expand Down Expand Up @@ -182,15 +182,16 @@ def calendar_agenda(caldav_conn, args):
events.append({'dtstart': dtstart, 'instance': event})
events.sort(lambda a,b: cmp(a['dtstart'], b['dtstart']))
for event in events:
dtime = event['dtstart'].strftime("%F %H:%M")
summary = ""
event['dstart_sql'] = event['dtstart'].strftime("%F %H:%M")
for summary_attr in ('summary', 'location'):
if hasattr(event['instance'], summary_attr):
summary = getattr(event['instance'], summary_attr).value
event['description'] = getattr(event['instance'], summary_attr).value
break
if hasattr(summary, 'encode'):
summary = summary.encode('utf-8')
print("%s %s") % (dtime, summary)
event['uid'] = event['instance'].uid.value
## TODO: this will probably break and is probably moot on python3?
if hasattr(event['description'], 'encode'):
event['description'] = event['description'].encode('utf-8')
print(args.event_template.format(**event))

def main():
"""
Expand Down Expand Up @@ -267,6 +268,7 @@ def main():
calendar_agenda_parser.add_argument('--to-time', help="Fetch calendar until this timestamp")
calendar_agenda_parser.add_argument('--agenda-mins', help="Fetch calendar for so many minutes", type=int)
calendar_agenda_parser.add_argument('--agenda-days', help="Fetch calendar for so many days", type=int, default=7)
calendar_agenda_parser.add_argument('--event-template', help="Template for printing out the event", default="{dstart_sql} {description}")
calendar_agenda_parser.set_defaults(func=calendar_agenda)

calendar_delete_parser = calendar_subparsers.add_parser('delete')
Expand Down

0 comments on commit 90b4f04

Please sign in to comment.