aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/test4
-rwxr-xr-xbin/todo22
2 files changed, 26 insertions, 0 deletions
diff --git a/bin/test b/bin/test
new file mode 100755
index 0000000..cd6c0de
--- /dev/null
+++ b/bin/test
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -euo pipefail
+cd "$(dirname $0)/.."
+python -m pytest
diff --git a/bin/todo b/bin/todo
new file mode 100755
index 0000000..c743d0d
--- /dev/null
+++ b/bin/todo
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+import sys
+from PyQt5 import QtCore, QtWidgets
+import sqlite3
+import os.path
+
+import todo.database
+import todo.db.init
+import todo.gui.window
+import todo.arguments
+import todo.database
+
+args = todo.arguments.parser().parse_args()
+todo.database.init(args.database if args.database != None else "database")
+app = QtWidgets.QApplication(sys.argv)
+
+window = todo.gui.window.get()
+window.show()
+res = app.exec_()
+
+todo.database.close()
+sys.exit(res)