On Wed, 24 Nov 2004 07:47:03 +0900 jim / freeze.org wrote: > * Brian Schröäer <ruby / brian-schroeder.de> [2004-11-24 04:38:41 +0900]: > > > > I particularly liked the clean colorization of the ruby code. What did you use > > > (and what color style) to convert the Ruby code to HTML? > > > > I use xemacs' htmlize package to convert the ruby-code to html. Then I include a stylesheet. (You can copy that from my page if you want) > > > > htmlize: $(patsubst %.rb,browse/%-rb.html,$(wildcard *.rb)) > > > > browse/%-rb.html: %.rb > > mkdir -p browse/unsuccessfull > > xemacs -nw -eval '(htmlize-file "$<" "$@")' -kill && \ > > mv $@ $@.temp && \ > > cat $@.temp | ruby -e 'puts $$stdin.read.gsub(/<style type="text\/css">.*<\/style>/m, "<link id=\"css\" href=\"../ruby.css\" rel=\"stylesheet\">")' > $@ && \ > > rm $@.temp > > Thanks. Uhh, sorry to be so dense, but (not being an emacs person) it > appears that htmlize-file.el is not part of the xemacs distro and I'm not > sure what version to get. Also, it would be great if you could provide a > command line example without the make cipher added. The obvious: > > xemacs -nw -eval '(htmlize-file "myfile.rb")' -kill > > doesn't seem to work. > Hello Jim, I installed htmlize as part of the debian package emacs-goodies-el - Miscellaneous add-ons for Emacs In your example you forgot the output file. It should be xemacs -nw -eval '(htmlize-file "myfile.rb" "myfile-rb.html")' -kill Or you can try it interactively open a ruby file in xemacs C-x C-f myfile.rb htmlize the buffer M-x htmlize-buffer save the file C-x C-s myfile-rb.html Make shure that you have turned font-lock on, such that the file is fontified in xemacs. HTH, Brian -- Brian Schröäer http://www.brian-schroeder.de/