usage: socrates.py [options] pages.soc

options:
  -h, --help            show this help message and exit
  -f, --fullscreen      run in fullscreen mode
  -t, --timer           display a timer
  -p, --pagecount       display page numbers
  -s STARTPAGE, --startpage=STARTPAGE
                        start at page N (default 1)


Socrates takes a textfile containing the presentation as a series of pages.
A relatively simple example is in examples/demo
Some more complicated examples can be found at 
http://codingweasel.googlecode.com/svn/trunk/talks/2006/

These pages are seperated by lines consisting only of three dashes, 
ie. '---\n'

Pages can have a directive on the first line. These begin with a !
No directive is the same as "!TEXT". The character after the directive
is used to split the directive line into arguments. Traditionally this
is | or !. Rest of docs use |. Flags are seperated by whitespace, and
are either 'FOO' or 'FOO=BAR'

A normal text page
    !TEXT|FLAGS

    Flags can be 
        AUTO=<float> - page will autoadvance to the next page after
        <float> seconds.
        NOFOOTER - don't display footer image
        UNICODE - page is in UTF-8

    Each line in the Text page is displayed on screen. 
    Lines starting with a # are ignored
    Lines can start with one or more special characters. These include:
        = display as a title 
        * display in bold
        < or > smaller or bigger (can have multiple)
        - "hidden". Each 'next' will display another hidden line
        : display in codefont (fixed width)
        / display line in italics
        \ no more special characters will be parsed on this line
    
    
Display an image:
    !IMG|filename.png|Image Title|FLAGS

    Flags can be 
        AUTO=<float> - page will autoadvance to the next page after
        <float> seconds.
        NOFOOTER - don't display footer image

Display a text file:
    !CODE|filename.txt|Page Title|FLAGS

    Flags can be 
        AUTO=<float> - page will autoadvance to the next page after
        <float> seconds.
        HILITE - page is in highlight mode.
        SKIPHASHBANG - don't display the leading #! line
        NOFOOTER - don't display footer image

    Config used:
        bold_font           - title
        code_font           - code text
        code_fgcolour       - code text
        code_bgcolour       - background behind code text
        code_hilitecolour   - highlighted code text
        code_font_size      - maximum font size for code text
                              (this will be reduced to fit code to the screen)

    If a line ends with the comment '#--' then it will not be displayed. It
    and subsequent '#--' lines will be replaced by a single line with
    elipses. This is used to remove chunks of code that may have been
    repeated from a prior slide.

    In highlight mode, lines that end with '#00' are displayed in a
    different colour (Config.code_hilitecolour). Also a line starting with
    '#=00' followed by some text will be used to set the page title.

    Subsequent sections (#01/#=01, #02/#=02, &c=) are displayed with each
    'next'.

Spawn a command
    !SPAWN|command --foo bar|FLAGS

    Flags can be 
        PAUSE - presentation will not advance automatically to next page
        until you hit 'next' again.
        REPEAT - if you re-visit the spawn page, it will re-run the command
        (the default is to only run it once, no matter how many times you 
        visit the page)

    Hitting Ctrl-C on a page will stop all background spawned tasks

Interactive shell
    !SHELL|Page title|shellprompt|FLAGS
    
    Flags can be
        AUTO - start in autotyping mode

    The rest of the lines in the page are inputs to autotyping.
    <TAB> in autotyping mode fills the rest of the line.
    Ctrl-I switches on/off autotyping.
    shift-return or tab finishes current line
    Lines ending in "\" will prompt for more input before passing
    to the shell. 
    Output from the shell goes to the window (stdout/stderr). You
    can't send input to commands interactively (yet). 
    Ctrl-C interrupts a running command.

Interactive Python
    !PY|Page title|FLAGS

    Flags can be 
        SYSVER - display the python version guff
        AUTO - start in auto-typing mode

    The rest of the lines in the page are inputs to autotyping.
    Ctrl-I switches on/off autotyping.
    shift-return or tab finishes current line

Config section
    !CONFIG

    Lines in config section set options in bruce.config.Config

    They're processed on the fly, mostly. Some are global and affect
    earlier pages. Damn. Needs to be fixed when they do.

    Can specify colours as "(R,G,B)" or "R,G,B"

    Config options: (TBD)
        footer_image - path to an image displayed at bottom of page
        footer_align - left, center|centre, right

Stop processing
    !STOP

    Everything else in the file is ignored

Comments
    !IGNORE
    !COMMENT

    This page is entirely skipped
