home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 036 / fold341.zip / TUNF.DOC < prev    next >
Text File  |  1994-08-27  |  8KB  |  236 lines

  1.  
  2.                                Text UNFormatter
  3.                                  version 0.12
  4.  
  5.                                 User's Manual
  6.  
  7.                           (C) Konrad Budych 1993-94
  8.  
  9.  
  10.         Text UNFormatter is a utility which removes page breaks, headers, and
  11. footers from formatted ASCII texts to make it easier to print them with
  12. FOLD-and-PRINT.
  13.  
  14.         To install TUNF please copy TUNF.EXE to a directory listed in your
  15. PATH and that is all you need to do to start working with the program.
  16.  
  17.  
  18.  
  19.  
  20. WHAT DOES Text UNFormatter EXACTLY DO?
  21. ======================================
  22.  
  23.         Many ASCII documents are formatted.  They are divided into pages with
  24. headers at the top and footers at the bottom of the page.  They are supposed
  25. to look nice if you print them with a simple COPY or PRINT command.  But they
  26. surely do not look nice when you print them with FOLD-and-PRINT when pages
  27. contain a lot of more text than the original pages and original pages may
  28. begin and end in every place on the real sheet.
  29.  
  30.         Until now when you wanted to print a formatted document with
  31. FOLD-and-PRINT you had to unformat it manually if you wanted it to have a
  32. decent layout.  Until now, <<fanfares>> because now you can use TUNF, The Text
  33. UNFormatter <<fanfares fade>>.
  34.  
  35.         TUNF reads a text, finds a couple of page breaks, determines what is a
  36. header/footer (and can be removed) and what is not (and should not be
  37. removed).  Then it removes from the entire text what it decided that can be
  38. removed.  That is all.
  39.  
  40.  
  41.  
  42.  
  43. USING Text UNFormatter
  44. ======================
  45.  
  46.         Please look at some examples first, the complete syntax and options
  47. description will be described later.
  48.  
  49.         Assume you have a file TEXT.TXT which is an ASCII text, formatted into
  50. pages, with headers and footers.  And pages are separated with ASCII form feed
  51. character (FF ASCII 12).  The latter is very important: TUNF will not be able
  52. to find page breaks if there are no FF characters in the text.  If you run:
  53.  
  54.                 TUNF TEXT.TXT
  55.  
  56. you will receive (if everything was okay) on your disk the following files:
  57.  
  58.   TEXT.TXT      - unformatted version of the text
  59.   TEXT.BAK      - original, unchanged, renamed TEXT.TXT
  60.   REMOVED.TXT   - the file containing lines that were removed from the text
  61.  
  62. (Note: you should not run TUNF on the file that has .BAK extension!)
  63.  
  64.         TUNF has found some page breaks, looked at some lines below and above,
  65. decided what can be removed, and done it.  Please always look at the
  66. REMOVED.TXT file to find out whether TUNF decision was correct and it did not
  67. removed too much and at the new TEXT.TXT and find the place where page ended
  68. before to find out whether TUNF decision was correct and it did not removed
  69. too little.
  70.  
  71.         If TUNF decision is wrong you may force your choice:
  72.  
  73.                 TUNF -a1 -b2 -p- TEXT.TXT
  74.  
  75. This causes TUNF to remove one line (a)bove the page break, two lines (b)elow
  76. the page break, and to leave the line containing the page break.
  77.  
  78.         TUNF can make the wrong decision because often a few first page breaks
  79. in a document have a different structure than the all others.  TUNF may ignore
  80. the couple of first page breaks and start reading and analysing them later:
  81.  
  82.                 TUNF -s5 TEXT.TXT
  83.  
  84. This will tell TUNF to ignore the first 5 page breaks it finds, and start
  85. collecting page breaks for analysis starting from the 6th one.
  86.  
  87.         But this may cause that too many or too few lines is deleted somewhere
  88. in the text.  The only way to unformat such a text is a manual line deleting 
  89. or... TUNF and DOS!
  90.  
  91.                 TUNF -m TEXT.TXT
  92.  
  93. This will create a file TEXT.TXT with the lines to be removed marked with
  94. '@X@:' (no quotes) at the beginning of a line.  You may then edit such a file,
  95. add or remove these 'signatures'.  After you modify the file, use one of these
  96. commands:
  97.  
  98.                 FIND /V "@X@:" TEXT.TXT > TEXT.$$$
  99.                 DEL TEXT.TXT
  100.                 REN TEXT.$$$ TEXT.TXT
  101.  
  102. to remove marked lines from the text, or
  103.  
  104.                 FIND "@X@:" TEXT.TXT > REMOVED.TXT
  105.  
  106. to create a file containing the lines that will be deleted by the previous
  107. commands.
  108.  
  109.  
  110.  
  111.  
  112. COMPLETE SYNTAX AND OPTIONS DESCRIPTION
  113. =======================================
  114.  
  115.         You may run 'TUNF -?' to see the help screen.
  116.  
  117.         The full syntax is as follows:
  118.  
  119.                 TUNF [options] filename [options]
  120.  
  121.         Options may be preceded by either '-' or '/'.  Options must be
  122. separated: something like '/r/a5' is legal but treated as '/r', you should use
  123. '/r /a5'.
  124.  
  125.         Options are turned on when they are
  126. followed by a '+' or nothing (eg.  '-r+ -z') and turned off when followed by a
  127. '-' (eg.  '-z-').
  128.  
  129.         The content of environmental variable TUNF is always scanned before
  130. any command line arguments, so you may turn on some options using this
  131. variable.
  132.  
  133.         Filename is any legal DOS filename with optional drive and path.
  134. Wildcards ('*' and '?') are not allowed and only one file name can be given.
  135. Error occurs otherwise.
  136.  
  137.         Here is the full list of options that are available in Text
  138. UNFormatter version 0.12:
  139.  
  140.   -a<nnn>: remove nnn lines above the page break
  141.   -b<nnn>: remove nnn lines below the page break
  142.   -s<nnn>: ignore nnn first page breaks (default: 3)
  143.   -f<nnn>: remove nnn first lines of text (default: 0)
  144.   -p : remove line with FF (default)
  145.   -m : mark (don't delete) lines to delete
  146.   -z : only analyse input text
  147.   -r : don't create 'removed.txt' file
  148.   -d : delete original text (don't leave .BAK file)
  149.  
  150.         And here is the detailed description of all options:
  151.  
  152.   -annn
  153.  
  154.         This sets the number of lines that should be deleted ABOVE the line
  155. with page break.  The analysis result is ignored if this option is used.
  156. A single '-a' is equivalent to '-a0'.
  157.  
  158.   -bnnn
  159.  
  160.         This sets the number of lines that should be deleted BELOW the line
  161. with page break.  The analysis result is ignored if this option is used.
  162. A single '-b' is equivalent to '-b0'.
  163.  
  164.   -snnn
  165.  
  166.         This will cause TUNF to ignore the nnn first page breaks found in an
  167. input file.  The default value is 3.
  168.  
  169.   -fnnn
  170.  
  171.         This sets the number of lines that should be deleted from the
  172. beginning of an input file.  This is useful if the file contains a header you
  173. want to remove or a lot of empty lines.
  174.  
  175.   -p
  176.  
  177.         This insures that the lines containing page break will be removed.
  178. The analysis results is ignored if this option is used.  Use '-p-' to
  179. ensure that these lines will not be removed.
  180.  
  181.   -m
  182.  
  183.         If this option is active, the lines to be deleted are not deleted from
  184. the input file.  Instead, they are marked with '@X@:' (without quotes) at the
  185. beginning of each such line.  You may then manually (un)mark lines of your
  186. choice and use some tool like DOS FIND command to remove marked lines.
  187.  
  188.   -z
  189.  
  190.         If this option is active, TUNF will only analyse an input file but
  191. will not affect it in any way. Analysis results are displayed on screen.
  192.  
  193.   -r
  194.  
  195.         This prevents creation of 'removed.txt' file.  Use it when you are
  196. sure what you are doing...
  197.  
  198.   -d
  199.  
  200.         This prevents creation of the backup (xxxx.BAK) of the original input
  201. file.  Use it when you are sure what you are doing...
  202.  
  203.  
  204.  
  205.  
  206. REVISION HISTORY
  207. ================
  208.  
  209.  
  210.  
  211. 0.10:   first version ever
  212. 0.11:   first version released
  213. 0.12:   minor changes
  214.  
  215.  
  216.  
  217.  
  218. FINAL NOTES
  219. ===========
  220.  
  221.         This program is experimental.  It is assumed to HELP to unformat a
  222. text before you print it with FOLD-and-PRINT and not to DO it without any help
  223. and mistakes sometimes.
  224.  
  225.         This program is a part of FOLD-and-PRINT package.  For some legal
  226. issues, acknowledgements, or how to contact author, please see FOLDADD.DOC
  227. file (addendum to FOLD-and-PRINT manual).  Any suggestions, bug reports,
  228. opinions, and your support is welcome.
  229.  
  230.  
  231.  
  232.                              End of User's Manual
  233.                              ********************
  234.  
  235.  
  236.