Español Català English Esperanto
dislines separates in several files the -tagged- lines of a text document. This is specially useful for translations.
For example, we have index.txt:
abcde @en This is a test @es Esto es una prueba fghijk
Once processed, these two files are generated:
index.en.txt:
abcdef This is a test fghijk
index.es.txt:
abcdef Esto es una prueba fghijk
Furthermore, it works with any number of files, it allows tagging of whole blocks, you can use comments, and more.
Check the specification of the used syntax, or a quick guide.
It's very useful to translate text documents.
The traditional method (using a different file for each language) is rather laborious, especially when you need to do some change: just to add something to a phrase, you need to locate it in each file, and modify all of them at the same time. With dislines you can have all the translations of that phrase together, in the same file (example, produces 'en' and 'es').
If you wanted to translate web pages, I recommend you not to edit the HTML directly. Instead, you can write the content with an intermediate tag language, like txt2tags, and apply the design via CSS. Example.
It can also serve to do a reduced version of a document, for instance: pi.txt
It's a Perl script, and it's GPL.
Version 1.6: dislines.pl
The source code, colorized, is here. There's also a log of the changes, and I still keep the old versions.
About version 1.6:
You need the Perl interpreter. On Linux and MacOS X it's already installed;
but on Windows, I think that you have to install
ActivePerl
(MSI package). After doing this, executing perl -v
at the command line (cmd
)
should show some information about the version.
Then, double click the program (dislines.pl
) and a simple window will appear, where you have
to select the file you want to process, and then click the button "PROCESS".
For each tag, a file like name.TAG.ext
will be created in the same directory.
Other options can be used, check the button Advanced options
or perl dislines.pl -h
:
to list the used tags, add -l
,
to process just tag1 and tag2, add -t tag1,tag2
,
and to show some little statistics, add -s
.
dislines is free software; under license GNU GPL.
July 2005 (updated on 01-01-2017).
Daniel Clemente Laboreo. n148257 -a-t--g-m-a-i-l.com