[Git][reproducible-builds/reproducible-notes][master] 2 commits: Add copyright notice.
Chris Lamb
gitlab at salsa.debian.org
Wed Feb 17 18:08:26 UTC 2021
Chris Lamb pushed to branch master at Reproducible Builds / reproducible-notes
Commits:
06d1b670 by Chris Lamb at 2021-02-17T18:00:38+00:00
Add copyright notice.
- - - - -
636481f3 by Chris Lamb at 2021-02-17T18:08:10+00:00
Add some help text; thanks for the suggestion.
- - - - -
1 changed file:
- bin/auto-classify
Changes:
=====================================
bin/auto-classify
=====================================
@@ -1,10 +1,51 @@
#!/usr/bin/env python3
+#
+# Copyright © 2020-2021 Chris Lamb <lamby at debian.org>
+#
+# diffoscope is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# diffoscope is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import re
+import sys
import json
+import click
import fileinput
+ at click.command()
+def main():
+ """
+ Takes the output from `diffoscope --json=X` and attempts to guess which
+ issue(s) the package is affected by. For example:
+
+ $ diffoscope --json=output.json a.dsc b.dsc
+ $ bin/auto-classify output.json
+ build_path_captured_by_octave
+ $
+
+ If no arguments are provided, the JSON is read from standard input so
+ you can pipe it in. For example:
+
+ $ diffoscope --json=- a.dsc b.dsc | bin/auto-classify
+ build_path_captured_by_octave
+ """
+
+ raw = "".join(fileinput.input())
+
+ for x in walk_json(json.loads(raw)):
+ print(x)
+
+
def walk_json(elem):
if isinstance(elem, list):
for x in elem:
@@ -121,7 +162,4 @@ def walk_json(elem):
if __name__ == "__main__":
- raw = "".join(fileinput.input())
-
- for x in walk_json(json.loads(raw)):
- print(x)
+ sys.exit(main())
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-notes/-/compare/48b107ceb07d8c63e6fb55a36d90cde81e7d4629...636481f37f4cd42e87916c3b6e1f118f172ec7cc
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-notes/-/compare/48b107ceb07d8c63e6fb55a36d90cde81e7d4629...636481f37f4cd42e87916c3b6e1f118f172ec7cc
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20210217/ea4d3bd3/attachment.htm>
More information about the rb-commits
mailing list