Verified Commit cf7390c3 authored by Vladimír Štill's avatar Vladimír Štill
Browse files

ddd conversion script for qdefx question files

parent c802d0ab
Pipeline #55233 failed with stage
in 19 seconds
#!/usr/bin/env bash
[ $1 ] || {
cat <<EOF | sed 's/^ //' >&2
Converts qdefx question files from IS MU to the new format. Input files must be
in the second-generation format (the type of external evaluator is f; used 2018
and 2019).
Files are modified in-place.
usage: $0 QDEFX_FILES
exit 1
for i in "$@"; do
# first regex replaces definition inside the ebmedded old QDEF format,
# which is not really used, but should be kept in sync
# the second one prelaces the proper definition in the new format
sed -i -e 's/^:\(e[^=]*\)="f:/:\1="d:?/' \
-e 's|\(<check><type>external</type><service>\)f\(</service><correct><!\[CDATA\[\)|\1d\2?|' \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment