home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / txtutl / travesty.arc / README.TRV next >
Text File  |  1988-11-17  |  2KB  |  48 lines

  1.                                TRAV
  2.  
  3.   This archive contains the Turbo C 2.0 source and the executable for
  4. TRAV, an implementation of the travesty algorithm which originated
  5. with the ancient Arab scholars and was responsible for many of the
  6. world's more interesting pieces of literature.  TRAV is a productivity
  7. tool useful for enhancing any form of text, embellishing and extending
  8. it into a form guaranteed to have a greater impact.  Actually, I think a
  9. friend first read about it in a computer magazine (BYTE?).
  10.  
  11. What does it do?  Read on, or examine the file ROCKY.
  12.  
  13. USAGE : TRAV <order>    where <order> is an integer from 2-16.
  14.  
  15. TRAV reads the standard input (max filesize = 32Kbytes) and then starts
  16. its magic.  It statistically reorganizes the input into an infinite
  17. and entertaining (at least for a while) form.
  18.  
  19. A travesty has an "order" associated with it.  The order is a positive integer
  20. which roughly describes the violence of the transformation.  The lower the
  21. order, the more disturbing the output will be to read.  You pass the order
  22. to TRAV on the command line.
  23.  
  24. The algorithm works like this:
  25.  
  26. The first <order> characters of the input are immediately output.  Then,
  27. an infinite loop starts, each loop generating a single character of output.
  28. For each of these loops, the program examines the last <order> characters
  29. of the output.  It then scans the entire input file for occurences of this
  30. string.  Each time it finds one, it looks to see what character follows it.
  31. Each of these characters is thrown into a set.  After all the eligible
  32. succeeding characters are collected in this fashion, one is selected from
  33. the set at random.  The infinite loops repeats.
  34.  
  35. TRAV tries to format its own lines, inserting newlines into the output
  36. whenever it seems right.  Line format of the input file is ignored
  37. (newlines are converted into spaces).
  38.  
  39. If TRAV ever gets to a point where there are NO eligible successors, it hops
  40. back to the very top of the input table and restarts the whole spiel.
  41.  
  42. enjoy!
  43.  
  44. Anthony M. Lovell
  45. 270 Highland Avenue #23
  46. Somerville, MA 02143.  (617) 623-5870
  47. email: amlovell@phoenix.princeton.edu
  48.