PYGLOSSARY(1)

✨ NAME ✨

PyGlossary β€” a tool for converting dictionary files πŸ’–


🌈 DESCRIPTION 🌈

Okay so bestie, listen: PyGlossary is a tool for working with dictionary databases (glossaries). That's the whole vibe. It's giving "I hold your word lists and I convert them, no cap." πŸ‘‘

πŸŽ€ Basic Usage πŸŽ€

🫢 PyGI (Gtk3) Interface:

To open the PyGI window:

pyglossary

PyGI is the default interface, so you literally never need to use --ui=gtk. And if PyGI wasn't found (not installed), then PyGlossary will fallback to the Tkinter interface. Iconic behaviour honestly. ✨

πŸ¦‹ Tkinter Interface:

To open the PyGlossary window:

pyglossary --ui=tk

Usually good for Windows and Mac OS X πŸ’…

🧚 Command Line Interface:

To show this help:

pyglossary --help

To show program version:

pyglossary --version

To Convert:

pyglossary INPUT_FILE OUTPUT_FILE

To Reverse:

pyglossary INPUT_FILE OUTPUT_FILE.txt --reverse

Input and output file formats will be detected from the extensions. Except when you explicitly specify the input or output format β€” for example:

pyglossary mydic.utf8 mydic.ifo --read-format=tabfile
pyglossary mydic.utf8 mydic.ifo --read-format tabfile
pyglossary mydic.ifo mydic.utf8 --write-format=tabfile
pyglossary mydic.ifo mydic.utf8 --write-format tabfile

πŸ’œ General Options πŸ’œ

🌸 Verbosity:

  • -v0 or --verbosity 0 β€” critical errors only 🚨
  • -v1 or --verbosity 1 β€” errors only
  • -v2 or --verbosity 2 β€” errors and warnings
  • -v3 or --verbosity 3 β€” errors, warnings and info
  • -v4 or --verbosity 4 β€” debug mode πŸ› (main character energy, it tells you everything)

⭐ Appearance:

  • --no-progress-bar and --no-color β€” useful for Windows (non-Unix) command line πŸͺŸ

πŸ”₯ Full Convert Usage πŸ”₯

pyglossary INPUT_FILE OUTPUT_FILE [-vN] [--read-format=FORMAT]
[--write-format=FORMAT]

[--sort|--no-sort] [--direct|--indirect] [--sort-cache-size=2000]
[--utf8-check|--no-utf8-check] [--lower|--no-lower]
[--read-options=READ_OPTIONS] [--write-options=WRITE_OPTIONS]

Command line arguments and options (and arguments for options) are parsed with the GNU getopt method. iykyk 😌

You can also just type the extension of the output file instead of the full path, if you want to create it with the same input file name but another extension. For example:

pyglossary mydic.ifo txt

instead of:

pyglossary mydic.ifo mydic.txt

Compressing with gz, bz2 and zip is supported β€” just append these extensions to the file name, for example:

pyglossary mydic.ifo mydic.txt.gz

or

pyglossary mydic.ifo txt.gz

And if the input file has these extensions (gz, bz2, zip), it will be extracted before loading. Unzip and slay πŸ’…


πŸ“ Supported input formats πŸ“

  • BabylonBgl β€” Babylon (bgl) β€” extensions: .bgl
  • CC-CEDICT β€” CC-CEDICT β€” extensions: .u8
  • Csv β€” CSV β€” extensions: .csv
  • Dicformids β€” DictionaryForMIDs β€” extensions: .mids
  • DictOrg β€” DICT.org file format (.index) β€” extensions: .index
  • ABBYYLingvoDSL β€” ABBYY Lingvo DSL (dsl) β€” extensions: .dsl
  • Edlin β€” Editable Linked List of Entries β€” extensions: .edlin
  • GettextPo β€” Gettext Source (po) β€” extensions: .po
  • LingoesLDF β€” Lingoes Source (LDF) β€” extensions: .ldf
  • OctopusMdict β€” Octopus MDict β€” extensions: .mdx
  • OctopusMdictSource β€” Octopus MDict Source β€” extensions: .mtxt
  • Sdict β€” Sdictionary Binary(dct) β€” extensions: .dct
  • Stardict β€” StarDict (ifo) β€” extensions: .ifo
  • Tabfile β€” Tabfile (txt, dic) β€” extensions: .txt .tab .dic
  • WikipediaDump β€” Wikipedia Dump(Static HTML) β€” extensions: .wiki
  • Xdxf β€” XDXF β€” extensions: .xdxf .xml

πŸ¦„ Supported output formats πŸ¦„

  • AppleDict β€” AppleDict Source (xml) β€” extensions: .xml
  • BabylonSource β€” Babylon Source (gls) β€” extensions: .gls .babylon
  • Csv β€” CSV β€” extensions: .csv
  • Dicformids β€” DictionaryForMIDs β€” extensions: .mids
  • DictOrg β€” DICT.org file format (.index) β€” extensions: .index
  • Edlin β€” Editable Linked List of Entries β€” extensions: .edlin
  • Freedict β€” FreeDict (tei) β€” extensions: .tei
  • GettextPo β€” Gettext Source (po) β€” extensions: .po
  • LingoesLDF β€” Lingoes Source (LDF) β€” extensions: .ldf
  • OctopusMdictSource β€” Octopus MDict Source β€” extensions: .mtxt
  • Omnidic β€” Omnidic β€” extensions: .omni .omnidic
  • SdictSource β€” Sdictionary Source (sdct) β€” extensions: .sdct
  • Sql β€” SQL β€” extensions: .sql
  • Stardict β€” StarDict (ifo) β€” extensions: .ifo
  • Tabfile β€” Tabfile (txt, dic) β€” extensions: .txt .tab .dic
  • Treedict β€” TreeDict β€” extensions: .tree .treedict

That's the whole page bestie, go convert something and be iconic πŸ’–

And that's a wrap on PyGlossary 3.2.1, dated December 2019 β€” literally vintage, still eating πŸŽ€βœ¨πŸ¦‹