Browser-based tool for the parallel converting several aligned texts to TXT, FB2, EPUB and PDF formats.
-
Clone this repository.
-
Clone the Bilingual formats and Print Bilingual PDF repositories to the root directory of this repository.
-
Copy your aligned TXT files to the books directory. Make sure they face the specification requirements. The following scheme of naming your files is required:
<BOOK_ID>_<LANG>.txt
, where
<BOOK_ID>
is a unique identifier of your book;<LANG>
— ISO code of the language.
-
If applicable, put the PNG covers of your book to the books/covers directory. Name each cover file as
<LANG>.png
, where<LANG>
— ISO code of the first language in the language couple. Example: name the cover for the French-Czech version of your book asfr.png
-
If applicable, put your PNG illustrations to the books/illustrations directory. Name them as natural Arabic numbers starting from 1 like here.
-
Launch the web server and open index.php in your browser. Two sided working area will appear.
-
In the left side menu, the
Book ID
textarea contains the book ID of your book determined by file names. If the books folder contains texts with different IDs, feel free to specify the ID of your interest. In this case, press theUpdate
button to update the interface. -
Check the checkboxes under the
Book ID
textarea to choose in what formats books has to be saved: txt, fb2, epub, pdf-cols (with parallel columns) or pdf-rows (with alternating paragraphs). -
Under the formats checkboxes, the information on how many languages, language couples and files are presented.
-
For each language file, a green panel is presented. The message cover is there shows the existence of the cover file for a particular language in the books/covers directory. If no cover found for a language, message is no cover.
-
To save a bilingual version of your book in two languages, find the line in the right menu starting with the file name looking as
<BOOK_ID>_<LANG1>_<LANG2>
, where
<BOOK_ID>
is a unique identifier of your book;<LANG1>
— ISO code of the language 1;<LANG2>
— ISO code of the language 2.
Click the red button with the interesting format. In case of TXT, FB2, and EPUB formats, the book is saved to the books/saved directory. When saved, the corresponding button becomes green.
In case of PDF buttons, a printable window is opened according to the operation of the Print Bilingual PDF tool. The title of the window becomes the file name when printing. Save your printed PDF file to the books/saved directory and update B-Saver, red button to become green.
-
Click the
<BOOK_ID>_<LANG1>_<LANG2>
title to save and print the book in the two specified languages in all showed formats. -
Check the checkboxes of the languages in the left menu to change the contents of the right menu. Only the language couples containing one or two out of the checked languages are showed. Example: you have aligned texts in
fr
,de
andpl
languages. When onlypl
language checked out of the three, the next language couples are showed:fr-pl
,de-pl
,pl-fr
andpl-de
. -
Press the
Launch
button in one of the language panels to save all the versions of the book in all showed file formats where this is the first language. -
Press the main
Launch
button near theBook ID
textarea to save your book in all chosen language couples and all showed file formats.
Alarm! In case of many languages, file formats and big files, browser may fail.
Notice. Some browsers, such as Google Chrome, may prohibit pop-up windows that are necessary for printing PDFs. Go to settings to allow pop-ups.