Skip to content

Commit 8e01c1e

Browse files
v0.0.7, cleanup, enhanced documentation
1 parent 6572d6b commit 8e01c1e

File tree

5 files changed

+39
-5
lines changed

5 files changed

+39
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ clean: ## Cleanup
4545
@find . -name __pycache__ -delete
4646
@rm -rf htmlcov
4747
@rm -rf build dist *.egg-info .eggs
48-
@rm -rf $(SRC_CORE)/.mypy_cache/
48+
@rm -rf $(SRC_CORE)/.mypy_cache .mypy_cache
4949
@rm -f .coverage
5050

5151
auto-style: ## Style the code

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,39 @@ $ git clone https://github.com/thingsapi/things-cli && cd things-cli && make ins
6363
% things-cli --csv --recursive all > all.csv && open all.csv
6464

6565
% things-cli --opml --recursive all > all.opml && open all.opml
66+
67+
% things-cli -h
68+
usage: things-cli [-h] [-o] [-j] [-c] [-r] [-d DATABASE] [--version] command ...
69+
70+
Simple read-only Thing 3 CLI.
71+
72+
positional arguments:
73+
command
74+
inbox Shows inbox tasks
75+
today Shows todays tasks
76+
upcoming Shows upcoming tasks
77+
anytime Shows anytime tasks
78+
completed Shows completed tasks
79+
canceled Shows canceled tasks
80+
trash Shows trashed tasks
81+
all Shows all tasks
82+
areas Shows all areas
83+
projects Shows all projects
84+
logbook Shows tasks completed today
85+
tags Shows all tags ordered by their usage
86+
deadlines Shows tasks with due dates
87+
feedback Give feedback
88+
search Searches for a specific task
89+
90+
optional arguments:
91+
-h, --help show this help message and exit
92+
-o, --opml output as OPML
93+
-j, --json output as JSON
94+
-c, --csv output as CSV
95+
-r, --recursive in-depth output
96+
-d DATABASE, --database DATABASE
97+
set path to database
98+
--version, -v show program's version number and exit
6699
```
67100
68101
## Screenshots

pyrightconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"reportMissingImports": false,
3+
}

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def package_files(directory):
2121
AUTHOR_MAIL = "[email protected]"
2222
DESCRIPTON = "A simple Python 3 CLI to read your Things app data."
2323
URL = "https://github.com/thingsapi/things-cli"
24-
VERSION = "0.0.6"
2524
DATA_FILES = package_files("")
2625
OPTIONS = {
2726
"argv_emulation": False,
@@ -49,7 +48,6 @@ def package_files(directory):
4948
"Natural Language :: English",
5049
],
5150
python_requires=">=3.6",
52-
version=VERSION,
5351
data_files=DATA_FILES,
5452
options={"py2app": OPTIONS},
5553
setup_requires=["py2app"],

things_cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import sys
1313
import webbrowser
1414
from xml.dom import minidom
15-
import xml.etree.ElementTree as ET
15+
import xml.etree.ElementTree as ETree
1616
from xml.etree.ElementTree import Element, SubElement
1717

1818
import argcomplete # type: ignore
@@ -90,7 +90,7 @@ def opml_dumps(self, tasks):
9090

9191
self.opml_convert(tasks, body)
9292

93-
return minidom.parseString(ET.tostring(top)).toprettyxml(indent=" ")
93+
return minidom.parseString(ETree.tostring(top)).toprettyxml(indent=" ")
9494

9595
def opml_convert(self, tasks, top):
9696
"""Print pretty OPML of selected tasks."""

0 commit comments

Comments
 (0)