cctool

A tool for managing contacts and calendars.
git clone https://git.ce9e.org/cctool.git

commit
82838f4ec0c14bdfb48a3466b5a388c4f4cd7f68
parent
b086c2b63624d5594889935ae2d64f5c25c8555e
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2014-04-20 23:17
show only current year and recurring in bsdcal

Diffstat

M cctool.py 9 +++++----

1 files changed, 5 insertions, 4 deletions


diff --git a/cctool.py b/cctool.py

@@ -117,11 +117,12 @@ class BSDCal(Format):
  117   117 	def dump(cls, data, fh):
  118   118 		for item in data:
  119   119 			if u'dtstart' in item and u'summary' in item:
  120    -1 				dt = item.first('dtstart').strftime('%m/%d')
  121    -1 				fh.write('%s\t%s\n' % (dt, item.join('summary')))
   -1   120 				dt = item.first('dtstart')
   -1   121 				if dt.year == datetime.today().year:
   -1   122 					fh.write('%s\t%s\n' % (dt.strftime('%m/%d'), item.join('summary')))
  122   123 			if u'bday' in item and u'name' in item:
  123    -1 				dt = item.first('bday').strftime('%m/%d*')
  124    -1 				fh.write('%s\t%s\n' % (dt, item.join('name')))
   -1   124 				dt = item.first('bday')
   -1   125 				fh.write('%s\t%s\n' % (dt.strftime('%m/%d*'), item.join('name')))
  125   126 
  126   127 
  127   128 class ICal(Format):