home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / c / crashmailv1.22reg.lha / CrashMail / rexx / ElistConv.rexx < prev    next >
OS/2 REXX Batch file  |  1996-02-07  |  917b  |  48 lines

  1. /* ElistConv 1.0 by Johan Billing
  2.  
  3.    This script converts an echolist created by the program Elist to a
  4.    format that CrashMail understands.
  5.  
  6.    Syntax: rx ElistConv.rexx <Elist file> <output file>
  7.  
  8. */
  9.  
  10. parse arg echoname" "outname
  11.  
  12. IF ~SHOW(Libraries,'rexxsupport.library') THEN
  13.     IF ~ADDLIB("rexxsupport.library",0,-30,0) THEN EXIT
  14.  
  15. call open('echofile',echoname,'R')
  16. call open('outfile',outname,'W')
  17.  
  18. kg=true
  19.  
  20. do while kg=true
  21.  inline=readln('echofile')
  22.  if left(inline,1)="-" then kg=false
  23. end
  24.  
  25. kg=true
  26.  
  27. do while kg=true
  28.  inline=readln('echofile')
  29.  
  30.  if left(inline,1)="-" then do
  31.   kg=false
  32.  end
  33.  else do
  34.   parse var inline tagname mailweek moderator language access rules desc
  35.   tagname=strip(tagname)
  36.   desc=strip(desc)
  37.   tagname=overlay(tagname,"",1,max(30,length(tagname)))
  38.   call writeln('outfile',tagname desc)
  39.  end
  40.  
  41.  if eof('echofile') then kg=false
  42. end
  43.  
  44.  
  45. call close('echofile')
  46. call close('outfile')
  47.  
  48.