home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / pms_126.zip / pmstrip.doc < prev    next >
Text File  |  2002-06-06  |  21KB  |  495 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 does not rob the user
  101. of an easy 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. The sixth sub-menu item is 'Select to End' and marks text from the
  151. current cursor position to the end of the file.  I added this
  152. function before I found out that it was already part of the MLE class
  153. library that I used for the main PMStripper window.  
  154.  
  155. The following key combinations work in PMStripper and many other OS/2
  156. applications.
  157.  
  158. Shift+Home       moves the cursor to the top of the text
  159. Shift+End        moves the cursor to the end of the text
  160. Ctrl+Shift+Home  selects the text from the current position to 
  161.                   the top of the text
  162. Ctrl+Shift+End   selects the text from the current position to 
  163.                   the end of the text
  164.  
  165. 3. 'Options' has seven sub-menu items.  They are 'Display Options',
  166. 'URL Settings', 'Strip Options', 'External Editor Settings',
  167. 'Filename Settings', 'Use idle time priority'  and 'Save Settings'.
  168.  
  169. 'Display Options' has three sub-menu items.  They are 'Font',
  170. 'Reset to default colors' and 'Word Wrap'.  'Font' brings up
  171. a standard OS/2 font dialog box and will allow the selection of
  172. any of the installed fonts.  This option only changes the font
  173. in the main window.  To change the font for the menubar or the
  174. information area below the main window, use the OS/2 font palette
  175. and drag and drop a new font on either area.  For the main window,
  176. font drag and drop does not always work correctly. The font
  177. selections are only saved when 'Save Settings' is selected.
  178.  
  179. The 'Reset to default colors' option restores the system default
  180. background and foreground colors.  To change the colors on the
  181. menubar, main window, or the information area use the OS/2 color
  182. palette and drag and drop a color selection.  When 'Save Settings
  183. is selected , the color selections are made the default colors.
  184.  
  185. The 'Word Wrap' option is a toggle setting that turns word wrap on
  186. or off.  Word wrap is set on each time the application is loaded. 
  187. The wrap function does not actually reformat the text, instead it
  188. effects only the way text is displayed.
  189.  
  190. 'URL Settings' has three sub-menu items.  They are 'Add URLs,
  191. 'Leave URLs'and 'Only http type'.  These options effect how the HTML
  192. file is processed and the file must be reloaded for these changes to
  193. effect the current file.  'Add URLs' appends the URLs found in the HTML
  194. file to the end of the stripped text.  'Leave URLs' leaves the URLs
  195. found in the HTML file in the stripped text. The 'Only http type'
  196. limits the URLs to those links containing a http reference. The
  197. "normal" URL detection looks for htlm code containing href and will
  198. find gopher, ftp, mailto, and relative links to other web pages as
  199. well as complete URLs.
  200.  
  201. 'Strip Options' has seven sub-menu items: 'Ignore <BR>' and 'Ignore
  202. cr-lf', 'Translate quotes'and 'Translate iso8859-1 character codes'.
  203. The first two selections are mutually exclusive. These options are
  204. useful when the stripped output has excessive blank lines.  This 
  205. often occurs in Web published poetry since many are formatted with
  206. both carriage return - line feed (cr-lf) pairs and the HTML code <BR>
  207. which prevents text reformatting by the browser. PMStripper normally
  208. translates <BR> into a cr-lf pair thereby producing unnecessary blank
  209. lines. These two menu items strip either the cr-lf pairs OR the <BR>
  210. codes from the text before any other actions are performed. The results
  211. of using either option should be similar, but one method may produce
  212. better results depending on how the text was originally formatted.
  213. Selecting one or the other and reloading via the ALT-R command can
  214. produce better results.
  215.  
  216. The 'Translate quotes' option translates the "smart quotes" used on
  217. some web pages into the standard ascii values (0x93 and 0x94 are changed
  218. to 0x22).  The "smart apostrophes" are translated to standard ascii (0x91
  219. and 0x92 are changed to 0x22). The two "special hyphen" characters are
  220. translated to standard ascii (0x96 and 0x97 are changed to 0x2d).  The
  221. 0x85 character is translated into 3 periods (0x2e) to approximate an
  222. elipsis character.  In addition the 0xA0 and the 0x99 characters are
  223. each translated to a space. The translation is done before any html
  224. character enties are translated, so this option should not effect
  225. languages that use those characters as part of their normal text.
  226.  
  227. The 'Translate iso8859-1 character codes' option translates the upper
  228. characters (decimal 128 thru 255) of the iso8859-1 character set into
  229. the appropriate html character enties. The translation is done before
  230. any html character enties are translated. This option should be used
  231. if the stripped text contains the wrong international characters and
  232. it is unlikely to be helpful on english text.
  233.  
  234. The 'Translate quotes'and 'Translate iso8859-1 character codes'
  235. options are mutually exclusive. 
  236.  
  237. The next three options discard starting at line 10 the next 100, 200,
  238. or 300 lines of raw html source before stripping.  These options are
  239. mutually exclusive.   The keyboard accelerator for these options work
  240. differently from the menu selections.  Pressing Alt+1 , Alt+2, Alt+3,
  241. or Alt+C sets the option and then reloads and strips the source file.
  242. The state of these three options are not saved when the
  243. 'Save Settings" option is selected.
  244.  
  245. The title is found within the first 10 lines, so that is why the first
  246. 10 lines are not discarded.
  247.  
  248. These options effect how the HTML file is processed and the file must
  249. be reloaded (via ALT+R) for these changes to effect the current file.
  250.  
  251. 'External Editor Settings' has two sub-menu items.  They are 'Use
  252. __TMP2__ File' and 'Use Clipboard'.  'Use __TMP2__ File' causes the
  253. temporary file __TMP2__ to be left in the current working directory
  254. for use by an external editor.  'Use Clipboard' causes the stripped
  255. file to be copied to the OS/2 clipboard when the user selects 'Exit
  256. to Word Processor'.  These option settings are only effective in the
  257. registered version.
  258.  
  259. 'Filename Settings' has seven sub-menu items.  They are 'Replace Space
  260. with Underscore Character', 'Leave Space in Filename',
  261. 'Enter Default Save Path', 'Enable Use of Default Save Path',
  262. 'Enter Default Load Path', 'Enable Use of Default Load Path',
  263. and 'Enter Default Save Extent'.  The first two items are
  264. toggles and only one setting is active. They determine how the
  265. highlighted text is converted to a destination file name for the
  266. stripped HTML file.  The following option settings are only effective in
  267. the registered version.  'Enter Default Save Path' and
  268. 'Enter Default Load Path' bring up a dialog boxes that allow the user
  269. to enter paths for saving and loading files.
  270. 'Enable Use of Default Save Path' and 'Enable Use of Default Load Path'
  271. are toggles that enable the use of the default paths. These toggles
  272. allow the user to disable the default paths without clearing out the
  273. path information.  'Enter Default Save Extent' brings up a dialog box
  274. that allows the user to specify a default extent for the stripped
  275. HTML file when it is saved to disk.
  276.  
  277. Note: A period is not part of the extent.
  278.  
  279.  
  280. 'Use idle time priority' reduces the priority of the thread that
  281. processes the source file.  Using this option reduces the impact
  282. PMStripper has on other tasks that are active.  Users with faster
  283. CPUs may not notice any difference when this option is selected.
  284.  
  285.  
  286. 'Save Settings' saves all of the option settings to an INI file named
  287. PMSTRIP.INI. The file will only be created when 'Save Settings' is
  288. selected.  The utility reverts to word wrap on when loaded.
  289.  
  290. For PMStripper users who wish to add an environment variable to their
  291. config.sys file, PMStripper will use that environment variable to
  292. determine where the PMSTRIP.INI is located if it is not found in the
  293. working directory. 
  294.  
  295. The environment variable is specified in your config.sys file.
  296.  
  297. SET PMSTRIPPER=C:\YOURPATH
  298.  
  299. The C:\YOURPATH should be changed to the location of PMStripper or
  300. the drive and directory that you want to locate the PMSTRIP.INI file
  301.  
  302. The install routine does not add the line to your config.sys.
  303.  
  304. NOTE:  When PMStripper is activated by dropping the icon of a HTML
  305. file onto that of PMStripper, the location of the HTML file becomes
  306. the current working directory.  PMStripper will look for its INI file
  307. in that directory before checking the location specified in the
  308. config.sys file. This is convenient for those who may want several
  309. INI files, each with different attributes, according to the location
  310. of the source HTML file.
  311.  
  312. 4. 'Exit' has two sub-menu items.  They are 'Exit' and 'Exit to Word
  313. Processor'.  'Exit' causes the stripped file to be discarded and
  314. PMStripper to close.  'Exit to Word Processor' causes the OS/2 CMD
  315. file PMS_CMD.CMD to be executed and PMStripper to close.  The 'Exit
  316. to Word Processor' option is only effective in the registered
  317. version.
  318.  
  319.  
  320. 5. 'About' displays copyright and contact information.
  321.  
  322.  
  323.  
  324. VI.  The active keyboard accelerators (short cut keys) are:
  325.  
  326. Exit                            Alt+X
  327. Copy                            Ctrl+Insert
  328. Cut                             Shift+Delete
  329. Paste                           Shift+Insert
  330. Select All                      Ctrl+/
  331. Open File                       Alt+F
  332. Print On Default Printer        Alt+P
  333. Reload File                     Alt+R
  334. Reload Source File As Raw HTML  Ctrl+R
  335. Save As                         Alt+S
  336. Save - No Prompt                Ctrl+S
  337. Save Marked Text To File        F9
  338. Undo Change                     Alt+U
  339. Word Processor                  Alt+W
  340. Discard first 100 lines         Alt+1
  341.  of raw source file after
  342.  line 10 and reload
  343. Discard first 200 lines         Alt+2
  344.  of raw source file after
  345.  line 10 and reload
  346. Discard first 300 lines         Alt+3 , Alt+C
  347.  of raw source file after
  348.  line 10 and reload
  349. Mark text from the current      Ctrl+E
  350.  cursor position to the end
  351.  of text
  352.  
  353.  
  354. The keyboard accelerators are not case sensitive.
  355.  
  356.  
  357. VII.  Miscellaneous Notes:
  358.  
  359.  
  360. When dragging a file from Web Explorer the file must be dropped on the
  361. desktop (or in a folder) before it can be dropped on the PMStripper
  362. program object.
  363.  
  364. This utility will only run on OS/2 Warp and later releases.
  365.  
  366. One useful feature is the ability to mark text in the stripped file
  367. and use the highlighted text as the file's 'Save As' name.  This is
  368. very useful if you have HPFS formatted drives.  NOTE:  Spaces and
  369. some punctuation characters are converted to "_" characters in the
  370. file name unless the option to use spaces is selected.  Then any
  371. converted characters are converted to spaces.  The "/" and "\"
  372. characters are deleted and not replaced.  This feature is only
  373. activated in the registered version of PMStripper.
  374.  
  375. The HTML specification defines "Character Entity Sets" or tags to
  376. represent particular graphic characters which have special meanings
  377. in the markup language, or may not be part of the character set
  378. available to the writer.  PMStripper does not scan for all possible
  379. tags, but does try to resolve the most common.
  380.  
  381. This version of PMStripper has support for code pages 437 and 850 and
  382. if code page 850 is in use, the 850 character set is used.  The code
  383. pages only make a difference when &xxxx; tags are present in the file
  384. If the correct character or an acceptable alternate is not available
  385. a space character is used. If the tag is unknown to PMStripper, then
  386. the &xxxx; tag will be left in the file.
  387.  
  388. Registered users who frequently encounter particular &xxxx and &#nnn
  389. tags should contact the author so that the tags may be included in the
  390. next release.
  391.  
  392.  
  393. VIII.  Why & How to Register:
  394.  
  395.  
  396. Registered users feel good about supporting OS/2 developers and enjoy
  397. these additional benefits:
  398.  
  399. Registered users of PMStripper will have access to two additional
  400. executable files that were compiled with the 486 and 586 compiler
  401. options.  These versions will offer some performance improvement
  402. for users with 468 , Pentium, or equivalent CPUs.
  403.  
  404. The Word Processor option runs the PMS_CMD.CMD file located in the
  405. working directory specified in the Program Object.  This file is used
  406. to start the word processor or editor of your choice to edit the
  407. stripped text file named __TMP2__ or to allow you to paste the
  408. stripped file into your editor.  PMStripper will close after the
  409. executing the PMS_CMD.CMD file.
  410.  
  411. NOTE:  The __TMP2__ file is discarded if PMStripper is closed via the
  412. the 'Exit' menu item.  Double clicking the PMStripper's upper left
  413. corner, using Alt+F4 or selecting that menu's 'Close' may cause the
  414. temporary stripped file (named __TMP2__ ) to remain in the working
  415. directory.
  416.  
  417. This menu item is disabled in the unregistered version.  Instead of
  418. invoking the command script an unregistered message requiring a user
  419. response will be shown.
  420.  
  421.  
  422. Example PMS_CMD.CMD files:
  423.  
  424. To use the system editor E.EXE, the PMS_CMD.CMD file would contain:
  425.  
  426. E __TMP2__
  427.  
  428. To use a word processor or editor whose executable is not in the
  429. path, the command script must copy the __TMP2__ file to the desired
  430. program's data directory, change to that directory and then launch
  431. the word processor/editor.  An example PMS_CMD.CMD file to use
  432. DeScribe is shown below.
  433.  
  434. copy __TMP2__ g:\describe\__TMP2__
  435. g:
  436. cd \describe
  437. describe __TMP2__
  438.  
  439. In addition to the activation of the Word Processor option, the
  440. opening unregistered message requiring a user response is eliminated
  441. along with the unregistered line that is inserted at the top of the
  442. stripped file.
  443.  
  444. Registered users are supported via e-mail.  Send help requests and
  445. program suggestions to me at dwhawk@intcon.net
  446.  
  447. There are two places to register PMStripper.  Through BMT Micro and
  448. directly with the author.
  449.  
  450. Registration through BMT Micro:
  451.  
  452. BMT Micro will accept credit cards and will be more convenient for
  453. OS/2 users outside the United States.  BMT Micro's price to register
  454. PMStripper is $9.95 (US Dollars).  BMT Micro also has an FTP area
  455. where the registered version can be obtained after registration.
  456.  
  457.  
  458. Direct registration:
  459.  
  460. Stuff small bills, gold coins, diamonds or even checks (US banks
  461. only, please) valued at $9.95 (US dollars) into an envelope and mail
  462. to:
  463.  
  464. Don Hawkinson
  465. 4555 N Hillcrest
  466. Wichita KS, 67220-3832
  467. USA
  468.  
  469. PayPal registration is also available on the author's web site
  470. at http://www.cottagesoft.com/~dwhawk/share.html
  471.  
  472. Please don't send $100 bills (or larger) in the mail without
  473. purchasing full postal insurance.  Also, no change will be
  474. returned because it is absolutely unsafe, and unwise, to send cash
  475. through the mail.
  476.  
  477. PayPal registration is also available on the author's web site
  478. at http://www.cottagesoft.com/~dwhawk
  479.  
  480. The registered version of PMStripper will be distributed by 
  481. download from my web page, so make certain that your e-mail
  482. address is included with your registration fee.
  483.  
  484. Registered users will be notified of updates via e-mail.
  485.  
  486. Registration covers all 1.xx versions of PMStripper.
  487.  
  488.  
  489. Copyrights and trademarks remain the property of their owners.
  490.  
  491. Don Hawkinson
  492. dwhawk@intcon.net
  493.  
  494.  
  495.