summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2014-04-10 16:44:16 -0400
committerNick White <git@njw.name>2014-04-10 16:44:16 -0400
commit83efb1888dc4a319c0a8d07d95a5becd9a44bef2 (patch)
tree3137012ffcc4211a7d06faaed1291d9914ce973e
parent3df3a511b52b74cb159e43f692ce839dec1ea3d7 (diff)
downloadoed2dict-1.1.tar.bz2
oed2dict-1.1.zip
Disable --index-data-separator usage, as it interferes with released versions of goldendict1.1
-rw-r--r--Makefile1
-rw-r--r--htmtojargon.awk11
2 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8b6d8fd..8b60533 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,6 @@ oed.dict: oed.jargon
cat oed.jargon \
| dictfmt -j --utf8 \
--columns 0 --headword-separator ',' \
- --index-data-separator " " \
-u http://njw.me.uk/oed \
-s "Oxford English Dictionary, 2nd Edition" \
oed
diff --git a/htmtojargon.awk b/htmtojargon.awk
index 323b7ee..f67cd49 100644
--- a/htmtojargon.awk
+++ b/htmtojargon.awk
@@ -9,9 +9,14 @@ BEGIN {
{ printdefs($1, $2); }
function printdefs(word, defs) {
- # split the headwords and other information about the word,
- # to be used in conjuction with dictfmt's --index-data-separator
- sub("<i>", " ", word);
+ # Split the headwords and other information about the word. This
+ # ensures that e.g. 'n.' queries don't match every noun.
+ # To be used in conjuction with an argument to dictfmt like this:
+ # --index-data-separator " "
+ # This is disabled at the moment as GoldenDict prior to 2c901d5
+ # (2013-06-16) had a bug that would ignore any entry with this
+ # extra information in the index.
+ #sub("<i>", " ", word);
n = split(defs, array, "<def>");
for(i=0; i<=n; i++) {