aboutsummaryrefslogtreecommitdiffstats
path: root/titlebot/commands/list
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-09-18 19:01:36 +0200
committerlassulus <lassulus@lassul.us>2018-09-18 19:01:36 +0200
commit2dfb816ddadb34e5b11676ef18c3c2f9079c8146 (patch)
tree59658869371ec5ac11fcd749cf270e1be655d1f5 /titlebot/commands/list
parent00b26ca0bb45d0fb7989a3ddf506bd8230363a14 (diff)
throw away dead code
Diffstat (limited to 'titlebot/commands/list')
-rwxr-xr-xtitlebot/commands/list27
1 files changed, 0 insertions, 27 deletions
diff --git a/titlebot/commands/list b/titlebot/commands/list
deleted file mode 100755
index cee4b8a..0000000
--- a/titlebot/commands/list
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-import json
-from os import environ
-import sys
-import os
-import poll
-
-f = 'suggestions.json'
-title=" ".join(sys.argv[1:])
-db = poll.load_db(f)
-if len(sys.argv) > 1 and ("-h" in sys.argv[1] or "usage" == sys.argv[1]):
- print("""usage: list <(age|votes)>
- sort by age or by votes (default: age)
-""")
- sys.exit(0)
-
-if len(sys.argv) > 1 and ("votes" in sys.argv[1]):
- use = poll.sort_by_votes(db)
-elif len(sys.argv) > 1 and ("age" in sys.argv[1]) or len(sys.argv) == 1:
- use = db
-else:
- print("unknown sorting method")
- sys.exit(1)
-
-for entry in use:
- print("#%d %s (votes: %d)" %
- (db.index(entry),entry['title'],sum(entry['votes'].values())))