- Notifications
You must be signed in to change notification settings - Fork1
Browser-based tool for aligning two texts in different languages.
License
bilinguator/b-editor
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
B-Editor is the browser based tool for alignment texts in two different languages.
Developed byBilinguator.com.
| Contents |
|---|
| Getting started |
| Input texts requirements |
| Loading files |
| Manipulation of paragraphs |
| Editing paragraphs contents |
| Adding illustrations |
| Saving files |
| Keyboard shortcuts |
| Precautions |
TheB-Editor aligner has been developed and tested in Google Chrome, Yandex Browser, Edge, FireFox browsers. No third-party libraries or frameworks were used during development, exceptJQuery 3.6.0. Our stack consists of HTML, CSS, JavaScript, PHP. We used XAMPP with PHP version 7.4.29 for development.
Put the repository contents to your web server and openindex.php file in browser.
Texts must meet the requirements of thespecification.
The following scheme of naming your files is highly recommended:
<BOOK_ID>_<LANG>.txt, where
<BOOK_ID>is a unique identifier of your book;<LANG>- ISO code of the language. This part of the file name determines the size and direction of the texts (left-to-right or right-to-left).
Put your files to be aligned in thebooks directory. Launch B-Editor, choose two files in the header and press theLaunch button (“Play” button-like triangle
) in the top right corner. Then, the paragraphs of the two chosen texts are uploaded.
Each paragraph has the plus button (
) on its side. Clicking it, you can add a new empty paragraph to the current place. Current paragraph and all below will be shifted down.
To delete a paragraph, click the diagonal cross (
) on its side. All the paragraphs below will be shifted up.
Each paragraph is marked with an index. When clicking an index of a left paragraph, it appears in the upper textarea of toolbar; click a right paragraph’s index, it to appear in the lower textarea (
). It is also possible to change the textareas’ values manually. These indexes are useful in the following manipulations.
The bookmark is one index corresponding to a paragraphs couple. To set a bookmark, click to the index of the left paragraph of the current couple or type it to the upper textarea in the toolbar. Click the Bookmark button (
) to set the bookmark. The bookmark index is saved to thebooks/bookmarks folder named asbookmark_<BOOK_ID>_<LANG1>_<LANG2>.<BOOK1_EXTENSION>. While the file exists, the bookmark is set all the time of using B-Editor, and it is displayed on the right side of the toolbar asbookmark/total paragraphs count ratio (
).
Click thebookmark part of thebookmark/total paragraphs count ratio to move to the bookmarked paragraph.
To move to any other paragraph, type the index of the paragraph in the upper textarea and click theTo current position button (
). Look at the progress bar to orient (
).
To shift two paragraphs of different sides to make them adjacent, choose them and click theShift button (
).
To delete several paragraphs on both sides, enter the ‘from’ and ‘to’ indexes to the textareas. Click theDelete button (
). Paragraph couples starting from the minimal entered index to the maximal index will be deleted. All the paragraphs below will be shifted up.
To divide a paragraph into two, click the position in its content wherein the paragraph must be divided. Press theDivide paragraph button (
).
To divide a paragraph into several paragraphs, add newline symbols, wherein the paragraph must be divided. Press theDivide paragraph by newline button (
).
To concatenate two following paragraphs of one side, click on the first of it in any place. Press theConcatenate paragraphs button (
). The two paragraphs will be merged via empty string. To concatenate two paragraphs via space character or<delimiter> pressConcatenate paragraphs via space (
) orConcatenate paragraphs via delimiter (
) button respectively.
Select text in a paragraph. PressTitle (
),Bold (
) orItalic (
) button to tag the selected text with<h1></h1>,<b></b> or<i></i> respectively.
Click on the position in a paragraph. Press theAdd delimiter button (
).
Select a text and press theSwitch case (
) to change the case from upper to lower and vice versa.
Put your PNG illustrations to thebooks/illustrations folder. Name them as natural arabiс numbers starting from 1 likehere.
To add a new illustration to the book, create a new empty paragraph, click on it and pressAdd illustration button (
). The<imgℕ> tag will be inserted, where ℕ is the natural Arabic number. The<img1> corresponds to thebooks/illustrations/1.png file.
To save two separate source files aligned, click theSave source files button (
) or pressCtrl+S keys.
Clone the git repository ofBilingual formats to the root directory of B-Editor. After the next launch of B-Editor, new buttons will appear:
| Button | Action |
|---|---|
![]() | Save TXT |
![]() | Save FB2 |
![]() | Save EPUB |
All the books are saved to thebooks/saved folder.
Clone the git repository ofPrint Bilingual PDF to the root directory of B-Editor. After the next launch of B-Editor, new buttons will appear:
| Button | Action |
|---|---|
![]() | Print columns PDF |
![]() | Print rows PDF |
If bothBilingual formats andPrint Bilingual PDF are in the B-Editor root directory, theSave in all formats button (
) appears. Press it to save your bilingual book in TXT, FB2, EPUB formats and print the PDF in columns and rows.
B-Editor does not suit for working with big texts. When working with texts with more than a thousand paragraphs, the waiting time for some operations can be quite long.
About
Browser-based tool for aligning two texts in different languages.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.






