htmlize converts buffer text and the associated decorations to HTML. It is typically used to htmlize syntax highlighting created by font-lock mode, but can be used for any kind of Emacs buffer.
The latest release is 1.38, but the package is now available as a git repository with a web viewer at: http://fly.srk.fer.hr/~hniksic/cgit.cgi/htmlize/ A detailed description follows, copied from the source code: ;; This package converts the buffer text and the associated ;; decorations to HTML. Mail to <[email protected]> to discuss ;; features and additions. All suggestions are more than welcome. ;; To use it, just switch to the buffer you want HTML-ized and type ;; `M-x htmlize-buffer'. You will be switched to a new buffer that ;; contains the resulting HTML code. You can edit and inspect this ;; buffer, or you can just save it with C-x C-w. `M-x htmlize-file' ;; will find a file, fontify it, and save the HTML version in ;; FILE.html, without any additional intervention. `M-x ;; htmlize-many-files' allows you to htmlize any number of files in ;; the same manner. `M-x htmlize-many-files-dired' does the same for ;; files marked in a dired buffer. ;; htmlize supports three types of HTML output, selected by setting ;; `htmlize-output-type': `css', `inline-css', and `font'. In `css' ;; mode, htmlize uses cascading style sheets to specify colors; it ;; generates classes that correspond to Emacs faces and uses <span ;; class=FACE>...</span> to color parts of text. In this mode, the ;; produced HTML is valid under the 4.01 strict DTD, as confirmed by ;; the W3C validator. `inline-css' is like `css', except the CSS is ;; put directly in the STYLE attribute of the SPAN element, making it ;; possible to paste the generated HTML to other documents. In `font' ;; mode, htmlize uses <font color="...">...</font> to colorize HTML, ;; which is not standard-compliant, but works better in older ;; browsers. `css' mode is the default. ;; You can also use htmlize from your Emacs Lisp code. When called ;; non-interactively, `htmlize-buffer' and `htmlize-region' will ;; return the resulting HTML buffer, but will not change current ;; buffer or move the point. _______________________________________________ gnu-emacs-sources mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
