summaryrefslogtreecommitdiffstats
path: root/python/tests/files/datacite/caseview.sh
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/files/datacite/caseview.sh')
-rwxr-xr-xpython/tests/files/datacite/caseview.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/tests/files/datacite/caseview.sh b/python/tests/files/datacite/caseview.sh
new file mode 100755
index 00000000..d1e98c04
--- /dev/null
+++ b/python/tests/files/datacite/caseview.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Open input and output in vertical vim split.
+#
+# $ caseview 13
+#
+view() {
+ if [ -z "$1" ]; then
+ echo usage: "$0" CASE-NUMBER
+ exit 1
+ else
+ padded=$(printf "%02d\n" "$1")
+ vim -O "datacite_doc_$padded.json" "datacite_result_$padded.json"
+ fi
+}
+
+view "$@"