Skip to content

ne-alinome/pandunia-da-leksobuke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pandunia da leksobuke

About this project

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

http://ne.alinome.net

Target formats

Format Filename extension

Asciidoctor

adoc

DICT protocol dictionary database

dict.dz, index

DocBook

xml

EPUB

epub

HTML

html

OpenDocument

odt

Portable Document Format

pdf

Rich Text Format

rtf

Text

txt

More formats may be added in the future.

How to make the target files

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

Make all formats

make all

Make all formats

make adoc

Make only Asciidoctor

make dict

Make only DICT database

make epub

Make only EPUB

make odt

Make only ODT

make rtf

Make only RTF

make txt

Make only plain text

make xml

Make only DocBook

sudo make install

Install the DICT databases

sudo make uninstall

Uninstall the DICT databases

About the filenames of the target documents

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>.

How to use the DICT format

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.

Wrapper command

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.

Known issues

EPUB

The template and stylesheet are not customized yet.

Rich Text Format

The headings are not marked with proper hierarchical styles. Therefore, building an automatic table of contents with a wordprocessor is not possible.

Anyway, this format is included only because it can be read by old wordprocessors.