home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / wvwar062.zip / wvWare.cmd < prev    next >
OS/2 REXX Batch file  |  2000-11-05  |  3KB  |  103 lines

  1. /* AUTOcmd [0.0.8] for WVware */
  2. /****************************/
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5. parse arg curdir filename
  6.  
  7.   /* (C) TEAM OS/2 Russia, http://teamos2.ru, mail@teamos2.ru */
  8.  /************************************************************/
  9. /* SEEEEEEEEEEE wvWare.config for config ********************/
  10.  
  11.  
  12.    cfgname=curdir'\wvWare.config'
  13.  
  14.    configdate=stream(cfgname,'c',query datetime)
  15.    do while lines(cfgname)
  16.      inli=linein(cfgname)
  17.      parse value inli with cfgvar"='"cfgvarvalue"'"
  18.      if (cfgvar\="")&(cfgvarvalue\="") then do
  19.        interpret cfgvar"='"cfgvarvalue"'"
  20.      end
  21.    end
  22.  
  23.  
  24.  
  25. /* and these lines are for me ;) */
  26. if configured\='YES' then do;say'';say'';say'';say ' please CONFIGURE wvWare.config! ';'@pause >nul';exit;end
  27. /*curdir=directory()*/
  28. if outdir\=directory(outdir) then call SysMkDir outdir
  29. call directory curdir
  30. if filename='' then do; say 'Usage: wvWare filename.doc';exit;end
  31.  
  32. tempname=filename
  33. diskname=substr(tempname,1,lastpos(':',tempname)-1)
  34. tempname=substr(tempname,lastpos('\',tempname)+1)
  35. dirname=substr(tempname,1,lastpos('.',tempname)-1)
  36. extname=substr(tempname,lastpos('.',tempname)+1)
  37. dirrname=outdir'\'dirname
  38.  
  39. say ''
  40. say ''
  41. say '  autoCMD adapted for wvWare '
  42. say ''
  43. call SysMkDir dirrname
  44. call directory dirrname
  45. '@copy 'filename' 'dirrname'\'dirname'.'extname '>nul'
  46.  
  47. call charout STDOUT,' converting.... '
  48.  
  49.  
  50. '@'wvexedir'\wvware.exe '/* --config /usr/local/lib/wv/config.xml */' '/*--charset koi8-r*/' 'dirname'.'extname' >'dirname'.html 2>'dirname'.log'
  51.  
  52. say ' ....done '
  53.  
  54.  
  55. say ''
  56. say ''
  57. say ''
  58. say 'your SOURCE file has been dublicated in directory'
  59. say '  'dirrname' '
  60. say ' LOG file is'
  61. say '  'dirrname'\'dirname'.log '
  62. say 'your CONVERTED files are in'
  63. say '  'dirrname' '
  64. say 'your CONVERTED INDEX file is'
  65. say '  'dirrname'\'dirname'.html '
  66. say ''
  67.  
  68. if launchNETSCAPE=='YES' then do
  69.   say 'launching NETscape in 3 seconds. press ctrl-c if you don`t this'
  70.   call syssleep 3
  71.   'start netscape.exe 'dirrname'\'dirname'.html'
  72. end
  73. else say 'if you want NETscape launches automatically please edit file wvWare.config'
  74. say ''
  75. say ' This window will close itself in 17 seconds '
  76. say ' If you don`t this  MARK TEXT in this window now  or  press PAUSE button '
  77. say ''
  78.  
  79.  
  80. /* ogho! nice joke ;) */
  81. hoho.0=14
  82. hoho.1='█'
  83. hoho.2='█'
  84. hoho.3='█'
  85. hoho.4='█'
  86. hoho.5=' '
  87. hoho.6='O'
  88. hoho.7='S'
  89. hoho.8='/'
  90. hoho.9='2'
  91. hoho.10=' '
  92. hoho.11='W'
  93. hoho.12='a'
  94. hoho.13='r'
  95. hoho.14='p'
  96.  
  97. do i=1 to hoho.0
  98.  call charout STDOUT,hoho.i
  99.  call syssleep 1
  100. end
  101.  
  102. call sysSleep 3
  103.