[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Export to HTML in CLI?
From:       "Greg Rundlett" <greg.rundlett () gmail ! com>
Date:       2009-01-09 13:42:39
Message-ID: 5e2aaca40901090542udbb8554kb0ec1310f1471c2e () mail ! gmail ! com
[Download RAW message or body]

On Fri, Jan 9, 2009 at 6:54 AM,  <root@kinqpinz.info> wrote:
> I mean to take advantage of the source code highlighting capabilities. If I
> have a PHP document I'm working on, I can export to HTML to preserve, among
> other things, coloring. Is this possible from the command line?
>
> Thanks.

Here are a few options:

If you want to use PHP to output a syntax-highlighted (using HTML)
version of your source, see
http://us3.php.net/manual/en/function.highlight-string.php
http://us3.php.net/manual/en/function.highlight-file.php

If you just want people to view your source files, also see the phps
configuration option for the webserver (where any file ending with the
extension ".phps" is returned to the browser as syntax-highlighted
rather than parsed by mod_php)

If you have more languages than PHP, HTML, CSS, JS; and/or you want to
do something integrated with an existing blog/cms/wiki; and/or want to
leverage existing work rather than re-inventing the wheel, I'd
recommend GeSHi
http://qbnz.com/highlighter/

There is also gnu enscript

Note too: many projects from MediaWiki to Drupal to WebSVN have
modules that incorporate one or more of these approaches.

wow, I guess I'm kinda a highlighting junkie

-- 
Greg Rundlett
Web Developer - Initiative in Innovative Computing
http://iic.harvard.edu
m. 978-764-4424
o. 978-225-8302
skype/aim/irc/twitter freephile
http://profiles.aim.com/freephile
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic