summaryrefslogtreecommitdiff
path: root/calendar-cli.py
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2016-03-16 14:27:46 +0100
committerTobias Brox <tobias@redpill-linpro.com>2016-03-16 14:27:46 +0100
commit277d79071653b6745bdf00c3b883efcee234a6f1 (patch)
treefdc62dfc089b8da4bf90c84f4a6d611d3fc9eb04 /calendar-cli.py
parentc25c95c81c635a9ffe25cbf49213f0b80d432dc6 (diff)
downloadcalendar-cli-277d79071653b6745bdf00c3b883efcee234a6f1.zip
more fixing for github issue #23 - license missing
Diffstat (limited to 'calendar-cli.py')
-rwxr-xr-xcalendar-cli.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/calendar-cli.py b/calendar-cli.py
index 7f3bb21..860072b 100755
--- a/calendar-cli.py
+++ b/calendar-cli.py
@@ -1,8 +1,22 @@
#!/usr/bin/python2
-## (the icalendar library is not ported to python3?)
-## (also, the caldav library depends on the vobject library which is not officially ported to python3 as of 2015-05)
-## (vobject and icalendar are quite overlapping libraries)
+"""
+calendar-cli.py - high-level cli against caldav servers
+Copyright (C) 2013-2016 Tobias Brox and other contributors
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
import argparse
import pytz
@@ -23,13 +37,15 @@ import re
__version__ = "0.11.0-dev"
__author__ = "Tobias Brox"
__author_short__ = "tobixen"
-__copyright__ = "Copyright 2013, Tobias Brox"
+__copyright__ = "Copyright 2013-2016, Tobias Brox"
#__credits__ = []
__license__ = "GPLv3+"
+__license_url__ = "http://www.gnu.org/licenses/gpl-3.0-standalone.html"
__maintainer__ = "Tobias Brox"
__author_email__ = "t-calendar-cli@tobixen.no"
__status__ = "Development"
__product__ = "calendar-cli"
+__description__ = "high-level cli against caldav servers"
def _force_datetime(t, args):
"""
@@ -650,6 +666,7 @@ def main():
# We make this parser with add_help=False so that
# it doesn't parse -h and print help.
conf_parser = argparse.ArgumentParser(
+ prog=__product__,
description=__doc__, # printed with -h/--help
# Don't mess with format of description
formatter_class=argparse.RawDescriptionHelpFormatter,
@@ -663,6 +680,7 @@ def main():
conf_parser.add_argument("--interactive-config",
help="Interactively ask for configuration", action="store_true")
args, remaining_argv = conf_parser.parse_known_args()
+ conf_parser.add_argument("--version", action='version', version='%%(prog)s %s' % __version__)
config = {}
@@ -693,6 +711,8 @@ def main():
# Parse rest of arguments
# Don't suppress add_help here so it will handle -h
parser = argparse.ArgumentParser(
+ description=__doc__,
+ prog=__product__,
# Inherit options from config_parser
parents=[conf_parser]
)