;; htmlize.el -- HTML-ize font-lock buffers ;; Copyright (C) 1997,1998,1999,2000 Hrvoje Niksic ;; Author: Hrvoje Niksic <hniksic@xemacs.org> ;; Keywords: hypermedia, extensions ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; This package analyses the text properties of the buffer and ;; converts them, along with the text, to HTML. Mail to ;; <hniksic@xemacs.org> to discuss features and additions. All ;; suggestions are more than welcome. ;; To use, just switch to a buffer you want HTML-ized, and type `M-x ;; htmlize-buffer'. After that, you should find yourself in an HTML ;; buffer, which you can save. Alternatively, `M-x htmlize-file' will ;; find a file, font-lockify the buffer, and save the HTML version, ;; all before you blink. Even more alternatively, `M-x ;; htmlize-many-files' will prompt you for a slew of files to undergo ;; the same treatment. `M-x htmlize-many-files-dired' will do the ;; same for the files marked by dired. ;; The code attempts to generate compliant HTML, but I can't make any ;; guarantees; I haven't yet bothered to run the generated markup ;; through a validator. I tried to make the package elisp-compatible ;; with multiple Emacsen, specifically aiming for XEmacs 19.14+ and ;; GNU Emacs 19.34+. Please let me know if it doesn't work on any of ;; those, and I'll try to fix it. I relied heavily on the presence of ;; CL extensions, especially for compatibility; please don't try to ;; remove that dependency. ;; When compiling under GNU Emacs, you're likely to get oodles of ;; warnings; ignore them all. For any of this to work, you need to ;; run Emacs under a window-system -- anything else will almost ;; certainly fail. ;; The latest version should be available at: ;; ;; <URL:http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el> ;; ;; You can find the sample htmlize output (run on an older version of ;; `htmlize.el') at: ;; ;; <URL:http://fly.srk.fer.hr/~hniksic/emacs/htmlize.html> ;; ;; Thanks go to: ;; * Ron Gut <rgut@aware.com>, for useful additions (hooks and ;; stuff); ;; ;; * Bob Weiner <weiner@altrasoft.com>, for neat ideas (use of ;; rgb.txt and caching color strings); ;; ;; * Toni Drabik <tdrabik@public.srce.hr>, for a crash course to ;; CSS1. ;; ;; * Peter Breton <pbreton@ne.mediaone.net>, for useful suggestions ;; (multiple file stuff) and dired code. ;; ;; * Thomas Vogels <tov@ece.cmu.edu> and Juanma Barranquero ;; <barranquero@laley-actualidad.es> for contributing fixes. ;; ;; * A bunch of other people for sending reports and useful ;; comments. ;; ;; TODO: Should attempt to merge faces (utilize CSS for this?). ;; Should ignore invisible text. Should expand TABs. ;; User quotes: "You sir, are a sick, sick, _sick_ person. :)" ;; -- Bill Perry, author of Emacs/W3