- Goal
-
Create standard-format files from the contents of the Pandunia vocabulary, in order to make it easier to read, consult and study.
- Author
-
Marcos Cruz (programandala.net), 2019
- Website
Format | Filename extension |
---|---|
Asciidoctor |
adoc |
DICT protocol dictionary database |
dict.dz, index |
DocBook |
xml |
EPUB |
epub |
HTML |
html |
OpenDocument |
odt |
Portable Document Format |
|
Rich Text Format |
rtf |
Text |
txt |
More formats may be added in the future.
First make sure the following programs are installed in your system:
-
asciidoctor (not needed for DICT)
-
asciidoctor-pdf (needed only for PDF)
-
awk
-
dictfmt (needed only for DICT)
-
make
-
pandoc (not needed for Asciidoctor, DICT, DocBook or PDF)
Then enter the project directory and give the proper command:
Command | Effect |
---|---|
|
Make all formats |
|
Make all formats |
|
Make only Asciidoctor |
|
Make only DICT database |
|
Make only EPUB |
|
Make only ODT |
|
Make only RTF |
|
Make only plain text |
|
Make only DocBook |
|
Install the DICT databases |
|
Uninstall the DICT databases |
In order to facilitate to make more target formats and use alternative conversion tools, the filenames of the target documents keep the filename extension of the format they were converted from, and also the name of the third-party converter, in a hierarchical way. Examples:
This is the Asciidoctor source file, made from the original data:
pandunia_da_leksobuke.adoc
These files are created directly from and by Asciidoctor:
pandunia_da_leksobuke.adoc.html pandunia_da_leksobuke.adoc.pdf pandunia_da_leksobuke.adoc.xml
These files are created from DocBook by pandoc:
pandunia_da_leksobuke.adoc.xml.pandoc.epub pandunia_da_leksobuke.adoc.xml.pandoc.html pandunia_da_leksobuke.adoc.xml.pandoc.odt pandunia_da_leksobuke.adoc.xml.pandoc.rtf pandunia_da_leksobuke.adoc.xml.pandoc.txt
This file is from DocBook by dbtoepub:
pandunia_da_leksobuke.adoc.xml.dbtoepub.epub
As you see, this naming convention allows all variants coexist without filename clash.
Of course, you are free to rename your files of choice, e.g. rename <pandunia_da_leksobuke.adoc.xml.pandoc.epub> <pandunia_da_leksobuke.epub>.
After making (make dict
) and installing (sudo make install
) the
dict-format dictionary, you can use dict as usual. Examples:
-
List the names and descriptions of all available dictionaries with
dict -D
. -
Consult a Pandunia word with
dict -d pandunia WORD
for the generial dictionary,dict -d eng-pandunia WORB
for the English-Pandunia vocabulary, etc. -
Request information on the dictionary with
dict -i DICTIONARYNAME
.
Read the dict’s documentation for more details and search options.
A simple shell wrapper is provided in <src/pandunia.sh>. You can copy
that file to a location in your path, e.g. as <~/bin/pandunia>,
<~/.local/bin/pandunia> or </usr/local/bin/pandunia>. Then the
command pandunia
will search all installed dictonaries that have the
word "pandunia" (case insensitive) in their description.