PyGlossary is a tool for working with dictionary databases (glossaries)
<b>Basic Usage:</b>
    <b>PyGI (Gtk3)</b> Interface:
        To open PyGlossary window:
            <b>${CMD}</b>
        PyGI is the default interface (so you never need to use "--ui=gtk" or --gtk option)
        If PyGI was not found (not installed), then PyGlossary will fallback to Tkinter.
    <b>Tkinter</b> Interface:
        To open PyGlossary window:
            <b>${CMD} --tk</b>
        Or
            <b>${CMD} --ui=tk</b>
        Usually good for Windows and Mac OS X
    <b>Web</b> Interface:
        To open PyGlossary window:
            <b>${CMD} --web</b>
        Or
            <b>${CMD} --ui=web</b>
        For OS's with a modern web browser
    <b>Command-line</b> interface:
        To show this help:
            ${CMD} --help
        To show program version:
            ${CMD} --version
        To Convert:
            ${CMD} <u>INPUT_FILE</u> <u>OUTPUT_FILE</u>
        To Reverse:
            ${CMD} <u>INPUT_FILE</u> <u>OUTPUT_FILE</u>.txt --reverse
        Input and output formats will be detected from extensions if possible.
        If not, you need to specify input or output format, for example:
            ${CMD} test.utf8 test.ifo --read-format=tabfile
            ${CMD} test.utf8 test.ifo --read-format tabfile
            ${CMD} test.ifo test.utf8 --write-format=tabfile
            ${CMD} test.ifo test.utf8 --write-format tabfile

    <b>Interactive command-line</b> interface:
        Minimal command:
            <b>${CMD} --cmd</b>
        Or
            <b>${CMD} --ui=cmd</b>
        Additionally you can pass any flag to act to act as default


<b>General Options:</b>
    Verbosity:
        <b>-v0</b> or '--verbosity 0' for critical errors only
        <b>-v1</b> or '--verbosity 1' for errors only
        <b>-v2</b> or '--verbosity 2' for errors and warnings
        <b>-v3</b> or '--verbosity 3' for errors, warnings and info
        <b>-v4</b> or '--verbosity 4' for debug mode
        <b>-v5</b> or '--verbosity 5' for trace mode
    Appearance:
        --no-progress-bar and --no-color, useful for scripts

<b>Full Convert Usage</b>:
    ${CMD} <u>INPUT_FILE</u> <u>OUTPUT_FILE</u> [-v<u>N</u>] [--read-format=<u>FORMAT</u>] [--write-format=<u>FORMAT</u>]
        [--direct|--indirect|--sqlite] [--no-alts]
        [--sort|--no-sort] [--sort-cache-size=<u>2000</u>]
        [--utf8-check|--no-utf8-check] [--lower|--no-lower]
        [--read-options=<u>READ_OPTIONS</u>] [--write-options=<u>WRITE_OPTIONS</u>]
        [--source-lang=<u>LANGUAGE</u>] [--target-lang=<u>LANGUAGE</u>]
        ['--name=<u>GLOSSARY NAME</u>']

<b>Direct and indirect modes</b>
    Indirect mode means the input glossary is completely read and loaded into RAM, then converted
    into the output format. This was the only method available in old versions (before 3.0.0).
    Direct mode means entries are one-at-a-time read, processed and written into the output
    glossary. Direct mode was added to limit the memory usage for large glossaries; But it
    may reduce the conversion time for most cases as well.
    Converting glossaries into some formats like StarDict and EPUB-2 requires sorting entries.
    That's why direct mode will not work for these format, and PyGlossary will use indirect
    mode. Otherwise direct mode will be the default. You may override this by --indirect flag.


<b>SQLite mode</b>:
    As mentioned above, converting glossaries into some formats like StarDict will need
    them to loaded into RAM.
    This can be problematic if the glossary is too big to fit into RAM. That's when
    you should try adding --sqlite flag to your command. Then it uses SQLite as intermediate
    storage for sorting then fetching entries. This fixes the memory issue, and may even
    reduce running time of conversion (depending on your home directory storage).
    The temporary SQLite file is stored in ~/.cache/pyglossary/ then deleted after
    conversion, unless you pass --no-cleanup flag.
    Currently you can not disable alternates in SQLite mode (--no-alts is ignored).


Command line arguments and options (and arguments for options) is parsed with GNU getopt method

Compressing with gz, bz2 and zip is supported.
Just append these extension to the file name, for example:
    ${CMD} mydic.ifo mydic.txt.gz
And if the input file has these extensions (gz, bz2, zip), it will be extracted before loading

