home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-Update.iso / NEXTSTEP / connectivity / mail / bundles / HTMLConverter.1.0.README < prev   
Encoding:
Text File  |  1997-12-08  |  4.3 KB  |  82 lines

  1. This HTMLConverter bundle is designed to aid in the reading of HTML formatted emails.  This is
  2. done two ways, displaying and converting.  Displaying is done by saving the email to a file
  3. and then passing the filename to an HTML browser through services.  The filename is
  4. dynamically created to be different for each email reading.  All created files are deleted
  5. when the bundle restarts, so th at filenames can be reused.  If you quit and restart this
  6. bundle without doing the same for your Browser, the files will be cached and you will have to
  7. reload each page until you get to new filenumbers.  Converting is simply converting HTML tags
  8. into something that is less "visually annoying".  It does NOT display HTML.  It will convert
  9. any text to any other text.  So it can be used to convert more than just HTML. 
  10.  
  11. This bundle is very simple.  It does minimal data validation if any.  It expects you to have
  12. done the basic setup work.  The primary example is with the HTMLSavePathName default
  13. parameter.  The program doesn't add a "/" if you forget it, and it doesn't cr eate directories
  14. that don't exist.  And at startup, it doesn't delete all old files in that directory. 
  15.  
  16. To set HTMLConverter defaults, the following are the appropriate default preference
  17. information from "dread -o Mail".  None of these are required.  They can be set by typing
  18. "dwrite" followed by the dread information listed below.  Mail will have to be re started for
  19. these defaults to be read-in and used. 
  20.  
  21. ***** Displaying *****
  22. Mail HTMLDisplay YES
  23.     This causes the email text to be saved in a file in HTMLSavePathName.  That file is then
  24.     opened using the service defined in HTMLServiceName.  The default is YES. 
  25.  
  26. Mail HTMLSavePathName /tmp/<userName>/HTMLConverter/
  27.  
  28.     This is the name of the directory to save the temporary files used to display the HTML
  29.     in the Browser.  You must include the "/" at the end.  The directory must EXIST.  The
  30.     default is to save in /tmp/.
  31.  
  32. Mail HTMLServiceName "OmniWeb/Open URL"
  33.     The HTMLServiceName is the full name of the Services option to open a URL in a HTML
  34.     Browser.  The default is "OmniWeb/Open URL". 
  35.  
  36. ***** Converting *****
  37. Mail HTMLConvert YES
  38.     This causes HTML tags to be converted according to the HTMLMap.plist file found at
  39.     HTMLMapPathFileName.  The default is YES. 
  40.  
  41. Mail HTMLMapPathFileName ~/Library/Mail/HTMLMap.plist
  42.     This causes conversion to be based on a file from somewhere other than inside the
  43.     bundle wrapper.  The default is to look inside the bundle wrapper. 
  44.  
  45. The HTMLMap.plist file contains key/value pairs of the format:
  46. "key" = "value";
  47. If the semicolon is excluded, the remainder of the file will not be loaded.  The value can
  48. contain printf style formatting (like \n for newline). 
  49.  
  50.  
  51. To install / use any NeXTMail bundle, simply copy it into /LocalLibrary/Mail/ or
  52. ~/Library/Mail/ NeXTMail only accepts bundles in ONE of these locations.  Ok, it is more
  53. complicated than that, but this is the easiest way to get it working.  Once the bundle is in
  54. the "right" place, you will have to quit and restart Mail.  The bundle will take effect
  55. immeditely. 
  56.  
  57.  
  58. The idea for doing this was from one of my co-workers, Michael Pelz-Sherman <mps@is.com>.  He
  59. suggested making a bundle, I took it from there. 
  60.  
  61. Vivian Girel <vivian@lutetia.infodesign.ch> had a good suggestion of an alternative:
  62. You can also play with the Message/MIME menu to obtain a readable MIME alternative...
  63.  
  64.  
  65. This bundle is public domain.  It comes with no warranties or other guarantees.  Although it
  66. should work.  It is the independent work of the author and is not necessarily endorsed by my
  67. company, Integrity Solutions, Inc., it's management or owners. 
  68.  
  69. Send any questions, comments or humorous remarks to me Craig Laurent at cdl@is.com
  70.  
  71. ==========================================================
  72. General enhancements:
  73. -put "/" at end of HTMLMapPathFileName if it isn't already there.
  74. -create directories that don't exist for HTMLMapPathFileName.
  75. -find a way to un-cache pages from the Browser, or force a reload.
  76.  
  77. OpenStep/Rhapsody enhancement:
  78. Rather than a NXStringTable, use NSDictionaries.  Both could be put in the same file.
  79. Get text and rtf dictionaries.  copy text dict, then add values from rtf..this is the full rtf
  80. dictionary to use. 
  81. **Of course if it is true that Rhapsody TEXT objects can display HTML, this won't be needed then.
  82.