ΓòÉΓòÉΓòÉ 1. About txt2html ΓòÉΓòÉΓòÉ
Welcome to txt2html !
txt2html is a simplest tool to generate HTML from plain ASCII file!
txt2html solves different tasks:
- creating standard HTML head
- converting special characters (<,>,",&,umlauts),
- converting some HTML elements in text:
URL-like words (http://somewhere.com, www.w3.org, me@anynet.com)
image-name (image.gif, image.jpg).
- inserting some format tags into text:
paragraphs, headers, horizontal rules, definition lists, preformatted
fragments, tables.
There is a lot of 'txt' to 'html' converters...
Why did I write another one? My program uses ordinary text without *any*
special treatment and produces readable HTML without *any* interference from
user.
Version 1.5 comes with PM shell for txt2html.exe, hovewer, some features are
missed in PM version.
txt2html is FREWARE. So, you may use it at own risk.
ΓòÉΓòÉΓòÉ 1.1. PM txt2html ΓòÉΓòÉΓòÉ
txt2html was developed for the fast and *lazy* convertion of any plan_text
files to HTMLs.
PM front-end for txt2html - PMtxt2html.exe is a simple shell only. PMtxt2html
runs txt2html.exe (and viewers for HTML files) as a separate process.
After running PMtxt2html press 'Run' button, and choose a text file. If you
want to view the result, select one viewer from : editor, Netscape or
WebExplorer.
If you want to customise your choice of viewer, open 'properties' of
PMtxt2html.exe, and place into parameter field
/d - for editor (e)
/n - for Netscape
/e - for WebExplorer
ΓòÉΓòÉΓòÉ 2. Features ΓòÉΓòÉΓòÉ
Txt2HTML assumes the 'natural' markup of ASCII text
Γûá paragraphs are separated by empty line,
Γûá list's items start with sign '-' or digits,
Γûá headers are short and separated from other text,
Γûá preformatted text contains a lot of spaces and tabs.
Γûá a table contains columns
So, usually you don't need make something special with your ASCII text.
Txt2html tries to recognize URL-like words, so URL in a phrase "look at
www.w3.org." will be dressed by anchor (note, without extra "."), but "www. "
will not. So, you can include a reference to an URL or an image by typing in
the text something like this:
Look at images/cool.jpg and mail to Mickey@disney.inc.com!
The good idea to understand the possibilities of txt2html is look at test.txt
file with a lot of examples.
ΓòÉΓòÉΓòÉ 3. Text elements ΓòÉΓòÉΓòÉ
Text elements:
Look at text elements, recognized by txt2html :
HTML Header
Special characters
Format URL
Format text
ΓòÉΓòÉΓòÉ 3.1. Header ΓòÉΓòÉΓòÉ
Text elements:Header
txt2html organized HTML header with elements :
,
<meta name=Version
<meta name=Language (English | Russian | Unknown)
<meta name=Date-Created
<meta name=Keywords
charset (for Russian texts)
See also Special characters , Format URL , Format text
ΓòÉΓòÉΓòÉ 3.2. Help Special ΓòÉΓòÉΓòÉ
Text elements:Special Characters
txt2html converts special characters <,>,",& Codepages 850, 437, 866 are
recognized by txt2html to convert non-ASCII symbols, for example umlauts.
See also HTML Header , Format URL , Format text
ΓòÉΓòÉΓòÉ 3.3. URL ΓòÉΓòÉΓòÉ
Text elements:URLs, images
Some URL-like and Picture_files words converted to Anchor and IMG tags.
"http:", "ftp:", "mailto:", "telnet:", "gopher:", "@","www.", "archie.",
".mil", "ftp.", ".net", ".gov", ".org", ".com", ".edu", ".htm", ".html",
".shtml".
So phrase
visit ftp.sunet.se, hobbes.nmsu.edu or look at mirror.html.
will be converted to:
visit <A HREF="ftp://ftp.sunet.se">ftp.sunet.se</A>, <A HREF="http://hobbes.nmsu.edu">hobbes.nmsu.edu</A>
or look at <A HREF="mirror.html">mirror.html</A>.
image-like words (with .jpg, .gif) covered by IMG tags. If real files are exist
WIDTH and HEIGHT attributes are added automatically.
See also HTML Header , Special characters , Format text
ΓòÉΓòÉΓòÉ 3.4. text format ΓòÉΓòÉΓòÉ
Text elements:Text Format
txt2html analyzes input file to separate strings by categories:
Γûá empty string
Γûá line string with -_=*+ signs
Γûá string with tabs or big spaces
Γûá strings with columns
Γûá string starting with -[ chars
Γûá string starting with number
Γûá short string
this information using *bugs-full* algorithm converts to
some format information:
Γûá new paragraph
Γûá heading
Γûá horisontal rules
Γûá definition lists
Γûá preformatted text
Γûá tables
See also HTML Header Special characters , Format URL
ΓòÉΓòÉΓòÉ 4. More options ΓòÉΓòÉΓòÉ
Some special features of txt2html
- running as CGI script,
- converting incoming E-mails to HTMLs,
- special modes for URL lists
are available in nonPM version.
Look at documentation.
ΓòÉΓòÉΓòÉ 5. History ΓòÉΓòÉΓòÉ
History
1.5 (19.09.98)
*
* PM shell
* improved structure of HTML file
* HR width and size
* Tables! (converted from preformatted text with columns)
* customization of tag parameters
* META Keywords
1.4 (10.07.98)
*
* 850 code page support. if 850 codepage is active one you can
convert paneuropean characters.
* automatically run Netscape or WebExplorer for preview.
* mail mode (create HTML's from a group of E-mail files)
* some bugs in URL determination have fixed
* second parameter is considered as output_file_name
1.3 (09.02.98)
*
* some small bugs were corrected
* new key /s - smart mode for anchors: use the rest of line as anchor.
* gate mode: you can install txt2html with CGI gate.
1.2 (25.12.97)
*
* new algorithm for format recognizing
* image tags with attributes
1.1 (01.10.97)
*
* definition lists
* more accurate work with URLs
1.0 (01.07.1997)
*
* first release
ΓòÉΓòÉΓòÉ 6. Support ΓòÉΓòÉΓòÉ
Help and support is available at valera@wgc.chem.pu.ru
Visit my homepage http://wgc.chem.pu.ru/personal/valera/mypub with FREEWARE
OS/2 software.
Any comments and ideas are welcome.
ΓòÉΓòÉΓòÉ <hidden> No input file ΓòÉΓòÉΓòÉ
File is lost? Let's seek together!
ΓòÉΓòÉΓòÉ <hidden> help for done ΓòÉΓòÉΓòÉ
txt2html has finished convertion.
Open file your_input_file_name.html and continue editing of created HTML file.