home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / pms_124.zip / PMSTRIP.DOC < prev    next >
Text File  |  2001-05-09  |  20KB  |  454 lines

  1.  
  2. PMStripper 
  3.  
  4.  
  5. I. Overview:
  6.  
  7.  
  8. This PM shareware utility strips HTML codes from Web pages, leaving
  9. only the text and URLs (optionally).  Some of the page's formatting
  10. is retained, but since PMStripper is not an HTML interpreter most
  11. formatting is lost.  While the layout of tables and lists is lost
  12. during stripping, data is sorted to separate lines for legibility.
  13.  
  14. PMStripper is designed to provide a quick conversion of HTML coded
  15. files into plain ASCII text.  Although the converted files can be
  16. edited while loaded in PMStripper, only simple edit commands are
  17. available.  Therefore, if extensive editing is needed, the text
  18. should be loaded into a more capable word processor or text editor.
  19.  
  20. The registered version offers a menu item to easily move stripped
  21. files to programs suited for advanced editing.
  22.  
  23. A convenient way to use PMStripper is to install it as the raw
  24. HTML viewer in the IBM Web Explorer.  This makes it easier to
  25. save information from Web pages or cut and paste URLs from Web pages.
  26.  
  27. PMStripper is a shareware program and if you continue to use the
  28. program you should register it.  PMStripper does not have any
  29. code to check on how long the program has been in use, so it is
  30. up to the user to determine a reasonable trial period.
  31.  
  32. The shareware version of PMStripper is fully functional, some of
  33. the convenience features are disabled but they do not effect the
  34. function of the utility.  Trying the disabled features will bring
  35. up an unregistered message requiring a user response.
  36.  
  37.  
  38. II.  Installing PMStripper:
  39.  
  40.  
  41. 1) Unzip the archive.
  42.  
  43. 2) If REXX is installed:  Run the INSTALL.CMD script from an OS/2
  44. command prompt, or by double clicking on the install file's icon.
  45.  
  46. The script will create a destination directory and transfer program
  47. files to it.  Optionally, you may use the unzip directory as the
  48. working directory.  In either case the script will create a
  49. PMStripper program object on the desktop and set file associations
  50. for .HTM and .HTML files.  Setting associations this way allows
  51. instant loading, and stripping, of saved Web pages by double clicking
  52. their icons.
  53.  
  54. If the install program cannot create the desired directory, just move
  55. all unzipped files to the working directory before running the
  56. install program.
  57.  
  58. 3) If REXX is not installed:  Unzip the archive in the desired
  59. working directory and manually:  a) Create a desktop program object,
  60. and b) Set .HTM and HTML associations.  (See OS/2 documentation for
  61. instructions, if needed.)
  62.  
  63.  
  64. III.  Files
  65.  
  66.  
  67. PMStripper is distributed as a compressed archive.  The registered
  68. version is PMSR_xxx.zip and the shareware version 1s PMS_xxx.zip,
  69. where xxx is the version number.  The contents of the archive is
  70. detailed in the file named FILES.
  71.  
  72.  
  73. IV.  Uninstalling PMStripper:
  74.  
  75.  
  76. If you find it necessary to remove PMStripper, simply delete the
  77. unzipped files, program object, associations and directory.
  78. PMStripper makes no entries in configuration or initialization files.
  79.  
  80.  
  81.  
  82. V. Using PMStripper
  83.  
  84.  
  85. PMStripper is a simple program with only five menu bar items:
  86.  
  87. 1. 'File' offers nine pull-down menu items:  'Open File',
  88. 'Reload Source File', 'Reload Source File As Raw HTML', 'Save As', 
  89. 'Save - No Prompt', 'Save Marked Text To File','Hard code word wrap',
  90. 'Print On Default Printer'  and 'Exit'.  All except the Reload,
  91. Save - No Prompt, Hard code word wrap and Print selections perform
  92. in a standard OS/2 manner.
  93.                   
  94. The 'Reload Source File' menu item reloads the current HTML file and
  95. is a handy way to make changes in the stripp options and then view the
  96. same file, processed differently.
  97.  
  98. The 'Reload Source File As Raw HTML' menu item reloads the current
  99. HTML file without stripping the HTML codes. This was added so that
  100. installing PMStripper as the raw HTML viewer in Web Explorer does
  101. not rob the user of a way to view the raw HTML code.
  102.  
  103. Picking a file name for the 'Save As' is easy: Highlight some text
  104. for the name and then click on 'Save As', or simply highlight and
  105. then press Alt+S.  If you have not highlighted text for the file
  106. name, the original file's name (with the extension .htm or .html
  107. replaced by .txt) is offered as the default.  The option to use
  108. highlighted text is only available in the regisered version. A
  109. check has been added to warn the user if he is about to overwrite an
  110. existing file. If the file is write protected an error message is
  111. displayed.  If the file is not write protected, the user is prompted
  112. for an 'Ok' or 'Cancel' response.
  113.  
  114. The 'Save - No Prompt' menu item saves the stripped file without
  115. opening a file dialog box.  It uses the file name that would have
  116. been offered in the file dialog box that is used in the normal
  117. 'Save As' menu selection.
  118.  
  119. The 'Save Marked Text To File' menu item opens a standard file
  120. dialog box and after the use has entered a destination file
  121. name, the marked text is saved.
  122.  
  123. The 'Hard code word wrap' menu item adds CR-LF pairs to each line
  124. in the display window to make the current word wrap permanent. 
  125.  
  126. The 'Print On Default Printer' menu item sends the stripped file
  127. to the default printer without any special formatting. This method
  128. bypasses the WPS print manager and uses the printer's default font.
  129. Additionally, since word wrap in the PMStripper display window does
  130. not reformat the text, line lengths must be user adjusted to fit the
  131. printer.  The user can select a printer as the file's destination by
  132. selecting the "Save As' menu selection and entering 'lpt1' or 'lpt2'
  133. as the file name.
  134.  
  135. If the INSTALL.CMD file is used to install PMStripper, the association
  136. for .htm and .html is set so that a double click will load files with
  137. those extensions into PMStripper.
  138.  
  139. The utility will also load HTML coded files for stripping via drag
  140. and drop of the file's icon onto that of the PMStripper.  However,
  141. the capability to load files by drag and drop onto an open edit
  142. window does not exist.
  143.  
  144.  
  145. 2. 'Edit' has five sub-menu items which also operate as expected.
  146. They are 'Cut', 'Copy', 'Paste', 'Select All' and 'Undo Change'.  The
  147. 'Undo Change' selection will undo the last change made to the text in
  148. the window and is only one level deep.
  149.  
  150.  
  151. 3. 'Options' has seven sub-menu items.  They are 'Display Options',
  152. 'URL Settings', 'Strip Options', 'External Editor Settings',
  153. 'Filename Settings', 'Use idle time priority'  and 'Save Settings'.
  154.  
  155. 'Display Options' has three sub-menu items.  They are 'Font',
  156. 'Reset to default colors' and 'Word Wrap'.  'Font' brings up
  157. a standard OS/2 font dialog box and will allow the selection of
  158. any of the installed fonts.  This option only changes the font
  159. in the main window.  To change the font for the menubar or the
  160. information area below the main window, use the OS/2 font palette
  161. and drag and drop a new font on either area.  For the main window,
  162. font drag and drop does not always work correctly. The font
  163. selections are only saved when 'Save Settings' is selected.
  164.  
  165. The 'Reset to default colors' option restores the system default
  166. background and foreground colors.  To change the colors on the
  167. menubar, main window, or the information area use the OS/2 color
  168. palette and drag and drop a color selection.  When 'Save Settings
  169. is selected , the color selections are made the default colors.
  170.  
  171. The 'Word Wrap' option is a toggle setting that turns word wrap on
  172. or off.  Word wrap is set on each time the application is loaded. 
  173. The wrap function does not actually reformat the text, instead it
  174. effects only the way text is displayed.
  175.  
  176. 'URL Settings' has three sub-menu items.  They are 'Add URLs,
  177. 'Leave URLs'and 'Only http type'.  These options effect how the HTML
  178. file is processed and the file must be reloaded for these changes to
  179. effect the current file.  'Add URLs' appends the URLs found in the HTML
  180. file to the end of the stripped text.  'Leave URLs' leaves the URLs
  181. found in the HTML file in the stripped text. The 'Only http type'
  182. limits the URLs to those links containing a http reference. The
  183. "normal" URL detection looks for htlm code containing href and will
  184. find gopher, ftp, mailto, and relative links to other web pages as
  185. well as complete URLs.
  186.  
  187. 'Strip Options' has four sub-menu items: 'Ignore <BR>' and 'Ignore
  188. cr-lf', 'Translate quotes'and 'Translate iso8859-1 character codes'.
  189. The first two selections are mutually exclusive. These options are
  190. useful when the stripped output has excessive blank lines.  This 
  191. often occurs in Web published poetry since many are formatted with
  192. both carriage return - line feed (cr-lf) pairs and the HTML code <BR>
  193. which prevents text reformatting by the browser. PMStripper normally
  194. translates <BR> into a cr-lf pair thereby producing unnecessary blank
  195. lines. These two menu items strip either the cr-lf pairs OR the <BR>
  196. codes from the text before any other actions are performed. The results
  197. of using either option should be similar, but one method may produce
  198. better results depending on how the text was originally formatted.
  199. Selecting one or the other and reloading via the ALT-R command can
  200. produce better results.
  201.  
  202. The 'Translate quotes' option translates the "smart quotes" used on
  203. some web pages into the standard ascii values (0x93 and 0x94 are changed
  204. to 0x22).  The "smart apostrophes" are translated to standard ascii (0x91
  205. and 0x92 are changed to 0x22). The two "special hyphen" characters are
  206. translated to standard ascii (0x96 and 0x97 are changed to 0x2d).  The
  207. 0x85 character is translated into 3 periods (0x2e) to approximate an
  208. elipsis character.  In addition the 0xA0 and the 0x99 characters are
  209. each translated to a space. The translation is done before any html
  210. character enties are translated, so this option should not effect
  211. languages that use those characters as part of their normal text.
  212.  
  213. The 'Translate iso8859-1 character codes' option translates the upper
  214. characters (decimal 128 thru 255) of the iso8859-1 character set into
  215. the appropriate html character enties. The translation is done before
  216. any html character enties are translated. This option should be used
  217. if the stripped text contains the wrong international characters and
  218. it is unlikely to be helpful on english text.
  219.  
  220. The 'Translate quotes'and 'Translate iso8859-1 character codes'
  221. options are mutually exclusive. 
  222.  
  223. These options effect how the HTML file is processed and the file must
  224. be reloaded (via ALT-R) for these changes to effect the current file.
  225.  
  226. 'External Editor Settings' has two sub-menu items.  They are 'Use
  227. __TMP2__ File' and 'Use Clipboard'.  'Use __TMP2__ File' causes the
  228. temporary file __TMP2__ to be left in the current working directory
  229. for use by an external editor.  'Use Clipboard' causes the stripped
  230. file to be copied to the OS/2 clipboard when the user selects 'Exit
  231. to Word Processor'.  These option settings are only effective in the
  232. registered version.
  233.  
  234. 'Filename Settings' has seven sub-menu items.  They are 'Replace Space
  235. with Underscore Character', 'Leave Space in Filename',
  236. 'Enter Default Save Path', 'Enable Use of Default Save Path',
  237. 'Enter Default Load Path', 'Enable Use of Default Load Path',
  238. and 'Enter Default Save Extent'.  The first two items are
  239. toggles and only one setting is active. They determine how the
  240. highlighted text is converted to a destination file name for the
  241. stripped HTML file.  The following option settings are only effective in
  242. the registered version.  'Enter Default Save Path' and
  243. 'Enter Default Load Path' bring up a dialog boxes that allow the user
  244. to enter paths for saving and loading files.
  245. 'Enable Use of Default Save Path' and 'Enable Use of Default Load Path'
  246. are toggles that enable the use of the default paths. These toggles
  247. allow the user to disable the default paths without clearing out the
  248. path information.  'Enter Default Save Extent' brings up a dialog box
  249. that allows the user to specify a default extent for the stripped
  250. HTML file when it is saved to disk.
  251.  
  252. Note: A period is not part of the extent.
  253.  
  254.  
  255. 'Use idle time priority' reduces the priority of the thread that
  256. processes the source file.  Using this option reduces the impact
  257. PMStripper has on other tasks that are active.  Users with faster
  258. CPUs may not notice any difference when this option is selected.
  259.  
  260.  
  261. 'Save Settings' saves all of the option settings to an INI file named
  262. PMSTRIP.INI. The file will only be created when 'Save Settings' is
  263. selected.  The utility reverts to word wrap on when loaded.
  264.  
  265. For PMStripper users who wish to add an environment variable to their
  266. config.sys file, PMStripper will use that environment variable to
  267. determine where the PMSTRIP.INI is located if it is not found in the
  268. working directory. 
  269.  
  270. The environment variable is specified in your config.sys file.
  271.  
  272. SET PMSTRIPPER=C:\YOURPATH
  273.  
  274. The C:\YOURPATH should be changed to the location of PMStripper or
  275. the drive and directory that you want to locate the PMSTRIP.INI file
  276.  
  277. The install routine does not add the line to your config.sys.
  278.  
  279. NOTE:  When PMStripper is activated by dropping the icon of a HTML
  280. file onto that of PMStripper, the location of the HTML file becomes
  281. the current working directory.  PMStripper will look for its INI file
  282. in that directory before checking the location specified in the
  283. config.sys file. This is convenient for those who may want several
  284. INI files, each with different attributes, according to the location
  285. of the source HTML file.
  286.  
  287. 4. 'Exit' has two sub-menu items.  They are 'Exit' and 'Exit to Word
  288. Processor'.  'Exit' causes the stripped file to be discarded and
  289. PMStripper to close.  'Exit to Word Processor' causes the OS/2 CMD
  290. file PMS_CMD.CMD to be executed and PMStripper to close.  The 'Exit
  291. to Word Processor' option is only effective in the registered
  292. version.
  293.  
  294.  
  295. 5. 'About' displays copyright and contact information.
  296.  
  297.  
  298.  
  299. VI.  The active keyboard accelerators (short cut keys) are:
  300.  
  301. Exit                            Alt+X
  302. Copy                            Ctrl+Insert
  303. Cut                             Shift+Delete
  304. Paste                           Shift+Insert
  305. Select All                      Ctrl+/
  306. Open File                       Alt+F
  307. Print On Default Printer        Alt+P
  308. Reload File                     Alt+R
  309. Reload Source File As Raw HTML  Ctrl+R
  310. Save As                         Alt+S
  311. Save - No Prompt                Ctrl+S
  312. Save Marked Text To File        F9
  313. Undo Change                     Alt+U
  314. Word Processor                  Alt+W
  315.  
  316. The keyboard accelerators are not case sensitive.
  317.  
  318.  
  319. VII.  Miscellaneous Notes:
  320.  
  321.  
  322. When dragging a file from Web Explorer the file must be dropped on the
  323. desktop (or in a folder) before it can be dropped on the PMStripper
  324. program object.
  325.  
  326. This utility will only run on OS/2 Warp and later releases.
  327.  
  328. One useful feature is the ability to mark text in the stripped file
  329. and use the highlighted text as the file's 'Save As' name.  This is
  330. very useful if you have HPFS formatted drives.  NOTE:  Spaces and
  331. some punctuation characters are converted to "_" characters in the
  332. file name unless the option to use spaces is selected.  Then any
  333. converted characters are converted to spaces.  The "/" and "\"
  334. characters are deleted and not replaced.  This feature is only
  335. activated in the registered version of PMStripper.
  336.  
  337. The HTML specification defines "Character Entity Sets" or tags to
  338. represent particular graphic characters which have special meanings
  339. in the markup language, or may not be part of the character set
  340. available to the writer.  PMStripper does not scan for all possible
  341. tags, but does try to resolve the most common.
  342.  
  343. This version of PMStripper has support for code pages 437 and 850 and
  344. if code page 850 is in use, the 850 character set is used.  The code
  345. pages only make a difference when &xxxx; tags are present in the file
  346. If the correct character or an acceptable alternate is not available
  347. a space character is used. If the tag is unknown to PMStripper, then
  348. the &xxxx; tag will be left in the file.
  349.  
  350. Registered users who frequently encounter particular &xxxx and &#nnn
  351. tags should contact the author for consideration of the tags inclusion
  352. in the next release.
  353.  
  354.  
  355. VIII.  Why & How to Register:
  356.  
  357.  
  358. Registered users feel good about supporting OS/2 developers and enjoy
  359. these additional benefits:
  360.  
  361. Registered users of PMStripper will have access to two additional
  362. executable files that were compiled with the 486 and 586 compiler
  363. options.  These versions will offer some performance improvement
  364. for users with 468 , Pentium, or equivalent CPUs.
  365.  
  366. The Word Processor option runs the PMS_CMD.CMD file located in the
  367. working directory specified in the Program Object.  This file is used
  368. to start the word processor or editor of your choice to edit the
  369. stripped text file named __TMP2__ or to allow you to paste the
  370. stripped file into your editor.  PMStripper will close after the
  371. executing the PMS_CMD.CMD file.
  372.  
  373. NOTE:  The __TMP2__ file is discarded if PMStripper is closed via the
  374. the 'Exit' menu item.  Double clicking the PMStripper's upper left
  375. corner, using Alt+F4 or selecting that menu's 'Close' may cause the
  376. temporary stripped file (named __TMP2__ ) to remain in the working
  377. directory.
  378.  
  379. This menu item is disabled in the unregistered version.  Instead of
  380. invoking the command script an unregistered message requiring a user
  381. response will be shown.
  382.  
  383.  
  384. Example PMS_CMD.CMD files:
  385.  
  386. To use the system editor E.EXE, the PMS_CMD.CMD file would contain:
  387.  
  388. E __TMP2__
  389.  
  390. To use a word processor or editor whose executable is not in the
  391. path, the command script must copy the __TMP2__ file to the desired
  392. program's data directory, change to that directory and then launch
  393. the word processor/editor.  An example PMS_CMD.CMD file to use
  394. DeScribe is shown below.
  395.  
  396. copy __TMP2__ g:\describe\__TMP2__
  397. g:
  398. cd \describe
  399. describe __TMP2__
  400.  
  401. In addition to the activation of the Word Processor option, the
  402. opening unregistered message requiring a user response is eliminated
  403. along with the unregistered line that is inserted at the top of the
  404. stripped file.
  405.  
  406. Registered users are supported via e-mail.  Send help requests and
  407. good ideas to me at dwhawk@southwind.net.
  408.  
  409. There are two places to register PMStripper.  Through BMT Micro and
  410. directly with the author.
  411.  
  412. Registration through BMT Micro:
  413.  
  414. BMT Micro will accept credit cards and will be more convenient for
  415. OS/2 users outside the United States.  BMT Micro's price to register
  416. PMStripper is $9.95 (US Dollars).  BMT Micro also has an FTP area
  417. where the registered version can be obtained after registration.
  418.  
  419.  
  420. Direct registration:
  421.  
  422. Stuff small bills, gold coins, diamonds or even checks (US banks
  423. only, please) valued at $9.95 (US dollars) into an envelope and mail
  424. to:
  425.  
  426. Don Hawkinson
  427. 4555 N Hillcrest
  428. Wichita KS, 67220-3832
  429. USA
  430.  
  431.  
  432. Please don't send $100 bills (or larger) in the mail without
  433. purchasing full postal insurance.  Also, no change will be
  434. returned because it is absolutely unsafe, and unwise, to send cash
  435. through the mail.
  436.  
  437. Registration may also be done via a $9.95 PayPal payment to 
  438. dwhawk@southwind.net.
  439.  
  440. The registered version of PMStripper will be distributed by 
  441. download from my web page, so make certain that your e-mail
  442. address is included with your registration fee.
  443.  
  444. Registered users will be notified of updates via e-mail.
  445.  
  446. Registration covers all 1.xx versions of PMStripper.
  447.  
  448.  
  449. Copyrights and trademarks remain the property of their owners.
  450.  
  451.  
  452. Don Hawkinson dwhawk@southwind.net
  453. http://www2.southwind.net/~dwhawk
  454.