summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2022-11-06 10:23:24 +0100
committerTobias Brox <tobias@redpill-linpro.com>2022-11-06 10:23:24 +0100
commit891359b85d305199a76283f412107359e8674b7d (patch)
tree924566a50b183bc311fce68b1d61699edbc1d97a
parent68e2b2dfdaebd01a0bdd2b1f4d9f87f3b203a7fb (diff)
downloadcalendar-cli-891359b85d305199a76283f412107359e8674b7d.zip
reorganized the repository - should fix https://github.com/tobixen/calendar-cli/issues/94
l---------bin/calendar-cli (renamed from calendar-cli)0
-rw-r--r--bin/calendar-cli.py4
l---------calendar_cli.py1
-rw-r--r--calendar_cli/__init__.py0
-rwxr-xr-xcalendar_cli/cal.py (renamed from cal.py)4
-rwxr-xr-xcalendar_cli/legacy.py (renamed from calendar-cli.py)0
-rw-r--r--calendar_cli/metadata.py (renamed from metadata.py)4
-rw-r--r--calendar_cli/template.py (renamed from lib/template.py)0
-rw-r--r--setup.py10
-rwxr-xr-xtests/tests.sh2
10 files changed, 14 insertions, 11 deletions
diff --git a/calendar-cli b/bin/calendar-cli
index e3b7ab8..e3b7ab8 120000
--- a/calendar-cli
+++ b/bin/calendar-cli
diff --git a/bin/calendar-cli.py b/bin/calendar-cli.py
new file mode 100644
index 0000000..cdd9b71
--- /dev/null
+++ b/bin/calendar-cli.py
@@ -0,0 +1,4 @@
+#!/usr/bin/python3
+
+import calendar_cli.legacy
+calendar_cli.legacy.main()
diff --git a/calendar_cli.py b/calendar_cli.py
deleted file mode 120000
index e3b7ab8..0000000
--- a/calendar_cli.py
+++ /dev/null
@@ -1 +0,0 @@
-calendar-cli.py \ No newline at end of file
diff --git a/calendar_cli/__init__.py b/calendar_cli/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/calendar_cli/__init__.py
diff --git a/cal.py b/calendar_cli/cal.py
index f143cf9..682ac1f 100755
--- a/cal.py
+++ b/calendar_cli/cal.py
@@ -20,7 +20,7 @@ https://github.com/tobixen/calendar-cli/issues/88
## This file aims to be smaller than the old calendar-cli while
## offering more featuores.
-from metadata import metadata
+from calendar_cli.metadata import metadata
__version__ = metadata["version"]
import click
@@ -32,7 +32,7 @@ import dateutil.parser
import datetime
import re
from icalendar import prop
-from lib.template import Template
+from calendar_cli.template import Template
list_type = list
diff --git a/calendar-cli.py b/calendar_cli/legacy.py
index b7b61dc..b7b61dc 100755
--- a/calendar-cli.py
+++ b/calendar_cli/legacy.py
diff --git a/metadata.py b/calendar_cli/metadata.py
index 238249a..a81437f 100644
--- a/metadata.py
+++ b/calendar_cli/metadata.py
@@ -8,8 +8,8 @@ metadata = {
"maintainer": "Tobias Brox",
"author_email": "t-calendar-cli@tobixen.no",
"status": "Development",
- "product": "calendar-cli",
- "name": "calendar-cli",
+ "product": "calendar_cli",
+ "name": "calendar_cli",
"description": "Simple command-line CalDav client, for adding and browsing calendar items, todo list items, etc.",
"url": "https://github.com/tobixen/calendar-cli",
}
diff --git a/lib/template.py b/calendar_cli/template.py
index 47281d9..47281d9 100644
--- a/lib/template.py
+++ b/calendar_cli/template.py
diff --git a/setup.py b/setup.py
index d73f69c..eba87e6 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import os
from setuptools import setup, find_packages
-from metadata import metadata
+from calendar_cli.metadata import metadata
metadata_ = metadata.copy()
for x in metadata:
@@ -14,8 +14,8 @@ for x in metadata:
metadata_.pop(x)
setup(
- #packages=['',
- # ],
+ packages=['calendar_cli',
+ ],
classifiers=[
#"Development Status :: ..."
"Environment :: Web Environment",
@@ -26,7 +26,7 @@ setup(
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
],
- scripts=['calendar-cli.py', 'calendar-cli'],
+ scripts=['bin/calendar-cli.py', 'bin/calendar-cli'],
py_modules=['cal'],
install_requires=[
'icalendar',
@@ -39,7 +39,7 @@ setup(
],
entry_points={
'console_scripts': [
- 'kal = cal:cli',
+ 'kal = calendar_cli.cal:cli',
],
},
**metadata_
diff --git a/tests/tests.sh b/tests/tests.sh
index 1c91270..9eb7341 100755
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -72,7 +72,7 @@ echo "## Taking out the agenda for 2010-10-10, with uid"
calendar_cli calendar agenda --from-time=2010-10-10 --agenda-days=1 --event-template='{dtstart} {uid}'
echo $output | { grep -q $uid2 && echo "## OK: found the UID" ; } || error "didn't find the UID"
-echo "## Deleting events with uid $uid $uid1 $uid2"
+echo "## Deleting events with uid $uid $uid2 $uid3"
calendar_cli calendar delete --event-uid=$uid
calendar_cli calendar delete --event-uid=$uid2
calendar_cli calendar delete --event-uid=$uid3