LibreOffice plugin to pipe whole Writer documents through Google Translate, that ought to keep most of the page formatting.

βŒˆβŒ‹ βŽ‡ branch:  PageTranslate


Artifact [d97909fca1]

Artifact d97909fca1d6ef346e6666264e420b8fa820ee86:

  • File dingonyms/man/dingonyms.md — part of check-in [ca7d968d49] at 2022-10-13 08:35:11 on branch trunk — doc --setup flag (user: mario size: 6807)

% dingonyms(1) for ding Version 0.5

NAME

dingonyms β€” basic synonym/antonym lookup tool

SYNOPSIS

dingonyms "word"

dingonyms [--thesaurus] [--merriamwebster] [--wordhippo] "find"

dingonyms [--openthesaurus --woxikon --urban] "Wort"
dingonyms [--reverso --fr --es --it --jp] "bonjour"

dingonyms [--no-antonyms] [--async] --all "word"

dictcc [en-es en-ru de-nl de-it] "translate"

DESCRIPTION

To be used as lookup tool for ding(1). Scans the specified online service for synonyms.
It's not very useful as CLI tool by itself, because of the particular dict formatting.

PARAMS

Parameters can be introdoced with any combination of - or -- dashes or + signs.
Most can also be abbreviated (should cover some typos).

Parameter Aliases Class
--thesaurus -t --thes EN
--merriamwebster -mw --merr --webster --merweb EN
--synonym -s --syn --synonym.com EN
--reverso --rev // -fr -es -it -pt -nl -ru -jp EN/**
--wordhippo -hippo --wordhip EN
--mobythesaurus -mby --moby EN
--urban -u --urb --ubn LEXICON
--dictcc --en-es --en-it --de-fr --en-pt DICT
--openthesaurus -ot --othes --open DE
--woxikon -wx --woxi DE
--synonyme_de -sd --desyn DE
--all (-t +mw +syn +rev +ot +wx +urban) MIXED
--en (-t +mw +syn +rev) MIXED
--de (-ot -wx -sd) MIXED
--no-antonyms -na FLAG
--no-headers -nh FLAG
--async --parallel ++io FLAG

They can also be combined (dingonyms -t -mw -u "find"), so two or more services get queried at once.

  • And obviously there's also --all to query most supported sites.
  • While --en and --de combine the other main services.
  • Reverso offers some alternative languages (-fr, -it, -ru).
  • And --dictcc that allows for pair-language specifiers (-en-tr, -de-fr)

Execution flags should/must be noted before any translation service:

  • The --no-antonyms flag isn't consistently supported by all backends. (It's actually more effort to skip around unwanted data, rather just outputting it as it comes in.)
  • --no-headers to omit the "✎ {Sitename}" titles before any output.
  • And --asnyc speeds up the processing of multiple sites, at the cost of potentially intermingling their output. It's a rather crude threading scheme, and no care has been taken to rewrite dingonyms to fully support that. It's primarily meant for --all and --de, --en. There's preliminary support for asyncing selected sites as well (e.g. dingonyms --async ++thes ++merr ++urb "word"), where it would be less likely mash up antonyms. (The execution speed of the regex+print loops determines if there's any mashup whenever HTTP requests complete at the same time.)

DICTCC

The dictcc mode is special, in that it provides an actual translation dictionary between different languages. The default mode is en→de, but alternative --from-to options can be specified. Additionally there's a commandline shortcut just for this backend:

dictcc en-it -- "translate"

The -- is optional as is the --lng-lng dash prefix. Otherwise it's the same as invoking dingonyms.

CONFIG

The search services can be configured through the GUI (somewhat fiddly with Change+New). Alternatively via dingonyms --setup for a single entry.
Or by editing ~/.dingrc directly. To have all services present for example:

set searchmeth(3,name) {Synonyms}
set searchmeth(3,type) {3}
set searchmeth(3,dictfile) {}
set searchmeth(3,separator) { :: }
set searchmeth(3,language1) {Group}
set searchmeth(3,language2) {Synonyms}
set searchmeth(3,grepcmd) {dingonyms}
set searchmeth(3,grepopts) {--thesaurus}
set searchmeth(3,maxlength) {30}
set searchmeth(3,maxresults) {200}
set searchmeth(3,minlength) {2}
set searchmeth(3,shapedresult) {1}
set searchmeth(3,foldedresult) {0}
set searchmeth(4,name) {Merriam-Webster}
set searchmeth(4,type) {3}
set searchmeth(4,dictfile) {}
set searchmeth(4,separator) { :: }
set searchmeth(4,language1) {Group}
set searchmeth(4,language2) {Synonym}
set searchmeth(4,grepcmd) {dingonyms}
set searchmeth(4,grepopts) {--merriamwebster}
set searchmeth(4,maxlength) {30}
set searchmeth(4,maxresults) {200}
set searchmeth(4,minlength) {2}
set searchmeth(4,shapedresult) {1}
set searchmeth(4,foldedresult) {0}
set searchmeth(5,name) {OpenThesaurus}
set searchmeth(5,type) {3}
set searchmeth(5,dictfile) {}
set searchmeth(5,separator) { :: }
set searchmeth(5,language1) {Group}
set searchmeth(5,language2) {Synonyms}
set searchmeth(5,grepcmd) {dingonyms}
set searchmeth(5,grepopts) {--openthesaurus}
set searchmeth(5,maxlength) {30}
set searchmeth(5,maxresults) {200}
set searchmeth(5,minlength) {2}
set searchmeth(5,shapedresult) {1}
set searchmeth(5,foldedresult) {0}
set searchmeth(6,name) {Urban}
set searchmeth(6,type) {3}
set searchmeth(6,dictfile) {}
set searchmeth(6,separator) { :: }
set searchmeth(6,language1) {Word}
set searchmeth(6,language2) {Definition}
set searchmeth(6,grepcmd) {dingonyms}
set searchmeth(6,grepopts) {--urban}
set searchmeth(6,maxlength) {30}
set searchmeth(6,maxresults) {200}
set searchmeth(6,minlength) {2}
set searchmeth(6,shapedresult) {1}
set searchmeth(6,foldedresult) {0}

Beware not to overwrite existing/custom entries.
If the entries don't show up, ding might not see dingonyms in the PATH:

SETUP

ding started from the Desktop environment might not find dingonyms, if installed per pip. You'll have to symlink it:

ln -s ~/.local/bin/dingonyms ~/bin/

Or reconfigure ~/.profile to generally include ~/.local/bin (which doesn't seem to be standard in most distros).

SEE ALSO

ding(1), python(1)