Created
July 22, 2015 18:26
-
-
Save wbsch/e529c0d136b179e9c536 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Proof of Concept for expanding aliases in annotations. | |
# | |
# See https://bug.tasktools.org/browse/TW-77 | |
import json | |
import re | |
import sys | |
old = json.loads(sys.stdin.readline()) | |
new = json.loads(sys.stdin.readline()) | |
if "annotations" in new: | |
for anno in new["annotations"]: | |
anno["description"] = re.sub(r"dbugs:([^ ]+)", r"http://bugs.debian.org/\1", anno["description"]) | |
print(json.dumps(new)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment