summaryrefslogtreecommitdiffstats
path: root/git_taskrepo
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2015-05-06 16:16:21 -0400
committerBill Peck <bpeck@redhat.com>2015-05-06 16:16:21 -0400
commit490fb9247135327a71157a14a07cedd809995c63 (patch)
tree875782e3d51e23bec7193672dd971e9b6d500a38 /git_taskrepo
parenta86d5c0a2815ce2bc288a76ff6edc103ff8eb3a5 (diff)
downloadtaskrepo-490fb9247135327a71157a14a07cedd809995c63.tar.gz
taskrepo-490fb9247135327a71157a14a07cedd809995c63.tar.xz
taskrepo-490fb9247135327a71157a14a07cedd809995c63.zip
Initialized to use tito.
Diffstat (limited to 'git_taskrepo')
-rw-r--r--git_taskrepo/sub_commands/cmd_list_runfor.py24
-rw-r--r--git_taskrepo/sub_commands/cmd_list_tasks.py (renamed from git_taskrepo/sub_commands/cmd_list.py)0
-rw-r--r--git_taskrepo/sub_commands/cmd_list_types.py24
3 files changed, 48 insertions, 0 deletions
diff --git a/git_taskrepo/sub_commands/cmd_list_runfor.py b/git_taskrepo/sub_commands/cmd_list_runfor.py
new file mode 100644
index 0000000..fca58bb
--- /dev/null
+++ b/git_taskrepo/sub_commands/cmd_list_runfor.py
@@ -0,0 +1,24 @@
+
+# -*- coding: utf-8 -*-
+
+import xml.dom.minidom
+from git_taskrepo.command import Command
+
+class List_RunFor(Command):
+ """List Runfor"""
+ enabled = True
+
+ def options(self):
+ self.parser.usage = "%%prog %s" % self.normalized_name
+
+ def run(self, *args, **kwargs):
+ self.set_repo(**kwargs)
+ self.set_taskrepo(**kwargs)
+ conn = self.taskrepo
+ with conn:
+ cur = conn.cursor()
+ cur.execute("SELECT DISTINCT value FROM runfor")
+ rows = cur.fetchall()
+
+ for row in rows:
+ print "%s" % row[0]
diff --git a/git_taskrepo/sub_commands/cmd_list.py b/git_taskrepo/sub_commands/cmd_list_tasks.py
index 3381da5..3381da5 100644
--- a/git_taskrepo/sub_commands/cmd_list.py
+++ b/git_taskrepo/sub_commands/cmd_list_tasks.py
diff --git a/git_taskrepo/sub_commands/cmd_list_types.py b/git_taskrepo/sub_commands/cmd_list_types.py
new file mode 100644
index 0000000..0000a4f
--- /dev/null
+++ b/git_taskrepo/sub_commands/cmd_list_types.py
@@ -0,0 +1,24 @@
+
+# -*- coding: utf-8 -*-
+
+import xml.dom.minidom
+from git_taskrepo.command import Command
+
+class List_Types(Command):
+ """List Types"""
+ enabled = True
+
+ def options(self):
+ self.parser.usage = "%%prog %s" % self.normalized_name
+
+ def run(self, *args, **kwargs):
+ self.set_repo(**kwargs)
+ self.set_taskrepo(**kwargs)
+ conn = self.taskrepo
+ with conn:
+ cur = conn.cursor()
+ cur.execute("SELECT DISTINCT value FROM types")
+ rows = cur.fetchall()
+
+ for row in rows:
+ print "%s" % row[0]