home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / bit / listserv / cwisl / 1153 < prev    next >
Encoding:
Text File  |  1992-11-19  |  5.8 KB  |  150 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!NWU.EDU!ALBERT-LUNDE
  3. X-Sender: lunde@casbah.acns.nwu.edu
  4. Message-ID: <9211192141.AA01063@casbah.acns.nwu.edu>
  5. Newsgroups: bit.listserv.cwis-l
  6. Date:         Thu, 19 Nov 1992 15:41:51 -0600
  7. Sender:       "Campus-Wide Information Systems" <CWIS-L@WUVMD.BITNET>
  8. From:         Albert Lunde <Albert-Lunde@NWU.EDU>
  9. Subject:      SUMMARY - Tools to clean-up text
  10. Comments: To: CWIS-L LISTSERV <CWIS-L@WUVMD.Wustl.Edu>,
  11.           gopher-news@boombox.micro.umn.edu
  12. Lines: 136
  13.  
  14. I sent out the question below
  15.  
  16. >  To: CWIS-L and comp.infosystems.gopher
  17. >
  18. >I am writing to ask about the availablity of tools for cleaning up text for
  19. >posting to gopher or other CWIS servers.  I'm especially interested in the
  20. >process of converting word-processed text from Macs or PCs to a least
  21. >common-denominator that will work on micro gopher clients and timesharing
  22. >terminals.
  23.  
  24. Here is a summary of replies:
  25.  
  26. ** Several people suggested saving text in a mono-spaced font. The best
  27. collection of directions for this was pointed to by Steve Watkins
  28. (watkins%SCILIBX.UCSC.EDU@WUVMD.Wustl.Edu).
  29.  
  30. These are on the University of Oregon Gopher under the headings:
  31.  
  32.  DuckScoop -- U of O campus Information
  33.     Becoming a DuckScoop Provider
  34.        B. Create-Convert Guidelines
  35.  
  36. (These are adapted from a document created by Computing and Network
  37. Services at the University of Alberta.)
  38.  
  39.  
  40. ** Doug Anderson (danderson@frmnvax1.bitnet) suggests:
  41.  
  42. >There is a shareware tool for PCs called TEXTCON that will do some of
  43. >what you are interested in.  As I understand it, it was developed to
  44. >deal with the problems of transferring documents from one type of
  45. >system to another, especially from dedicated word processors like
  46. >Wang and NBI to PCs.
  47. >
  48. >It will deal with the newline problem and will expand tabs to spaces.
  49. >It can also deal with the use of CR without LF that is sometimes used
  50. >to produce bold, underline, etc.  It is a pretty smart program and
  51. >allows a great deal of control through the use of command line arguments.
  52.  
  53. I couldn't find an Internet source for this, but I found it on Compuserve,
  54. in the "IBMAPP" forum in the Library section "Word Processing (A)" as
  55. TEXTCN.ZIP.
  56.  
  57. The shareware payment is $25 to:
  58.           CrossCourt Systems
  59.           1521 Greenview Ave.
  60.           East Lansing, MI  48823
  61. (They take phone orders at (517) 332-4353 with Mastercard or Visa.)
  62.  
  63. I haven't tested it but I looks like it could be useful.
  64.  
  65. ** Jon P. Knight (jon@hill.lut.ac.uk) suggests:
  66.  
  67. >* Change spaces to tabs using expand(1) on a UNIX machine (its pretty
  68. >common; its on SunOS and HP-UX at least and is probably available in the
  69. >BSD Net2 release if your machine hasn't got it).
  70.  
  71. >* Consider using TeX as an intermediate form - there are many
  72. >wordprocessor to TeX conversion utilities and then the dvi2tty display
  73. >programs which create plaintext, nicely formatted files.  This also gets
  74. >rid of the wordwrapping problem as TeX makes its own, usually pretty
  75. >sane, decisions about where lines should break.  Check out some of the
  76. >papers on hill.lut.ac.uk CFD gopher on port 5000; some of these are
  77. >ASCII-fied Mac WORD files and others are LaTeX files converted directly
  78. >to text.
  79.  
  80. ** JQ Johnson  (jqj@ns.uoregon.edu) offered this Unix shell script:
  81.  
  82. - - -
  83. #!/bin/sh
  84. # this program attempts to correct some of the common problems in text
  85. # files submitted to gopher
  86. # Usage:
  87. #       $0 [ -c ] file [ ... file ]
  88. # or
  89. #       $0 < file > newfile
  90. # Problems addressed:
  91. # Mac files:    cr instead of lf, long lines, stray mac characters, tabs
  92. # PC files:     ^Z at end, long lines (n.b.: CRLF => LFLF)
  93. # (note: still need to handle files that don't end with LF or CR)
  94. case $# in
  95. 0 )
  96.     # filter mode -- incompatible with compare mode
  97.     tr '\015\032' '\012\012' | expand |
  98.         sed -e 's/$//' -e 's//\
  99. /g' \
  100.                 -e 's/"/"/g' -e 's/"/"/g' -e 's/ /*/g' -e 's/ /.../g' \
  101.                 -e "s/'/'/g" -e 's/ /Copyright  /' -e 's/ /--/g' |
  102.         fmt -s
  103.     ;;
  104. * ) # file mode
  105.     MVORCOMPARE=mv
  106.     if [ "$1" = "-c" ]; then
  107.         # compare mode
  108.         MVORCOMPARE=cmp
  109.         shift
  110.     fi
  111.     for file do
  112.         <$file  tr '\015\032' '\012\012' | expand |
  113.            sed -e 's/"/"/g' -e 's/"/"/g' -e 's/ /*/g' -e 's/ /.../g' \
  114.                 -e "s/'/'/g" -e 's/ /Copyright  /' -e 's/ /--/g' |
  115.            fmt -s  >/tmp/fixit.$$
  116.         if [ $MVORCOMPARE = mv ]; then
  117.                 mv /tmp/fixit.$$ $file
  118.         else
  119.                 cmp -s /tmp/fixit.$$ $file || echo $0: $file needs fixing
  120.                 rm -f /tmp/fixit.$$
  121.         fi
  122.         done
  123.     ;;
  124. esac
  125.  
  126. - - -
  127.  
  128. ** kai@berkp.uadv.uci.edu (Kai-Joachim Kamrath) comments:
  129.  
  130. >Your question brings to mind a broader question: consistency in layout and
  131. >design.  Perhaps it would make sense for the list to discuss standards of
  132. >consistency in layout of documents available at a gopher site.  For example,
  133. >I've noticed that most documents don't contain a date within them.  As
  134. >quicky things change in computing, it would be helpful to see the date an
  135. >article was written; you could easily skip anything which appears to be out
  136. >of date based on date written alone.  I'd suggest that any gopher-able
  137. >document should contain a date written in the first few lines of text, so
  138. >users can easily skip if deemed old.
  139.  
  140.  
  141. ** As for myself, I favor QUED/M for the Mac (a commercial programmers
  142. editor) for cleaning up text, but as I said in my original posting, I don't
  143. have the operation neatly "packaged". It can be used to word wrap to a
  144. fixed width, expand tabs, convert line breaks, delete odd characters, and
  145. search and replace arbitrary characters. It has a macro capabability, but I
  146. haven't used this to put these features all together.
  147. ---
  148.     Albert Lunde                      Albert-Lunde@nwu.edu
  149.                                       alunde@nuacvm.bitnet
  150.