home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / txt2html.zip / README < prev    next >
Text File  |  1998-09-21  |  8KB  |  206 lines

  1.    
  2.                       TXT2HTML Version 1.5
  3.                 (ASCII text ->  HTML converter)
  4.  
  5. 1. Txt2HTML.   
  6.  
  7.    Do You want 'to dress' simple ASCII text with URLs by HTML tags?
  8.    The aim of this program is to simplify the procedure of creating
  9.    of HTML document from ordinary ASCII text.
  10.  
  11.    Txt2HTML solves two different tasks: 
  12.     - converting some elements in text: special characters (<,>,",&,umlauts),
  13.       URL-like words (http://somewhere.com, www.w3.org, me@anynet.com) 
  14.       and image-name (image.gif, image.jpg).
  15.     - inserting some format tags into text: paragraphs, headers, horizontal
  16.       rules, definition lists, preformatted fragments, tables.
  17.    
  18.    There is a lot of 'txt' to 'html' converters...
  19.    Why did I write another one? My program uses ordinary text
  20.    without *any* special treatment and produces readable HTML
  21.    without *any* interference from user.
  22.  
  23. 2. Installation.
  24.  
  25.    2.1. Simplest.
  26.       Add txt2html.exe to any directory included in PATH. 
  27.       This program uses EMX runtime dlls. If you have no
  28.       EMX installed, you can download EMX-free version
  29.       from http://wgc.chem.pu.ru/personal/valera/mypub/txt2html_nonEMX.zip
  30.    
  31.       To observe the possibilities of txt2html, run 'txt2html test.txt'
  32.       and look at test.html!
  33.  
  34.    2.2. PM Front-end
  35.       You can use PM front-end for txt2html - PMtxt2html. 
  36.       Otherwize, delete PMtx2html.exe and PMtxt2html.hlp !
  37.  
  38.    2.3. Customization.
  39.       You can preview obtained file by Netscape or WebExplorer
  40.       (I suppose, these programs can be found via PATH).
  41.       Running txt2html (or PMtxt2html) with keys:
  42.       /n - for Netscape, /e - for WebExplorer, allows you to
  43.       see the result.
  44.       
  45.       If you want to change parameters of created tags,
  46.       put file txt2html.ini at the same place as txt2html.exe,
  47.       and edit it.
  48.    
  49.    2.4. For experienced users
  50.       txt2html can be used for converting files with special structure.
  51.       To use this possibility, run txt2html with keys: 
  52.        /m - for converting of the set of E-mails and
  53.        /s - for converting of list of files.
  54.  
  55.       Key /s - is only for special type of initial documents.
  56.         the rest part of a string with URL will be converted to anchor:
  57.         string:
  58.             hobbes.nmsu.edu is OS/2 site       
  59.         will be converted (without /s key) to
  60.           <a href="http://hobbes.nmsu.edu">hobbes.nmsu.edu</a> is OS/2 site
  61.         and with key /s
  62.           <a href="http://hobbes.nmsu.edu">is OS/2 site</a>
  63.     
  64.       Key /m is used for converting all files (looking like E-mails) 
  65.       in a current directory.
  66.       This mode is usefull if you subscribe to any mailing service 
  67.       and want create HTML files from received post.
  68.  
  69.       You can run txt2html on your WWW server. To do this, download
  70.       CGI script gatetxt2html from http://wgc.chem.pu.ru/personal/valera/mypub/
  71.       This script allows a user to put a text into a window in the form
  72.       and to obtain HTML reply. You may find the example of such service 
  73.       at: http://wgc.chem.pu.ru/common/gatetxt2html.html
  74.  
  75. 3. How to convert a text. 
  76.  
  77.    Usage: txt2html filename [filename.html] [/e|n] [/m] [/s]
  78.    The result will be placed to filename.html 
  79.    
  80.    Txt2HTML assumes the 'natural' markup of ASCII text: 
  81.       paragraphs are separated by empty line,
  82.       list's items start with sign '-' or digits,
  83.       headers are short and separated from other text,
  84.       'preformatted' text contains a lot of spaces and tabs.
  85.    So, usually you don't need make something special with your 
  86.    ASCII text.
  87.  
  88.    Txt2html tries to recognize URL-like words, so URL in a phrase 
  89.    "look at www.w3.org." will be dressed by anchor (note,
  90.    without extra "."), but "www. " will not. So, you can include
  91.    a reference to an URL or an image by typing in the text
  92.    something like this: 
  93.    Look at images/cool.jpg and mail to Mickey@disney.inc.com!
  94.    
  95.    You can automatically start Netscape or WebExplorer to preview 
  96.    created file by adding key /n or /e.
  97.  
  98.    Of course, after txt2html you'll get a ROUGH HTML text. Use any kind
  99.    of editor to improve it!
  100.  
  101. 4. What txt2html really does ? :) 
  102.    (I try to summarize features of txt2html in an example,
  103.    look at test.txt, so you may run 'txt2html test.txt'
  104.    and look at test.html!)
  105.  
  106.    otherwise read text below:
  107.  
  108.  So, txt2html:
  109.  - analyzes input file to separate strings by categories:
  110.           -empty string
  111.           -line string with -_=*+ signs
  112.           -string with tabs or big spaces
  113.           -string starting with -[ chars
  114.           -string starting with number
  115.           -short string
  116.  - this information using bugs-full algorithm converts
  117.    to some format information:
  118.           -skiping extra empty lines
  119.           -organizing definition lists
  120.           -preformatting of some texts with holes
  121.           -strings with columns
  122.           -heading
  123.  - txt2html writes HTML header. First string (or it's beginning)
  124.    is considered as a title. Some simple META information is
  125.    included. 
  126.  - special characters <>"& is substituted according to HTML 
  127.    notation
  128.  - if 850 code page is active, special characters are converted
  129.    to &xxx;
  130.  - some formatting tags (see above) are included into output.
  131.  - some URL-like words are substituted by anchors:
  132.    "http:","ftp:","mailto:","telnet:","gopher:",
  133.    "@","www.","archie.",".mil","ftp.",".net",".gov", 
  134.    ".org",".com",".edu",".htm",".html",".shtml".
  135.    So phrase "visit ftp.sunet.se, hobbes.nmsu.edu or
  136.    look at mirror.html." will be converted to:
  137.    "visit <A HREF="ftp://ftp.sunet.se">ftp.sunet.se</A>,
  138.    <A HREF="http://hobbes.nmsu.edu">hobbes.nmsu.edu</A> or
  139.    look at <A HREF="mirror.html">mirror.html</A>."
  140.    Characters (space,!;()<?\n\t and ending .) are considered 
  141.    as separators between words.
  142.  - image-like words (with .jpg, .gif) covered by IMG
  143.    tags. If real files are exist WIDTH and HEIGHT attributes
  144.    are added automatically.
  145.  
  146. 5. LICENSE AGREEMENT.
  147.    Txt2HTML is provided without ANY kind of warranty, and you can use it 
  148.    without any limitation at your own risk. 
  149.    You may NOT use this software as a part of a commercial
  150.    product, also if you work in military or defense organization
  151.    or live in a communist oriented country such as Cuba, North Korea, 
  152.    Yugoslavia, Belorussia, Libia etc. Guys, you have more important 
  153.    dial before using my favourite software!
  154.    If you disagree with this policy, destroy txt2html.exe now. 
  155.    Txt2HTML is freeware. 
  156.  
  157. 6. History
  158.  
  159.   1.5 (19.09.98)
  160.    *
  161.    * PM front end. 
  162.    * improved structure of HTML file 
  163.    * Tables! (converted from preformatted text with columns)
  164.    * customization of tag parameters
  165.    * different work with <ul> and <dl>
  166.    * HR width and size
  167.    * META Keywords
  168.    * work also with FAT disks
  169.  
  170.  
  171.   1.4 (10.07.98)
  172.    * 
  173.    * 850 code page support. if 850 codepage is active one you can
  174.      convert paneuropean characters.
  175.    * automatically run Netscape or WebExplorer for preview.
  176.    * mail mode (create HTML's from a group of E-mail files)
  177.    * some bugs in URL determination have fixed
  178.    * second parameter is considered as output_file_name
  179.  
  180.   1.3 (09.02.98)
  181.    * 
  182.    * some small bugs were corrected
  183.    * new key /s - smart mode for anchors: use the rest of line as anchor.
  184.    * gate mode: you can install txt2html with CGI gate.
  185.  
  186.   1.2 (25.12.97)
  187.    *
  188.    * new algorithm for format recognizing
  189.    * image tags with attributes
  190.  
  191.   1.1 (01.10.97)
  192.    *
  193.    * definition lists
  194.    * more accurate work with URLs
  195.  
  196.   1.0 (01.07.1997)
  197.    *
  198.    * first release
  199.   
  200. 7. Author.
  201.  
  202.    New version of the program you may find at 
  203.                   http://wgc.chem.pu.ru/personal/valera/mypub/
  204.    Any comments, bugs, suggestions  send to Valera Veryazov :  
  205.                   valera@wgc.chem.pu.ru 
  206.