w e b c p p
Web C Plus Plus - about
[ home | aboot | samples | download | documentation | resume | links | credits | feedback | donate | project page ]

Frequently Asked Questions
What is webcpp?
What else does it do?
Who is it for?
Colour or color?
How do I install webcpp?
      Unix executable (.run)
      Unix source tarball
      Linux binary tarball
      Linux source RPM
      Windows installer
How do I use webcpp?

What is webcpp?
Web C Plus Plus is a command line utility that takes your source code, and converts it into an HTML file using a fully customizable syntax highlighting engine and colour schemes. This is useful if you want to post your code online and make it easier to read, or to make online programming tutorials.

Here are the languages webcpp currently supports:
Language Filter
C Source*.c,*.rc
C++ Source*.cc,*.cpp,*.cxx
C/C++ Header*.h,*.hh,*.hpp,*.hxx
Cg (NVidia)*.cg
CLIPS (Nasa)*.clp
Perl Script*.cgi,*.pl,*.plx,*.plex,*.pm
PHP Script*.inc,*.php,*.php3
Python Script*.py,*.pyw
Unix shell*.sh
Well that's great, Jeffrey! What else does it do?
Here's list of the features:

  • Syntax highlighting

  • Colour schemes loaded from a file

  • Automatically generated Cascading StyleSheets

  • A choice between embedded CSS or external stylesheet
  • Automatic filetype detection for higlighting

  • Allows to force the filetype for highlighting

  • Integration with other command-line tools via input and output piping

  • The ability to add the line numbers

  • The ability to jump to any line number via line anchors

  • The ability of hyperlinking to lines of code and external files

  • Generic support for unknown text based files

  • Who is it for?
    If you're a programmer, and you'd like to make online programming tutorials or post coloured code examples on the web, then webcpp may be the thing for you.

    Webcpp runs on Unices (such as GNU/Linux and FreeBSD), and on Windows 95 and up.

    Jeffrey, how come you keep spelling color like that?
    In Canada we spell "color" as "colour".
    How do I Install webcpp?
    Webcpp is available on many platforms, and comes in a variety of formats.

    1. To install from the executable gzipped installer (UNIX) :

    [you@yourshell yourdir]$ sh webcpp-(VERSION)-setup.run

    2. To install from the source* tarball (UNIX) :

    [you@yourshell yourdir]$ tar -xzvf webcpp-(VERSION)-src.tar.gz
    [you@yourshell yourdir]$ cd ./webcpp-(VERSION)-src
    [you@yourshell yourdir]$ ./configure && make
    [you@yourshell yourdir]$ su [requires to enter root password]
    [you@yourshell yourdir]$ make install
    3. If you've downloaded the binary tarball (UNIX) :
       (this only unpacks webcpp to ./webcpp-(VERSION)-(platform) directory, not a real "install")
    [you@yourshell yourdir]$ tar -xzvf webcpp-(VERSION)-(freebsd/linux).i386.tar.gz

    4. If you have the source* rpm version, you're lucky, it's very easy (UNIX) :

    [you@yourshell yourdir]$ su [requires to enter root password]
    [you@yourshell yourdir]$ rpm --rebuild webcpp-(VERSION).src.rpm

    5. If you've downloaded the zipped installer (Windows) :

    First you need winzip or something similar. If you do...great! Just unzip webcpp-(VERSION)-win.zip and run Setup.exe. Then you can point and click your way through the friendly installer.

    *NOTE: in order to compile webcpp you will need the C++ compiler, g++ version 3.0 or later, from gcc3.

    How to use webcpp:
    To use webcpp, type the following format to the command line (without any brackets):
     webcpp <infile> <outfile> [options...]
    where <infile> is the name of your source file to read, and <outfile> is the name of the HTML file to create, and [options...] are optional (see options table).

    Options can be parameters to pass to webcpp (such as scheme files or filetype forcing), but options can also be switches to turn features on or off. There are also options that are special switches to use in place of filenames that make webcpp do some very neat tricks, and make it a handy, "must-have" tool.

    Options Table
      -c=<scheme>        Use a webcpp colour scheme.
      -w=<scheme>        The works, same as -m -l -a -h -c=<scheme>.
      -i=<filename>      Use an image for the background.
      -x=<extension>     Force the filetype for syntax highlighting.
      -X,--external-css  Generate an external stylesheet.
      -w,--the-works     The works (sans scheme) -m -l -h -a.
      -l,--line-numbers  Print the line numbers in the left margin.
      -a,--anchor-lines  Create anchors to line numbers.
      -h,--hyperinclude  Create hyperlinks to #include files (C/C++).
      -t,--tabs-spaces   Convert tabs to spaces (use for Opera).
      -m,--made-with     Show made with webcpp footer.
      -A,--auto          Automatic naming in place of the output file.
      - ,--pipe          Use STDIN or STDOUT in place of the filename.

    Detailed information on using webcpp is available in the webcpp user's manual.

    Ada : Asm : Asp : Basic : Batch : C : C# : C++ : Cg : Clips : Emf : Euphoria : Fortran : Haskell : HTML : Java : Javascript : Modula : ObjC : Pascal : PB6 : Perl : PHP : Python : RenderMan : Ruby : Shell : SQL : Tcl : UnrealScript : VHDL
    Hosted by SourceForge Webcpp Copyright ©2001-2005 Jeffrey Bakker under the GNU GPL (General Public License)