One way to go about this:
$ sudo updatedb
[sudo] password for vlastimil:
# - No output means it is still running.
# - Once it is finished, your prompt re-appears.
# - It can take much time if not running fast SSDs.
$ locate ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/bin/ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/bin/ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/resources/ebook-convert-complete.calibre_msgpack
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/share/bash-completion/completions/ebook-convert
There you can see two options. If you try this one, you get an error, but the second one works:
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/bin/ebook-convert: error while loading shared libraries: libcalibre-launcher.so: cannot open shared object file: No such file or directory
As I am using Bash, I can simply create an alias to the correct file (i.e. without /bin/ before ebook-convert like this:
alias ebook-convert='/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/ebook-convert'
Working command:
$ ebook-convert
Usage: ebook-convert input_file output_file [options]
Convert an e-book from one format to another.
input_file is the input and output_file is the output. Both must be specified as the first two arguments to the command.
The output e-book format is guessed from the file extension of output_file. output_file can also be of the special format .EXT where EXT is the output file extension. In this case, the name of the output file is derived from the name of the input file. Note that the filenames must not start with a hyphen. Finally, if output_file has no extension, then it is treated as a folder and an "open e-book" (OEB) consisting of HTML files is written to that folder. These files are the files that would normally have been passed to the output plugin.
After specifying the input and output file you can customize the conversion by specifying various options. The available options depend on the input and output file types. To get help on them specify the input and output file and then use the -h option.
For full documentation of the conversion system see
https://manual.calibre-ebook.com/conversion.html
Whenever you pass arguments to ebook-convert that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"
Options:
--version show program's version number and exit
-h, --help show this help message and exit
--list-recipes List builtin recipe names. You can create an e-book from a
builtin recipe like this: ebook-convert "Recipe Name.recipe"
output.epub
Created by Kovid Goyal <[email protected]>
If you have some better solution, please post it, cheers.
ebook-convertavailable to you as usual; so mentioning this in the question would make sense. Good day to you too!