summaryrefslogtreecommitdiff
path: root/hacks/metadata_from_problem
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-01-28 12:49:08 +0100
committerCarl Hetherington <cth@carlh.net>2020-02-03 20:40:21 +0100
commitc2cc3e03b3b5973b64271cd8dcf4e7843e8b6d1e (patch)
tree02b736ee3ee8219027c4c17a6132c6fc24c1f3a2 /hacks/metadata_from_problem
parent282f9b311b394bfec6ab55f85bb28138e7605571 (diff)
Add new script.
Diffstat (limited to 'hacks/metadata_from_problem')
-rwxr-xr-xhacks/metadata_from_problem14
1 files changed, 14 insertions, 0 deletions
diff --git a/hacks/metadata_from_problem b/hacks/metadata_from_problem
new file mode 100755
index 000000000..a739d5fdd
--- /dev/null
+++ b/hacks/metadata_from_problem
@@ -0,0 +1,14 @@
+#!/usr/bin/python3
+
+import sys
+
+on = False
+for line in sys.stdin:
+ line = line.strip()
+ if line == '<?xml version="1.0" encoding="UTF-8"?>' or on:
+ print(line)
+ on = True
+ if line == '</Metadata>':
+ on = False
+
+