home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / os2 / pms_117.arj / PMS_117.ZIP / pmstrip.doc < prev    next >
Encoding:
Text File  |  1998-07-20  |  17.7 KB  |  428 lines

  1.  
  2. PMStripper 1.17
  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 seven pull-down menu items:  'Open File', 'Reload
  88. Source File', 'Reload Source File As Raw HTML', 'Save As',
  89. 'Save - No Prompt', 'Print On Default Printer'  and 'Exit'.  All
  90. except the Reload, Save - No Prompt, and Print selections perform
  91. in a standard OS/2 manner. 
  92.  
  93. The 'Reload Source File' menu item reloads the current HTML file and
  94. is a handy way to make changes in the stripp options and then view the
  95. same HTML, processed differently.
  96.  
  97. The 'Reload Source File As Raw HTML' menu item reloads the current
  98. HTML file without stripping the HTML codes. This was added so that
  99. installing PMStripper as the raw HTML viewer in Web Explorer does
  100. not rob the user of a way to view the raw HTML code.
  101.  
  102. Picking a file name for the 'Save As' is easy: Highlight some text
  103. for the name and then click on 'Save As', or simply highlight and
  104. then press Alt+S.  If you have not highlighted text for the file
  105. name, the original file's name (with the extension .htm or .html
  106. replaced by .txt) is offered as the default.  The option to use
  107. highlighted text is only available in the registered version. A
  108. check has been added to warn the user if he is about to overwrite an
  109. existing file. If the file is write protected an error message is
  110. displayed.  If the file is not write protected, the user is prompted
  111. for an 'Ok' or 'Cancel' response.
  112.  
  113. The 'Save - No Prompt' menu item saves the stripped file without
  114. opening a file dialog box.  It uses the file name that would have
  115. been offered in the file dialog box that is used in the normal
  116. 'Save As' menu selection.
  117.  
  118. The 'Print On Default Printer' menu item sends the stripped file
  119. to the default printer without any special formatting. This method
  120. bypasses the WPS print manager and uses the printer's default font.
  121. Additionally, since word wrap in the PMStripper display window does
  122. not reformat the text, line lengths must be user adjusted to fit the
  123. printer.  The user can select a printer as the file's destination by
  124. selecting the "Save As' menu selection and entering 'lpt1' or 'lpt2'
  125. as the file name.  
  126.  
  127. If the INSTALL.CMD file is used to install PMStripper, the association
  128. for .htm and .html is set so that a double click will load files with
  129. those extensions into PMStripper.
  130.  
  131. The utility will also load HTML coded files for stripping via drag
  132. and drop of the file's icon onto that of the PMStripper.  However,
  133. the capability to load files by drag and drop onto an open edit
  134. window does not exist.
  135.  
  136.  
  137. 2. 'Edit' has five sub-menu items which also operate as expected.
  138. They are 'Cut', 'Copy', 'Paste', 'Select All' and 'Undo Change'.  The
  139. 'Undo Change' selection will undo the last change made to the text in
  140. the window and is only one level deep.
  141.  
  142.  
  143. 3. 'Options' has six sub-menu items.  They are 'Display Options',
  144. 'URL Settings', 'Strip Options', 'External Editor Settings',
  145. 'Filename Settings' and 'Save Settings'. 
  146.  
  147. 'Display Options' has two sub-menu items.  They are 'Font' and 'Word
  148. Wrap'.  'Font' brings up a standard OS/2 font dialog box and will
  149. allow the selection of any of the installed fonts.  The font that
  150. is active when 'Save Settings' is selected will be made the default
  151. font. 'Word Wrap' is a toggle setting that turns word wrap on or off.
  152. The wrap function does not actually reformat the text, instead it
  153. effects only the way text is displayed. 
  154.  
  155. 'URL Settings' has three sub-menu items.  They are 'Add URLs,
  156. 'Leave URLs'and 'Only http type'.  These options effect how the HTML
  157. file is processed and the file must be reloaded for these changes to
  158. effect the current file.  'Add URLs' appends the URLs found in the HTML
  159. file to the end of the stripped text.  'Leave URLs' leaves the URLs
  160. found in the HTML file in the stripped text. The 'Only http type'
  161. limits the URLs to those links containing a http reference. The 
  162. "normal" URL detection looks for htlm code containing href and will
  163. find gopher, ftp, mailto, and relative links to other web pages as
  164. well as complete URLs.
  165.  
  166. 'Strip Options' has three sub-menu items: 'Ignore <BR>' and 'Ignore 
  167. cr-lf', and 'Translate quotes'. The first two selections are mutually
  168. exclusive. These options are useful when the stripped output has
  169. excessive blank lines.  This often occurs in Web published poetry since
  170. many are formatted with both carriage return - line feed (cr-lf) pairs
  171. and the HTML code <BR> which prevents text reformatting by the browser.
  172. PMStripper normally translates <BR> into a cr-lf pair thereby producing
  173. unnecessary blank lines. These two menu items strip either the cr-lf pairs
  174. OR the <BR> codes from the text before any other actions are performed.
  175. The results of using either option should be similar, but one method may
  176. produce better results depending on how the text was originally formatted.
  177.  
  178. The 'Translate quotes' option translates the "smart quotes" used on
  179. some web pages into the standard ascii values (0x93 and 0x94 are changed
  180. to 0x22).  The "smart apostrophes" are translated to standard ascii (0x91
  181. and 0x92 are changed to 0x22). The two "special hyphen" characters are
  182. translated to standard ascii (0x96 and 0x97 are changed to 0x2d).  The
  183. 0x85 character is translated into 3 periods (0x2e) to approximate an
  184. elipsis character.  In addition the 0xA0 and the 0x99 characters are
  185. each translated to a space. The translation is done before any html
  186. character enties are translated, so this option should not effect
  187. languages that use those characters as part of their normal text.
  188.  
  189. These options effect how the HTML file is processed and the file must
  190. be reloaded for these changes to effect the current file. 
  191.  
  192. 'External Editor Settings' has two sub-menu items.  They are 'Use
  193. __TMP2__ File' and 'Use Clipboard'.  'Use __TMP2__ File' causes the
  194. temporary file __TMP2__ to be left in the current working directory
  195. for use by an external editor.  'Use Clipboard' causes the stripped
  196. file to be copied to the OS/2 clipboard when the user selects 'Exit
  197. to Word Processor'.  These option settings are only effective in the
  198. registered version.
  199.  
  200. 'Filename Settings' has seven sub-menu items.  They are 'Replace Space
  201. with Underscore Character', 'Leave Space in Filename',
  202. 'Enter Default Save Path', 'Enable Use of Default Save Path',
  203. 'Enter Default Load Path', 'Enable Use of Default Load Path',
  204. and 'Enter Default Save Extent'.  The first two items are
  205. toggles and only one setting is active. They determine how the
  206. highlighted text is converted to a destination file name for the
  207. stripped HTML file.  The following option settings are only effective in
  208. the registered version.  'Enter Default Save Path' and
  209. 'Enter Default Load Path' bring up a dialog boxes that allow the user
  210. to enter paths for saving and loading files.
  211. 'Enable Use of Default Save Path' and 'Enable Use of Default Load Path'
  212. are toggles that enable the use of the default paths. These toggles
  213. allow the user to disable the default paths without clearing out the
  214. path information.  'Enter Default Save Extent' brings up a dialog box
  215. that allows the user to specify a default extent for the stripped
  216. HTML file when it is saved to disk. 
  217.  
  218. Note: A period is not part of the extent.
  219.  
  220. 'Save Settings' saves all of the option settings to an INI file named
  221. PMSTRIP.INI. The file will only be created when 'Save Settings' is
  222. selected.  The utility reverts to word wrap on when loaded.
  223.  
  224. For PMStripper users who wish to add an environment variable to their
  225. config.sys file, PMStripper will use that environment variable to
  226. determine where the PMSTRIP.INI is located if it is not found in the
  227. working directory.  
  228.  
  229. The environment variable is specified in your config.sys file.
  230.  
  231. SET PMSTRIPPER=C:\YOURPATH
  232.  
  233. The C:\YOURPATH should be changed to the location of PMStripper or
  234. the drive and directory that you want to locate the PMSTRIP.INI file
  235.  
  236. The install routine does not add the line to your config.sys.
  237.  
  238. NOTE:  When PMStripper is activated by dropping the icon of a HTML
  239. file onto that of PMStripper, the location of the HTML file becomes
  240. the current working directory.  PMStripper will look for its INI file
  241. in that directory before checking the location specified in the
  242. config.sys file. This is convenient for those who may want several
  243. INI files, each with different attributes, according to the location
  244. of the source HTML file.
  245.  
  246. 4. 'Exit' has two sub-menu items.  They are 'Exit' and 'Exit to Word
  247. Processor'.  'Exit' causes the stripped file to be discarded and
  248. PMStripper to close.  'Exit to Word Processor' causes the OS/2 CMD
  249. file PMS_CMD.CMD to be executed and PMStripper to close.  The 'Exit
  250. to Word Processor' option is only effective in the registered
  251. version.
  252.  
  253.  
  254. 5. 'About' displays copyright and contact information.
  255.  
  256.  
  257.  
  258. VI.  The active keyboard accelerators (short cut keys) are:
  259.  
  260. Exit                            Alt+X
  261. Copy                            Ctrl+Insert
  262. Cut                             Shift+Delete
  263. Paste                           Shift+Insert
  264. Select All                      Ctrl+/
  265. Open File                       Alt+F
  266. Print On Default Printer        Alt+P     
  267. Reload File                     Alt+R
  268. Reload Source File As Raw HTML  Ctrl+R
  269. Save As                         Alt+S
  270. Save - No Prompt                Ctrl+S
  271. Undo Change                     Alt+U
  272. Word Processor                  Alt+W
  273.  
  274. The keyboard accelerators are not case sensitive.
  275.  
  276.  
  277. VII.  Miscellaneous Notes:
  278.  
  279.  
  280. When dragging a file from Web Explorer the file must be dropped on the
  281. desktop (or in a folder) before it can be dropped on the PMStripper
  282. program object.
  283.  
  284. This utility will only run on OS/2 Warp and later releases.
  285.  
  286. One useful feature is the ability to mark text in the stripped file
  287. and use the highlighted text as the file's 'Save As' name.  This is
  288. very useful if you have HPFS formatted drives.  NOTE:  Spaces and
  289. some punctuation characters are converted to "_" characters in the
  290. file name unless the option to use spaces is selected.  Then any
  291. converted characters are converted to spaces.  The "/" and "\"
  292. characters are deleted and not replaced.  This feature is only
  293. activated in the registered version of PMStripper.
  294.  
  295. The HTML specification defines "Character Entity Sets" or tags to
  296. represent particular graphic characters which have special meanings
  297. in the markup language, or may not be part of the character set
  298. available to the writer.  PMStripper does not scan for all possible
  299. tags, but does try to resolve the most common.
  300.  
  301. This version of PMStripper has support for code pages 437 and 850 and
  302. if code page 850 is in use, the 850 character set is used.  The code
  303. pages only make a difference when &xxxx; tags are present in the file
  304. If the correct character or an acceptable alternate is not available
  305. a space character is used. If the tag is unknown to PMStripper, then
  306. the &xxxx; tag will be left in the file.
  307.  
  308. Registered users who frequently encounter particular &xxxx and &#nnn
  309. tags should contact the author for consideration of the tags inclusion
  310. in the next release.
  311.  
  312.  
  313. VIII.  Why & How to Register:
  314.  
  315.  
  316. Registered users feel good about supporting OS/2 developers and enjoy
  317. these additional benefits:
  318.  
  319. Registered users of PMStripper will have access to two additional
  320. executable files that were compiled with the 486 and 586 compiler
  321. options.  These versions will offer some performance improvement
  322. for users with 468 , Pentium, or equivalent CPUs. 
  323.  
  324. The Word Processor option runs the PMS_CMD.CMD file located in the
  325. working directory specified in the Program Object.  This file is used
  326. to start the word processor or editor of your choice to edit the
  327. stripped text file named __TMP2__ or to allow you to paste the
  328. stripped file into your editor.  PMStripper will close after the
  329. executing the PMS_CMD.CMD file.
  330.  
  331. NOTE:  The __TMP2__ file is discarded if PMStripper is closed via the
  332. the 'Exit' menu item.  Double clicking the PMStripper's upper left
  333. corner, using Alt+F4 or selecting that menu's 'Close' may cause the
  334. temporary stripped file (named __TMP2__ ) to remain in the working
  335. directory.
  336.  
  337. This menu item is disabled in the unregistered version.  Instead of
  338. invoking the command script an unregistered message requiring a user
  339. response will be shown.
  340.  
  341.  
  342. Example PMS_CMD.CMD files:
  343.  
  344. To use the system editor E.EXE, the PMS_CMD.CMD file would contain:
  345.  
  346. E __TMP2__
  347.  
  348. To use a word processor or editor whose executable is not in the
  349. path, the command script must copy the __TMP2__ file to the desired
  350. program's data directory, change to that directory and then launch
  351. the word processor/editor.  An example PMS_CMD.CMD file to use
  352. DeScribe is shown below.
  353.  
  354. copy __TMP2__ g:\describe\__TMP2__
  355. g:
  356. cd \describe
  357. describe __TMP2__
  358.  
  359. In addition to the activation of the Word Processor option, the
  360. opening unregistered message requiring a user response is eliminated
  361. along with the unregistered line that is inserted at the top of the
  362. stripped file.
  363.  
  364. Registered users are supported via e-mail.  Send help requests and
  365. good ideas to me at dwhawk@southwind.net.
  366.  
  367. There are two places to register PMStripper.  Through BMT Micro and
  368. directly with the author.
  369.  
  370. Registration through BMT Micro:
  371.  
  372. BMT Micro will accept credit cards and will be more convenient for
  373. OS/2 users outside the United States.  BMT Micro's price to register
  374. PMStripper is $9.95 (US Dollars).  BMT Micro also has an FTP area
  375. where the registered version can be obtained after registration.
  376.  
  377.  
  378. Direct registration:
  379.  
  380. Stuff small bills, gold coins, diamonds or even checks (US banks
  381. only, please) valued at $7.50 (US dollars) into an envelope and mail
  382. to:
  383.  
  384. Don Hawkinson
  385. 4555 N Hillcrest
  386. Wichita KS, 67220-3832
  387. USA
  388.  
  389.  
  390. Please don't send $100 bills (or larger) in the mail without
  391. purchasing full postal insurance.  Also, no change will be
  392. returned because it is absolutely unsafe, and unwise, to send cash
  393. through the mail.
  394.  
  395. The registered version of PMStripper will be distributed by e-mail in
  396. the form of an uuencoded zip file, so make certain that your e-mail
  397. address is included with your registration fee.
  398.  
  399. Registered users will be notified of updates via e-mail.
  400.  
  401. Registration covers all 1.xx versions of PMStripper.  
  402.  
  403.  
  404. IX.  Acknowledgments:
  405.  
  406.  
  407. Thanks to the following Netizens for their help in testing and
  408. helpful comments during development.
  409.  
  410. DenverD@IBM.net
  411. Emil_Kucera@Environment.gov.MB.CA
  412. vlaming@ibm.net
  413. jhiatt@ibm.net
  414. jlink@best.com
  415. p_daley@conknet.com
  416. tombeck@usemail.com
  417.  
  418. Thanks to a Net WordSmith (WordSmith@IBM.Net) for editing help.
  419. (Actually, he converted my very rough draft to the initial release's
  420. document, and has provided continued editing services.)
  421.  
  422.  
  423. Copyrights and trademarks remain the property of their owners.
  424.  
  425.  
  426.  
  427. Don Hawkinson dwhawk@southwind.net
  428.