ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Removed Areas > Python

Book: Invent Your Own Computer Games with Python

<< < (2/3) > >>

ewemoa:
Thanks for the suggestion.

ewemoa:
I've thought about the GeSHi suggestion a bit.  IIUC, GeSHi is PHP-based, so I don't think it's likely to work for an off-line version of the book.  Does that sound right?  Silly me :)

Unfortunately, the formatting of the source for this book seems to be accomplished using list tags instead of pre or code tags, so it doesn't look trivial to convert.

Deozaan:
Al knows script-fu (he uses something like AHK), and uses a search & replace tool with regex capabilities. With that in mind, the main thing that I think would be hardest in the conversion would be preserving the line numbers, since he often just shows little clips of code from the middle but uses the same line numbers as from the source code. i.e. he'll show a snippet of just lines 9 and 10 but I think GeSHI would just automatically label them 1 and 2.

ewemoa:
script-fu
-Deozaan (June 13, 2010, 12:15 PM)
--- End quote ---
Is this something other than the GIMP-related thing?  Or perhaps some other kind of meaning altogether?

...the main thing that I think would be hardest in the conversion would be preserving the line numbers, since he often just shows little clips of code from the middle but uses the same line numbers as from the source code. i.e. he'll show a snippet of just lines 9 and 10 but I think GeSHI would just automatically label them 1 and 2.

--- End quote ---
Good point.

FWIW, I came across this:

  http://qbnz.com/highlighter/geshi-doc.html#starting-line-numbers

Deozaan:
script-fu
-Deozaan (June 13, 2010, 12:15 PM)
--- End quote ---
Is this something other than the GIMP-related thing?  Or perhaps some other kind of meaning altogether?-ewemoa (June 14, 2010, 12:59 AM)
--- End quote ---

I'm not sure what script-fu has to do with GIMP. I was just trying to make it sound like martial arts kung-fu.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version