[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Printing ruby code

Zakaria

3/16/2006 3:41:00 AM

Hi,

What is the best way/tools to printing ruby code to a piece of paper
with:
1. method index
2. line number
3. syntax highlight
?.

Regards,


-- Zakaria
z4k4ri4@gmail.com Yahoo!: z4k4ri4
http://zakaria.is-...
http://pemula.l...
Mau invite gmail? japri aja.


8 Answers

Joel VanderWerf

3/16/2006 4:49:00 AM

0

Zakaria wrote:
> Hi,
>
> What is the best way/tools to printing ruby code to a piece of paper
> with:
> 1. method index
> 2. line number
> 3. syntax highlight
> ?.

I don't know how this compares with the a2ps version, but here's
something by Mike Wilson using enscript:

http://rubyforge.org/cgi-bin/vi...*checkout*/support/ruby.st?rev=1.1

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


lists

3/16/2006 5:03:00 AM

0


On Mar 15, 2006, at 9:41 PM, Zakaria wrote:

> Hi,
>
> What is the best way/tools to printing ruby code to a piece of paper
> with:
> 1. method index
> 2. line number
> 3. syntax highlight
> ?.
>
> Regards,
>
>
> -- Zakaria
> z4k4ri4@gmail.com Yahoo!: z4k4ri4
> http://zakaria.is-...
> http://pemula.l...
> Mau invite gmail? japri aja.
>

This is just off the top of my head, so it may not suit your needs
but here goes: If you happen to use Vim, you could convert the ruby
file to an html file with the :TOhtml command, then open the html
file in a web browser and print it. I'm sure that other text editors
can do something like this as well.

-Ryan


Ken Collins

3/16/2006 5:10:00 AM

0

> This is just off the top of my head, so it may not suit your needs
> but here goes: If you happen to use Vim, you could convert the
> ruby file to an html file with the :TOhtml command, then open the
> html file in a web browser and print it. I'm sure that other text
> editors can do something like this as well.

That's kind of what I was going to recommend. I use a Drupal blog
with VIM perl modules installed in the blog and on my server to
syntax color code, ruby included.

- Ken


James Herdman

3/16/2006 6:47:00 AM

0

I can't quite help you with your question directly (I just print from
Textmate -- not colour coded), but for those of you looking to print
code in their Wordpress powered blogs, I've been using Code Snippet
(http://blog.enargi.com/co...). Although it doesn't officially
support Ruby, if you move Ruby script from the Geshi folder (a required
dependency) into your Code Snippet directory, you'll be made in the
shade.

James Herdman

Gregor Kopp

3/16/2006 2:27:00 PM

0

http://rd.cycnus.d...
Take a closer look, i find it useful!


Zakaria schrieb:
> Hi,
>
> What is the best way/tools to printing ruby code to a piece of paper
> with:
> 1. method index
> 2. line number
> 3. syntax highlight
> ?.
>
> Regards,
>
>
> -- Zakaria
> z4k4ri4@gmail.com Yahoo!: z4k4ri4
> http://zakaria.is-...
> http://pemula.l...
> Mau invite gmail? japri aja.
>
>

Patrick Hurley

3/17/2006 5:25:00 PM

0

On 3/15/06, Zakaria <z4k4ri4@gmail.com> wrote:
> Hi,
>
> What is the best way/tools to printing ruby code to a piece of paper
> with:
> 1. method index
> 2. line number
> 3. syntax highlight
> ?.
>
> Regards,
>
>
> -- Zakaria
> z4k4ri4@gmail.com Yahoo!: z4k4ri4
> http://zakaria.is-...
> http://pemula.l...
> Mau invite gmail? japri aja.
>
>

When stuck in Win32 land you can also check out using the scite editor:

scite -p <fname>

Gets you 2 and 3, but no method index.


pth


conwaycaine

12/17/2010 6:48:00 PM

0


"William Clark" <wclark2@colnospamumbus.rr.com> wrote in message
news:wclark2-AFB8C9.16431816122010@charm.magnus.acs.ohio-state.edu...
> In article <9umdnYzWxsqf2pfQnZ2dnUVZ_vidnZ2d@giganews.com>,
> "conwaycaine" <conwaycaine@bellsouth.net> wrote:
>
>> "William Clark" <wclark2@colnospamumbus.rr.com> wrote in message
>> news:wclark2-99D0A3.10313116122010@charm.magnus.acs.ohio-state.edu...
>> > "conwaycaine" <conwaycaine@bellsouth.net> wrote:
>>
>> > I live here - there are cretins like Freddie everywhere, unfortunately.
>> > However, a large land mass has it advantages in that regard.
>>
>> Where (approximately) do you live in the US?
>
> Just right of the middle.

In the thick of it, then.............


William Clark

12/17/2010 10:59:00 PM

0

In article <en1ng69jc086tqhvel4gdpmtp0bjk5flil@4ax.com>,
Fred J. McCall <fjmccall@gmail.com> wrote:

> William Clark <wclark2@colnospamumbus.rr.com> wrote:
>
> >In article <83olg69l6c5dg2cueg7k88r8n2o4v0ai0l@4ax.com>,
> > Fred J. McCall <fjmccall@gmail.com> wrote:
> >
> >> William Clark <wclark2@colnospamumbus.rr.com> wrote:
> >>
> >> >In article <6ddkg6lukb999vrotts35a7gh0l7ma94i5@4ax.com>,
> >> > Fred J. McCall <fjmccall@gmail.com> wrote:
> >> >
> >> >> William Clark <wclark2@colnospamumbus.rr.com> wrote:
> >> >>
> >> >> >In article <638kg6plfgsdmm63b1ekicctskds43forh@4ax.com>,
> >> >> > Fred J. McCall <fjmccall@gmail.com> wrote:
> >> >> >
> >> >> >> William Clark <wclark2@colnospamumbus.rr.com> wrote:
> >> >> >>
> >> >> >> >In article <ut1jg61it5b3lftddal2sh97t0tr79cavi@4ax.com>,
> >> >> >> > Fred J. McCall <fjmccall@gmail.com> wrote:
> >> >> >> >
> >> >> >> >> William Clark <wclark2@colnospamumbus.rr.com> wrote:
> >> >> >> >>
> >> >> >> >> >In article <3ISdndkCWedjQZXQnZ2dnUVZ_tKdnZ2d@giganews.com>,
> >> >> >> >> > "conwaycaine" <conwaycaine@bellsouth.net> wrote:
> >> >> >> >> >
> >> >> >> >> >> "Westprog" <westprog@hottmail.com> wrote in message
> >> >> >> >> >> news:ieadcj$fh$1@news.datemas.de...
> >> >> >> >> >> > William Clark wrote:
> >> >> >> >> >> >> "conwaycaine" <conwaycaine@bellsouth.net> wrote:
> >> >> >> >> >> >
> >> >> >> >> >> > It's not that the British or Irish tests are that good -
> >> >> >> >> >> > it's
> >> >> >> >> >> > that
> >> >> >> >> >> > most
> >> >> >> >> >> > US
> >> >> >> >> >> > tests appear to be barely driving tests at all. They test
> >> >> >> >> >> > the
> >> >> >> >> >> > ability
> >> >> >> >> >> > to
> >> >> >> >> >> > start the car and manouevre it in a circle.
> >> >> >> >> >>
> >> >> >> >> >> A bit more to the driving and written tests than that.
> >> >> >> >> >> Most sober Americans do very well when it comes to safety.
> >> >> >> >> >> Those who have taken to the drink cause most of our problems.
> >> >> >> >> >
> >> >> >> >> >I am scared of drunk drivers - we all should be. What is more
> >> >> >> >> >worrying,
> >> >> >> >> >though, is that I am almost equally scared of sober ones in the
> >> >> >> >> >US.
> >> >> >> >> >Too
> >> >> >> >> >many of them are just that incompetent, and ignorant of their
> >> >> >> >> >own
> >> >> >> >> >short
> >> >> >> >> >comings..
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >> Feel free to go back wherever it is you're more comfortable and
> >> >> >> >> stay
> >> >> >> >> there...
> >> >> >> >
> >> >> >> >That would be anywhere that a cocky little git like you isn't.
> >> >> >> >
> >> >> >>
> >> >> >> So why are you still here, again?
> >> >> >
> >> >> >Because you are nothing more than hot air on the Usenet.
> >> >> >
> >> >>
> >> >> And you have an affinity for hot air, do you?
> >> >>
> >> >> I can see why, since it seems to be all there is to you. However, the
> >> >> fact that you think we have something in common (we don't) doesn't
> >> >> make you my friend...
> >> >
> >> >No, it is you and Conway that "have something in common", But don't
> >> >worry, the secret you two share is safe with me.
> >> >
> >>
> >> Jealousy is *such* an ugly emotion, Willie...
> >
> >No, thank you, I don't play on that side of the fence. But I am broad
> >minded, so each to his own.
> >
>
> Of course you don't. Is it lonely there in that closet all by
> yourself?

Well, last time I peeked in there, it contained someone who looked just
like you. Quelle surprise!