Commit 3bde02b2 authored by User expired's avatar User expired
Browse files

bib-unite: More stable removal of jabref comments

Comments may consist of more than one line.  So far, only the first
line was deleted without fixing brackets thus corrupting the file.
From now on, the comments are deleted as a whole.
parent 580c41db
......@@ -32,7 +32,6 @@ fi
# Concatenate and sort all files.
sed '1s/^/\n\n/;$s/$/\n@/;N;s/\([^\n]\)\n@/\1\n\n@/;P;D' "$@" \
| grep -v '@Comment{jabref-meta' \
| awk '
BEGIN {
RS="\n\n@"
......@@ -49,6 +48,7 @@ BEGIN {
printf(ORS)
}
' \
| sed '/^\x00Comment{jabref-meta/d' \
| sed '/^\x00/!d;/^\x00\x00$/d;/^\x00\x00\x00/d' \
| sed 'h;s/^\x00[^{]*{//;s/,\x00.*//;s/:/ /;s/\([a-z][a-z]*\)\( [^\x00]*\)/\2\1/;s/[0-9][0-9]* / &/;G;s/\n/\x00/' \
| sort -u \
......
......@@ -61,7 +61,10 @@ writeFileThree() { # Bibtex file with meta information by JabRef.
Year = {2017}
}
@Comment{jabref-meta: databaseType:bibtex;}
@Comment{jabref-meta:
databaseType:bibtex;
otherInfo:text;
}
EOF
}
......
Markdown is supported
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