We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3d204a commit 3ceee51Copy full SHA for 3ceee51
github.py
100644
100755
@@ -8,7 +8,7 @@
8
# ------------------------------------------------------------------------
9
# A class to download and organize information from GitHub.
10
11
-import json, logging, math
+import json, logging, math, sys
12
import requests
13
14
class GitHubIssues:
@@ -72,3 +72,13 @@ def _merge(self, content):
72
else:
73
# Overwrite value in the dict.
74
self._json[key] = value
75
+
76
+if __name__ == '__main__':
77
+ if len(sys.argv) < 2:
78
+ print("Usage: github.py <query>")
79
+ print("Ex: github.py repo:scijava/pom-scijava")
80
+ sys.exit(1)
81
+ query = "+".join(sys.argv[1:])
82
+ ghi = GitHubIssues()
83
+ ghi.download(query)
84
+ print(json.dumps(ghi._json, sort_keys=True, indent=4))
0 commit comments