logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

leo - commandline interface to http://dict.leo.org/.

Author

       Thomas v.D. <tlinden@cpan.org>

Bugs

leo depends on http://dict.leo.org/. It may break leo if they change something on the site. Therefore  be
       so  kind and inform me if you encounter some weird behavior of leo.  In most cases it is not a bug of leo
       itself, it is a website change on http://dict.leo.org/.

       In such a case repeat the failed query and use the commandline flag -d (which enables debugging) and send
       the full output to me, thanks.

Caching

leo supports caching of queries for faster results if you repeatedly use the same query. A query consists
       of the given term (the key word or string) plus the translation option settings.

       If you, for example, execute once the following query:

       % leo langnase

       and somewhere later:

       % leo -c exact

       then leo will treat the latter query as a different one  than  the  previous  one,  because  dict.leo.org
       behaves different when different translation options are given.

Config

leo reads a config file .leo in your home directory if it exists. The following variables are supported:

       use_latin
           Turns on conversion of UTF8 characters to their latin* encoding.

           Default setting (if not given): yes.

       use_cache
           Controls the use of the cache (see later).

           Possible values: yes or no.

           Default setting(if not given): yes.

           If  the  commandline  option -f or --force has been set then the cache will not be used for the query
           and if for this query exists an entry in the cache it will be removed from it.

       use_color
           Controls the use of escape sequences in the terminal output to highlight the key-waord in the result.

           Possible values: yes or no.

           Default setting(if not given): yes.

           You can set this option via commandline too: -n or --noescapechars.

           The config option has higher precedence.

       user_agent
           You may modify the user agent as leo identifies itself on the target site. The default is:

           User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3.1; X11)

Description

leo is a commandline interface to the german/english/french dictionary on http://dict.leo.org/. It
       supports almost all features which the website supports, plus more.

       Results will be printed to the terminal. By default the searched key word will be highlighted (which can
       be turned off, see below).

       To get faster results, leo is able to cache queries if you repeatedly use the same query.

       leo acts as a standard webbrowser as your mozilla or what so ever does, it connects to the website,
       exectues the query, parses the HTML result and finally prints it somewhat nicely formatted to the
       terminal.

       As of this writing leo acts as:

        Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9

Files

~/.leo             the config file for leo. Not required.  ~/.leo-CACHE.db*   the cache file.

Name

       leo - commandline interface to http://dict.leo.org/.

Options

-s--spelltolerance
           Allow spelling errors.

           Possible values: standard, on or off.

           Default setting: standard.

       -m--morphology
           Provide morphology information.

           Possible values: standard, none or forcedAll.

           Default setting: standard.

       -c--chartolerance
           Allow umlaut alternatives.

           Possible values: fuzzy, exact or relaxed.

           Default: relaxed.

       -l--language
           Translation direction. Please note that dict.leo.org always translates either to or from german.

           The following languages are supported: english, polish, spanish, portuguese russian and chinese.

           You  can   specify only the country  code, or append de2  in order to force translation to german, or
           preprend de2 in order to translate to the other language.

           Valid examples:

           ru     to or from russian de2pl  to polish es2de  spanish to german

           Valid country codes:

           en    english es    spanish fr    french ru    russian pt    portuguese pl    polish ch    chinese

           Default: en.

       -n--noescapechars
           Don't use escapes for highlighting.

           Default: do highlighting.

           Controllable via config file too. See below.

           No highlighting will be used if STDOUT is not connected to a terminal.

       -f--force
           Don't use the query cache.

           Default: use the cache.

           This option has no effect if use_cache is turned off in the config file.

       -u--user
           Specify the http proxy user to use if your proxy requires authentication. Read  the  'PROXY'  section
           for more details.

       -p--passwd
           Specify the cleartext password to use with http proxy authentication.

           This is not recommended and just implemented for completeness.

       -h--help
           Display this help and exit.

       -v--version
           Display version information and exit.

       -d--debug
           Enable  debugging  output  (a lot of it, beware!), which will be printed to STDERR. If you find a bug
           you must supply the debugging output along with your bugreport.

       term is the key word which you want to translate.  If the term  contains  white  spaces  quote  it  using
       double quotes.

       If the term parameter is not specified, leo will read it from STDIN.

Proxy

leo  can  be  used  with  a  HTTP  proxy  service. For this to work, you only have to set the environment
       variable http_proxy. It has the following format:

       PROTO://[USER:PASSWD@]SERVER[:PORT]

       The only supported protocol is http. If your  proxy  works  without  authentication,  you  can  omit  the
       user:passwd part. If no port is specified, 80 will be used.

       Here is an example (for bash):

       export http_proxy=http://172.16.120.120:3128

       and an example with authentication credentials:

       export http_proxy=http://max:34dwe2@172.16.120.120:3128

       As  security  is always important, I have to warn you, that other users on the same machine can read your
       environment using the 'ps -e ..' command, so this is not recommended.

       The most secure way for proxy authentication is just to specify the server+port with  http_proxy  but  no
       credentials, and instead use the -u commandline parameter to specify a user (do not use -p to specify the
       password,  this  will  also be readyble in process listing). In this case, leo will ask you interactively
       for the password. It will try its best to hide it from being displayed when you type  it  (as  most  such
       routines  in  other  tools  do  it  as well), it this fails (e.g. because you do not have the 'stty' tool
       installed), the password will be read from STDIN.

Synopsis

        leo [-slmcfuphdv] [<term>]

Version

       This is the manpage for leo version 2.01.

perl v5.34.0                                       2022-06-04                                            LEO(1p)

See Also