Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Colorized Ruby Source Listings/Printing

Reply
Thread Tools

Colorized Ruby Source Listings/Printing

 
 
Patrick Hurley
Guest
Posts: n/a
 
      12-05-2005
I guess I am just old fashion, but sometimes when I am working on
piece of code (or just examining a nice bit of code), I like to print
it out so I can mark it up with fancy tools like my Pentel RSVP and
take it to the reading room.

So I query multitude: what tools do you use to print out your Ruby code?

Thanks


 
Reply With Quote
 
 
 
 
Tom Copeland
Guest
Posts: n/a
 
      12-05-2005
> So I query multitude: what tools do you use to print out your
> Ruby code?


RubyForge uses Enscript for colorizing; details are here:

http://tomcopeland.blogs.com/juniord...syntax_col.htm
l

and an example is here:

http://rubyforge.org/cgi-bin/viewcvs...?rev=1.2&cvsro
ot=rubygems&content-type=text/vnd.viewcvs-markup

Yours,

Tom



 
Reply With Quote
 
 
 
 
Jakub Hegenbart
Guest
Posts: n/a
 
      12-05-2005
Patrick Hurley wrote:
> I guess I am just old fashion, but sometimes when I am working on
> piece of code (or just examining a nice bit of code), I like to print
> it out so I can mark it up with fancy tools like my Pentel RSVP and
> take it to the reading room.
>
> So I query multitude: what tools do you use to print out your Ruby code?
>
>

Scite is quite fine for me...

Jakub


 
Reply With Quote
 
Neil Stevens
Guest
Posts: n/a
 
      12-05-2005
Patrick Hurley wrote:
> I guess I am just old fashion, but sometimes when I am working on
> piece of code (or just examining a nice bit of code), I like to print
> it out so I can mark it up with fancy tools like my Pentel RSVP and
> take it to the reading room.
>
> So I query multitude: what tools do you use to print out your Ruby code?


Vim can output highlighted text as html, which you could then print. It
ships with support for highlighting ruby, and the colors and styles it
uses for highlighting are fully configurable.

http://www.vim.org/

--
Neil Stevens -

'A republic, if you can keep it.' -- Benjamin Franklin
 
Reply With Quote
 
Keith Fahlgren
Guest
Posts: n/a
 
      12-05-2005
On Monday 05 December 2005 12:47 pm, Neil Stevens wrote:
> > So I query multitude: what tools do you use to print out your Ruby
> > code?

>
> Vim can output highlighted text as html, which you could then print.
> =A0It ships with support for highlighting ruby, and the colors and
> styles it uses for highlighting are fully configurable.
>
> http://www.vim.org/


Because it took me a while to figure out what Neil was saying, here's a=20
pointer in the right direction for the rest of us:

http://www.vim.org/scripts/script.php?script_id=3D330
(note that you can use the old 2html.vim if you don't want to install=20
anything).


PS: Thanks Neil, this is great!

HTH,
Keith


 
Reply With Quote
 
Patrick Hurley
Guest
Posts: n/a
 
      12-05-2005
On 12/5/05, Jakub Hegenbart <> wrote:
> Scite is quite fine for me...


FYI, I just notice scite has a -p command line option to print and
exit (if you do not use scite as your "regular" editor).

Thanks for the other suggestions as well (and I am still interested in
solutions that work for everyone else . I also got enscript
running, but since I am on a Windows box and without a native
postscript printer, I would need to push it through ghostscript or
firefox to get it printed.


 
Reply With Quote
 
Nikolai Weibull
Guest
Posts: n/a
 
      12-05-2005
Neil Stevens wrote:

> Patrick Hurley wrote:


> > I guess I am just old fashion, but sometimes when I am working on
> > piece of code (or just examining a nice bit of code), I like to
> > print it out so I can mark it up with fancy tools like my Pentel
> > RSVP and take it to the reading room.
> >=20
> > So I query multitude: what tools do you use to print out your Ruby
> > code?


> Vim can output highlighted text as html, which you could then print. I=

t
> ships with support for highlighting ruby, and the colors and styles it
> uses for highlighting are fully configurable.


And I=E2=80=99m working on providing an XML-based generic output-format t=
hat can
then be converted to whatever format you want (and in any unit you might
want as well) through XSLT. I=E2=80=99m primarily doing this to be able =
to
output stuff for inclusion in ConTeXt documents, but transforming it to
HTML will be just as easy.

nikolai

--=20
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


 
Reply With Quote
 
Nikolai Weibull
Guest
Posts: n/a
 
      12-05-2005
Keith Fahlgren wrote:

> On Monday 05 December 2005 12:47 pm, Neil Stevens wrote:


> > Vim can output highlighted text as html, which you could then print.
> > =A0It ships with support for highlighting ruby, and the colors and
> > styles it uses for highlighting are fully configurable.


> Because it took me a while to figure out what Neil was saying, here's
> a pointer in the right direction for the rest of us:
>=20
> http://www.vim.org/scripts/script.php?script_id=3D330


This is probably not the thing he was talking about. Just issue

:source $VIMRUNTIME/syntax/2html.vim

in the buffer that you want to turn into highlighted HTML. Issue

:help 2html.vim

to get more information.

> (note that you can use the old 2html.vim if you don't want to install
> anything).


Seeing as how the script linked to above hasn't seen an update since
August, 2003, it is in fact the old 2html.vim. Bram last touched the
distributed syntax/2html.vim in February, 20005.

nikolai

--=20
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


 
Reply With Quote
 
Brian Schröder
Guest
Posts: n/a
 
      12-05-2005
On 05/12/05, Patrick Hurley <> wrote:
> I guess I am just old fashion, but sometimes when I am working on
> piece of code (or just examining a nice bit of code), I like to print
> it out so I can mark it up with fancy tools like my Pentel RSVP and
> take it to the reading room.
>
> So I query multitude: what tools do you use to print out your Ruby code?
>
> Thanks
>
>


You can use this:

xemacs -nw -eval '(htmlize-file "$<" "$@")' -kill

where $< is the infile $@ is the outfile. I do an additonal
postprocessing script to turn the css inlined in the header into an
external css.

hope to help,

Brian
--
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/


 
Reply With Quote
 
Gene Tani
Guest
Posts: n/a
 
      12-05-2005

Patrick Hurley wrote:
> I guess I am just old fashion, but sometimes when I am working on
> piece of code (or just examining a nice bit of code), I like to print
> it out so I can mark it up with fancy tools like my Pentel RSVP and
> take it to the reading room.
>
> So I query multitude: what tools do you use to print out your Ruby code?
>
> Thanks


TMTOWTDI (but not as bad as python)

http://rubyforge.org/projects/syntax/
http://neugierig.org/software/ruby/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Three Stooges: Colorized! One-Shot Scot DVD Video 6 06-16-2004 04:51 AM
colorized movie on tv tonight Waterperson77 DVD Video 9 12-24-2003 08:59 AM
Colorized blocks behind the icon text on the desk board Wilms Computer Support 0 12-22-2003 09:27 PM
Colorized blocks behind the icon text on the desk board. Wilms Computer Support 0 12-21-2003 04:47 PM
F/T THE Longest Day colorized dvd-r john33907@comcast.net DVD Video 1 08-18-2003 02:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57