LEO(1p)
π leo(1p) β the group chat β¨
okay bestie, gather round π this is leo, and she's a commandline interface to http://dict.leo.org/ β the German/English/French dictionary situation. she lives in the User Contributed Perl Documentation section, hence the 1p π
πΈ SYNOPSIS πΈ
leo [-slmcfuphdv] [<term>]
that's it. that's the whole vibe.
β¨ DESCRIPTION β¨
so leo is a commandline interface to the german/english/french dictionary over at http://dict.leo.org/. she supports almost all the features the website supports, plus more. main character energy fr fr π
results get printed to the terminal. by default, the key word you searched gets highlighted (you can turn that off, keep reading bestie).
and because waiting is not the vibe, leo can cache queries if you keep running the same one over and over. obsessed. π
leo acts as a standard webbrowser, just like your mozilla or what so ever does β she connects to the website, executes the query, parses the HTML result, and finally prints it somewhat nicely formatted to the terminal. lowkey iconic.
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
(yeah she's cosplaying a Firefox from 2007, don't perceive her π«Ά)
π¦ OPTIONS π¦
-s,--spelltoleranceβ allow spelling errors. your typos are valid, bestie π
possible values: standard, on or off.
default setting: standard.
-m,--morphologyβ hand over the morphology info.
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. and heads up: dict.leo.org always translates either to or from german. no exceptions, that's just the rules π
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 prepend de2 in order to translate to the other language.
valid examples:
ruβ to or from russiande2plβ to polishes2deβ spanish to german
valid country codes:
enβ englishesβ spanishfrβ frenchruβ russianptβ portugueseplβ polishchβ chinese
default: en.
-n,--noescapecharsβ don't use escapes for highlighting. so no glow-up for the search term, sad but valid π₯²
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. fresh query, no leftovers π§
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. like, seriously, not the move π
-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 toSTDERR. if you find a bug you must supply the debugging output along with your bugreport. no debug output, no bug report, periodt.
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.
π 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 asleoidentifies itself on the target site. the default is:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3.1; X11)
π 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. so it's a whole package deal, not just the term π«Ά
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. no cap.
π 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 readable in process listing). in this case, leo will ask you interactively for the password. she will try her best to hide it from being displayed when you type it (as most such routines in other tools do it as well), if this fails (e.g. because you do not have the stty tool installed), the password will be read from STDIN. slay for trying though π
π FILES π
~/.leo the config file for leo. Not required.
~/.leo-CACHE.db* the cache file.
π 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/. it's giving "don't shoot the messenger" π
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. π«Ά
π₯ COPYRIGHT π₯
leo copyleft 2000-2017 Thomas v.D.. All rights reserved.
http://dict.leo.org/ copyright (c) 1995-2017 LEO Dictionary Team.
the search results returned by leo are based on the work of the people at LEO.org. thanks for the great work. π
some time ago they told me that they are disagreed with leo, or in other words: from their point of view leo seems to break copyright law in some or another way.
I thought a long time about this, but I must deny this. leo acts as a simple web client, just like mozilla, IE or even lynx are doing. they are providing the service to the public so I use my favorite web browser to make use of it. in fact my favorite browser to view dict.leo.org is leo. there is nothing wrong with that. IMHO. β¨
if you disagree or are asked by the LEO team to stop using leo you may decide this for yourself. I in my case wrote kinda browser, what is not prohibited. at least not today. π
π§ VERSION π§
this is the manpage for leo version 2.01.
and that's the whole page bestie, no notes π this lil manual came to you from the perl v5.34.0 era, dated 2022-06-04 β go forth and translate, you absolute icon π¦β¨π
π¦ where this page comes from
- debian bookworm: libwww-dict-leo-org-perl 2.02-3 Β· GPL-1.0-or-later
- debian trixie: libwww-dict-leo-org-perl 2.02-3 Β· GPL-1.0-or-later
- ubuntu noble: libwww-dict-leo-org-perl 2.02-3 Β· GPL-1.0-or-later
- ubuntu resolute: libwww-dict-leo-org-perl 2.02-3 Β· GPL-1.0-or-later
- ubuntu stonking: libwww-dict-leo-org-perl 2.02-3 Β· GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms