You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may have actually been a bug, but it was a useful bug: prior to 4.3.0 a | separated list of words in a dictunformat would be split into synonyms when converting to .ifo. Is there a supported method of listing synonyms in dictunformat?
I started writing this issue as a feature request to add support for synonyms when converting from dictunformat to slob, but when I upgraded from 4.2 to the latest version to make a testcase, I found that it broke the synonym handling for stardict format. Previously I was converting dictunformat -> stardict -> slob as a way to get dictunformat+synonyms into slob format.
cat <<EOF>test.dictunformat
_____
foo|foo1|foo2|foo3
This is a test
_____
bar|bar1|bar2|bar3
Another test
EOF
pyglossary-4.2.1 test.dictunformat test-4.2-1.ifo
pyglossary-4.3 test.dictunformat test-4.3.ifo
dictunformat tool uses "semi-colon and 3 spaces" by default to separate headword and alternates (You can change it with --headword-separator).
_____
foo; foo1; foo2; foo3
This is a test
_____
bar; bar1; bar2; bar3
Another test
I pushed a commit and made it the default behavior of PyGlossary to split with this separator.
I suggest you fix your files.
But if you still want to use |, use a command like this:
This may have actually been a bug, but it was a useful bug: prior to 4.3.0 a | separated list of words in a dictunformat would be split into synonyms when converting to .ifo. Is there a supported method of listing synonyms in dictunformat?
I started writing this issue as a feature request to add support for synonyms when converting from dictunformat to slob, but when I upgraded from 4.2 to the latest version to make a testcase, I found that it broke the synonym handling for stardict format. Previously I was converting dictunformat -> stardict -> slob as a way to get dictunformat+synonyms into slob format.
cat test-4.2.1.ifo
StarDict's dict ifo file
version=3.0.0
bookname=test.dictunformat
wordcount=2
idxfilesize=24
sametypesequence=m
synwordcount=6
description=
cat test-4.3.ifo
StarDict's dict ifo file
version=3.0.0
bookname=test.dictunformat
wordcount=2
idxfilesize=54
sametypesequence=m
description=
The text was updated successfully, but these errors were encountered: