Friday, September 11, 2020

Soffice from Command Line - MAN Pages

 

Name

libreoffice - LibreOffice office suite

SYNOPSIS

libreoffice [--accept=accept-string] [--base] [--calc] [--convert-to output_file_extension[:output_filter_name] [--outdir output_dir] file]... [--display display] [--draw] [--global] [--headless] [--help|-h|-?] [--impress] [--invisible] [--infilter="<filter>"] [--math] [--minimized] [-n file]... [--nodefault] [--nolockcheck] [--nologo] [--norestore] [-o file]... [-p file...] [--print-to-file [--printer-name printer_name] [--outdir output_dir] file]... [--pt printername file...] [--show Impress file]... [--unaccept=accept-string] [--terminate_after_init] [--view file]... [--web] [--writer] [file...]
lobase
localc
lodraw
lofromtemplate
loimpress
lomath
loweb
lowriter

DESCRIPTION

LibreOffice (LO for short) is a multi-platform office productivity suite. It was derived from OpenOffice.org 3.3 Beta on September 28, 2010.

libreoffice is a shell script that sets up the environment and passes the command line arguments to the soffice.bin binary.

Alternatively, the following helper scripts start the respective module:

sbase, scalc, sdraw, simpress, smath, sofficerc, swriter

OPTIONS

--accept=accept-string
Specify a UNO connect-string to create a UNO acceptor through which other programs can connect to access the API.
--base
Starts the wizard for a new Base document.
--calc
Starts with a new Calc document.
--convert-to output_file_extension[:output_filter_name] [--outdir output_dir] file...
Batch converts files. If --outdir is not specified then the current working directory is used as the output directory for the converted files. It implies --headless.

Examples:

--convert-to pdf *.doc

Converts all .doc files to PDFs.

--convert-to pdf:writer_pdf_Export --outdir /home/user *.doc

Converts all .doc files to PDFs using the settings in the Writer PDF export dialog and saving them in /home/user.

--display display
This option specifies the X server to use; see X(7)
--draw
Starts with a new Draw document.
--global
Starts with a new Global document.
--headless
Starts in "headless mode", which allows using the application without user a interface.

This special mode can be used when the application is controlled by external clients via the API.

It implies --invisible and strictly ignores any GUI environment. --quickstart does not work with this parameter.

--help|-h|-?
Lists LibreOffice command line parameters.
--impress
Starts with a new Impress document.
--invisible
Starts in invisible mode.

Neither the start-up logo nor the initial program window will be visible. LO can be controlled and documents and dialogs can be opened via the API.

When started with this parameter, it can only be quit using the taskmanager (Windows) or the kill command (UNIX based systems).

--quickstart does not work with this parameter.

--infilter="<filter>"
Force an input filter type if possible. For example --infilter="Calc Office Open XML" only
--math
Starts with a new Math document.
--minimized
Keeps the splash screen minimized.
-n template...
Creates the a new document from the given templates.
--nodefault
Starts LO without creating a new document. The next time you start LO, the welcome screen is shown.

It's used together with --nologo by quick starters. Note that --quickstart has no longer been supported since OpenOffice.org 2.0.0.

--nolockcheck
Disables the check for remote instances using the installation.
--nologo
Disables the splash screen at program start.
--norestore
Disables restart and file recovery after a system crash. It is possible that LO will try to restore a file it keeps crashing on, if that happens --norestore is the only way to start LO.
--nosplash
Disables the splash screen at program start.
-o file...
Opens the given files for editing, even templates.

Without -o a template file would create a new document derived from that template.

-p file...
Prints the given files to the default printer and ends. The splash screen does not appear.

If the file name contains spaces, then it must be enclosed in quotation marks.

--print-to-file [--printer-name printer_name] [--outdir output_dir] file...
Batch print files to file. If --printer-name is not specified the default printer is used. If --outdir is not specified then the current working directory is used as the output directory for the converted files.

Examples:

--print-to-file *.doc

Prints all .doc files to the current working directory using the default printer.

--print-to-file --printer-name nasty_lowres_printer --outdir /home/user *.doc

Prints all .doc files to /home/user directory using the nasty_lowres_printer.

--pt printername file...
Prints the given files to the printer printername and ends. The splash screen does not appear.

If a file name contains spaces, then it must be enclosed in quotation marks.

--quickstart --quickstart=no
Starts LO with it's quick starter. --quickstart disable the quick starter.

Does not work with --invisible or --headless.

--show Impress file...
Opens the given Impress files, starts the presentation and quits after they have finished.
--unaccept=accept-string
Closes an acceptor that was created with --accept option.

Use --unaccept=all to close all open acceptors.

--terminate_after_init
Starts LO and terminates after it registers some UNO services. Doesn't show the splash during startup.
--view file...
Opens the given files read-only creating a temporary copy of them at $TMPDIR.
--web
Starts with a new HTML document.
--writer
Starts with a new Writer document.

Monday, March 16, 2020

Links with %GDWORD% variable for Goldendict


NAME LINK
TMClass RODE http://tmclass.tmdn.org/ec2/translate/find?sourceLang=ro&targetLang=de&niceClass=&text=%GDWORD%&size=100&page=1&searchMode=WORDSPREFIX&sortBy=relevance&incClassmarks=on
TMClass DERO http://euipo.europa.eu/ec2/translate/find?sourceLang=de&targetLang=ro&niceClass=&text=%GDWORD%&size=100&page=1&searchMode=WORDSPREFIX&sortBy=relevance&incClassmarks=on
TMClassENDE
http://tmclass.tmdn.org/ec2/translate/find?sourceLang=en&targetLang=de&niceClass=&text=%GDWORD%&size=100&page=1&searchMode=WORDSPREFIX&sortBy=relevance&incClassmarks=on
TAUS DE-RO https://data-app.taus.net/api/segment.html?source_lang=de-DE&target_lang=ro-RO&q=%GDWORD%&auth_username=[yourEmail]&auth_password=[yourpassword]
TAUS DE-EN https://data-app.taus.net/api/segment.html?source_lang=de-DE&target_lang=en-US&q=%GDWORD%&auth_username=&auth_password=
Term.tilde.com DE-RO https://term.tilde.com/search?term=%GDWORD%&sourceLang=de&targetLang=ro
Term.tilde.com ALL-ALL https://term.tilde.com/search?term=%GDWORD%&targetLang=null&sourceLang=null
Bing Search Text https://www.bing.com/search?q=%GDWORD%
Bing Search Images https://www.bing.com/images/search?q=%GDWORD%
Microsoft Terminology EN-RO https://www.microsoft.com/de-de/language/Search?&searchTerm=%GDWORD%&langID=623&Source=true&productid=undefined
Microsoft Terminology EN-DEhttps://www.microsoft.com/de-de/language/Search?&searchTerm=%GDWORD%&langID=354&Source=true&productid=undefined
Linguee DICT DE-EN https://dict.deepl.com/german-english/search?ajax=1&query=%GDWORD%&kind=full&onlyDictEntries=1
Linguee DICT EN-DEhttps://dict.deepl.com/english-german/search?ajax=1&query=%GDWORD%&kind=full&onlyDictEntries=1
Linguee DICT DE-RO https://dict.deepl.com/german-romanian/search?ajax=1&query=%GDWORD%&source=german&kind=full
Linguee Heroku EN-DEhttps://linguee-api.herokuapp.com/api?q=%GDWORD%&src=en&dst=de
Linguee RO-GEhttp://www.linguee.com/romanian-german/search?source=auto&query=%GDWORD%&ie=utf-8&oe=utf-8
Linguee EN-ROhttp://www.linguee.com/english-romanian/search?source=auto&query=%GDWORD%
Glosbe Autosuggest https://glosbe.com/ajax/phrasesAutosuggest?from=en&dest=de&phrase=%GDWORD%
Proz DE-ROhttps://www.proz.com/search/?term=%GDWORD%&from=deu&to=ron&whole_words=&folding=&es=1

Proz ALL-DEhttp://www.proz.com/search/?term=%GDWORD%&to=deu&separate=1&whole_words=&es=1
Leo.org ENDEhttps://dict.leo.org/englisch-deutsch/cat?side=right/%GDWORD%
Leo.org DEENhttps://dict.leo.org/englisch-deutsch/cat?side=left/%GDWORD%
IATE RODEhttp://iate.europa.eu/SearchByQuery.do?method=search&sourceLanguage=ro&targetLanguages=de&domain=0&typeOfSearch=s&request=&valid=Search&query=%GDWORD%
Google search http://www.google.com/search?q=%GDWORD%
Yandex APItranslate ALL-RO https://translate.yandex.net/api/v1.5/tr/translate?key=[key]&text=%GDWORD%&lang=de&format=plain&options=1
Yandex APItranslate DE-ROhttps://translate.yandex.net/api/v1.5/tr/translate?key=[key]&text=%GDWORD%&lang=de-ro&format=html&options=1
Yandex WEBtranslate DE-RO https://translate.yandex.com/?text=%GDWORD%&lang=de-ro
Babelfish DE-ROhttps://www.babelfish.de/dict?query=%GDWORD%&src=de&dst=ro



Babelfish MT DE-ROhttps://www.babelfish.de/mt.php?text=%GDWORD%&src=de&dst=ro
Babelfish MT AUTO-ROhttps://www.babelfish.de/mt.php?text=%GDWORD%&src=auto&dst=ro
Hallo DE-RO http://hallo.ro/dictionar-german-roman/%GDWORD%
Hallo EN-RO http://hallo.ro/dictionar-englez-roman/%GDWORD%
Mymemory EN-RO http://mymemory.translated.net/s.php?q=%GDWORD%&sl=en-GB&tl=ro-RO
Mymemory DE-RO http://mymemory.translated.net/s.php?q=%GDWORD%&sl=de-DE&tl=ro-RO
Dictindustry DE-EN  https://www.dictindustry.de/deutsch-englisch/%GDWORD%
Dictindustry DE-RO https://www.dictindustry.de/deutsch-rumänisch/%GDWORD%
dictionarenglez.ro ENRO https://www.dictionarenglez.ro/englez-englez/%GDWORD%
dictionarenglez.ro RO-ENhttps://www.dictionarenglez.ro/roman-englez/%GDWORD%
dictionarenglez.ro EN-ENhttps://www.dictionarenglez.ro/englez-englez/%GDWORD%
Juremy.com https://juremy.com/search?src=eng&dst=ron&q=%GDWORD%
Juremy.com API
https://juremy.com/api/simple?src=eng&dst=deu&q=%GDWORD%
PONS DEEN
https://en.pons.com/translate/german-english/%GDWORD%














































Deprecated:
EuroTermBank JSON https://eurotermbank.com/svc/termsvc/lookup/detailed?term=%GDWORD%&sourceLang=de&targetLang=ro
EuroTermBank JSON ALT https://eurotermbank.com/svc/termsvc/search/prefix?term=%GDWORD%&sourceLang=de&targetLang=ro
IATE DERO OLDhttp://iate.europa.eu/SearchByQuery.do?method=search&sourceLanguage=de&targetLanguages=ro&domain=0&typeOfSearch=s&request=&valid=Search&query=%GDWORD%




Name Link

Monday, March 9, 2020

Dictionar Forestier Poliglot – Multilingual Forestry Dictionary – Dictionnaire Forestier Polyglotte – Wörterbuch der Forstwirtschaft

This is a sample of the forestry multilingual dictionary containing terms in Romanian, English, French and German. The full dictionary contains 195 pages and may be bought as PDF.

 

Tuesday, March 3, 2020

Encode and decode URLs in Python 3

>>> import urllib.parse >>> query = 'Hellö Wörld@Python' >>> urllib.parse.quote(query) 'Hell%C3%B6%20W%C3%B6rld%40Python'
Note that, the quote() function considers / character safe by default. That means, It doesn’t encode / character -
>> urllib.parse.quote('/') '/'
The quote() function accepts a named parameter called safe whose default value is /. If you want to encode / character as well, then you can do so by supplying an empty string in the safe parameter like this-
>>> urllib.parse.quote('/', safe='') '%2F'

The quote() function encodes space characters to %20. If you want to encode space characters to plus sign (+), then you can use another function named quote_plus provided by urllib.parse package.
>>> import urllib.parse >>> query = 'Hellö Wörld@Python' >>> urllib.parse.quote_plus(query) 'Hell%C3%B6+W%C3%B6rld%40Python'

Encoding multiple parameters at once
You can encode multiple parameters at once using urllib.parse.urlencode() function. This is a convenience function which takes a dictionary of key value pairs or a sequence of two-element tuples and uses the quote_plus() function to encode every value. The resulting string is a series of key=value pairs separated by & character.
Let’s see an example -
>>> import urllib.parse >>> params = {'q': 'Python URL encoding', 'as_sitesearch': 'www.urlencoder.io'} >>> urllib.parse.urlencode(params) 'q=Python+URL+encoding&as_sitesearch=www.urlencoder.io'
If you want the urlencode() function to use the quote() function for encoding parameters, then you can do so like this -
urllib.parse.urlencode(params, quote_via=urllib.parse.quote)
Encoding multiple parameters at once where one parameter can have multiple values
The urlencode() function takes an optional argument called doseq. If your input can have multiple values for a single key, then you should set the doseq argument to True so that all the values are encoded properly -
>>> import urllib.parse >>> params = {'name': 'Rajeev Singh', 'phone': ['+919999999999', '+628888888888']} >>> urllib.parse.urlencode(params, doseq=True) 'name=Rajeev+Singh&phone=%2B919999999999&phone=%2B628888888888'

------
URL Decoding query strings or form parameters in Python (3+)
In Python 3+, You can URL decode any string using the unquote() function provided by urllib.parse package. The unquote() function uses UTF-8 encoding by default.
Let’s see an example -
>>> import urllib.parse >>> encodedStr = 'Hell%C3%B6%20W%C3%B6rld%40Python' >>> urllib.parse.unquote(encodedStr) 'Hellö Wörld@Python'

Decoding plus sign (+) to space character
The unquote() function does not decode plus sign (+) -
>>> urllib.parse.unquote('My+name+is+Rajeev') 'My+name+is+Rajeev'
But if you’re working with HTML forms then you’ll need to replace plus sign (+) with space character because HTML forms use application/x-www-form-urlencoded MIME type which encodes space character to plus sign (+) instead of %20.
For replacing plus sign with space, you can use the unquote_plus() function of urllib.parse package -
>>> import urllib.parse >>> encodedStr = 'My+name+is+Rajeev' >>> urllib.parse.unquote_plus(encodedStr) 'My name is Rajeev'

URL Decoding multiple query strings at once
If you want to decode or parse multiple query strings of type application/x-www-form-urlencoded (e.g 'name=Rajeev+Singh&phone=%2B919999999999'), then you can use parse_qs or parse_qsl functions provided by urllib.parse package.
The parse_qs function returns a dictionary of key-value pairs whereas the parse_qsl function returns a list of (key, value) tuples.
parse_qs
>>> import urllib.parse >>> queryStr = 'name=Rajeev+Singh&phone=%2B919999999999&phone=%2B628888888888' >>> urllib.parse.parse_qs(queryStr) {'name': ['Rajeev Singh'], 'phone': ['+919999999999', '+628888888888']}
parse_qsl
>>> import urllib.parse >>> queryStr = 'name=Rajeev+Singh&phone=%2B919999999999&phone=%2B628888888888' >>> urllib.parse.parse_qsl(queryStr) [('name', 'Rajeev Singh'), ('phone', '+919999999999'), ('phone', '+628888888888')]

Sunday, February 16, 2020

Autohotkey for Google Translate

^!r::Reload ; Assign Alt-Ctr-R as a hotkey to restart the script.
#x:: ; Windows+X - Translate segment MemoQ, Across, Trados Studio with Google Translate
FileEncoding, utf-8
WinGetActiveTitle, Title
IfInString, Title, memoQ
{
Send ^+s
Sleep, 200
SendInput ^{F8}
Sleep, 300
SendInput ^a
Sleep, 300
SendInput ^c
Clipwait
Send ^c
Sleep, 300
Clipwait
Sleep, 200
}
IfInString, Title, Across
{
Send !{PgDn}
Sleep, 200
SendInput ^a
Sleep, 300
}
IfInString, Title, Trados Studio
{
Sleep, 300
Send ^{Ins}
Sleep, 200
SendInput ^a
Sleep, 300
}
SendInput ^c
Clipwait
Send ^c
Sleep, 300
Clipwait
Sleep, 300
Clipwait
Sleep, 300
searchtext := clipboard
;StringReplace, searchtext, searchtext, .%A_SPACE%, ._, All ;StringReplace, searchtext, searchtext, %A_SPACE%., _., All
;StringReplace, searchtext, searchtext, `;%A_SPACE%, `;_, All, ; `%5F - for underscore
;StringReplace, searchtext, searchtext, `.%A_SPACE%, `._, All ;Msgbox %searchtexturlencoded%
searchtexturlencoded := UriEncode(searchtext)
;searchtexturlencoded := URLEncoding(searchtext)
; StringReplace, searchtext, searchtext, %A_SPACE%&%A_SPACE%, `%26, All
; StringReplace, searchtext, searchtext, %A_SPACE%, +, All
Sleep, 300
RunWait, wget.exe -U "Mozilla/5.0 Chrome/62.0.3202.94" "http://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=de&dt=t&q=%searchtexturlencoded%" -O source.out.txt,, Hide
FileRead, targettext, source.out.txt ;Msgbox %targettext%
StringTrimLeft, targettext, targettext, 4
StringTrimRight, targettext, targettext, 73
quotes := ""","""
Loop, 4 ;MsgBox, Iteration number is %A_Index%.
{
addedvalue := (A_Index - 1)
textbreak = "`,null`,null`,%addedvalue%`]`,`[" ;MsgBox Textbreak %textbreak%
IfInString, targettext, %textbreak%
{
StringReplace, targettext, targettext, %textbreak%, ‡, All ;Msgbox targettext . %targettext%
}
}
occurences =
Loop, Parse, targettext, ‡
{
loopingtext = %A_LoopField% ;Msgbox Loopfield: %loopingtext%
StringLen, targetlength, loopingtext
StringGetPos, posghilimele, loopingtext, %quotes% ;MsgBox Poziţie glilimele %posghilimele% Msgbox Target length %targetlength%
StringLen, targetlength, loopingtext
StringTrimRight, occurence, loopingtext, (targetlength - posghilimele)
occurences .= occurence ;Msgbox occurence after add %occurences% ;occurences := occurences . occurence
}
StringReplace, occurences, occurences, ș, ş, All
StringReplace, occurences, occurences, Ș, Ş, All
StringReplace, occurences, occurences, ț, ţ, All
StringReplace, occurences, occurences, Ț, Ţ, All
StringReplace, occurences, occurences, %A_SPACE%._%A_SPACE%, .%A_SPACE%, All
StringReplace, occurences, occurences, `;%A_SPACE%_, `;%A_SPACE%, All
StringReplace, occurences, occurences, `;%A_SPACE%%A_SPACE%, `;%A_SPACE%, All
StringReplace, occurences, occurences, `._, `.%A_SPACE%, All
occurences := UnSlashUnicode(occurences)
Clipboard = %occurences% ;googleout := Clipboard
Send ^v
Reload
; IfInString, Title, memoQ {Send ^{Enter} ;Send ^+{Enter}Send !{Up}}
return

uriDecode(str) {
    Loop
 If RegExMatch(str, "i)(?<=%)[\da-f]{1,2}", hex)
    StringReplace, str, str, `%%hex%, % Chr("0x" . hex), All
    Else Break
 return

, str
}

UriEncode(Uri, RE="[0-9A-Za-z]"){
    VarSetCapacity(Var,StrPut(Uri,"UTF-8"),0),StrPut(Uri,&Var,"UTF-8")
    While Code:=NumGet(Var,A_Index-1,"UChar")
    Res.=(Chr:=Chr(Code))~=RE?Chr:Format("%{:02X}",Code)
    return, Res
}

UnSlashUnicode(s) ; unslash unicode sequences like \u0026
{
rx = \\u([0-9a-fA-F]{4})
pos = 0
loop
{
pos := RegExMatch(s,rx,m,pos+1)
if (pos = 0)
break
StringReplace, s, s, %m%, % Chr("0x" . SubStr(m,3,4))
}
return, s
}

Wednesday, January 29, 2020

Excel formula to determine age from date of birth

Birth date Age
15.07.1996 24
07.06.1996 24
05.07.2002 18
04.12.2005 15
19.07.1992 28
23.11.1998 22
28.10.2000 20
02.10.2001 19
23.09.1996 24
09.05.2001 19
27.09.1997 23

Sometimes you might want to get the age of somebody, for instance, în order to determine whether they are minor or major (18 years old).
The German formula is: =(JAHR(JETZT())-JAHR(A2))

An English formula may be: ==INT(YEARFRAC(A2,TODAY()))
or
=IF(INT(YEARFRAC(A1,TODAY()))<18,"Minor","Adult")
or
=DATEDIF(A1, TODAY(), "y")
or with months and days
=DATEDIF(A1,TODAY(),"Y") & " Years, " & DATEDIF(A1,TODAY(),"YM") & " Months, " & DATEDIF(A1,TODAY(),"MD") & " Days"

You may use conditional formatting (bedingte Formatierung) to highlight figures under 18.