I've tried to design a general format for the textfile that keeps things open for expansion, but will hopefully just let me write the parser code once and then not have to worry about it again. Any 'seasoned' coder will probably start laughing at this point ...
So, just to re-iterate: all the files required for a presentation should be collected into a folder. This folder is the "root" as far as the presentation is concerned: any and all filenames you'll specify in the script should be relative to this.
Comments are denoted by hash (#) symbols. You can use this at the beginning of a line (making the whole line a comment) or you can use it after some actual instructions (so you can comment individual commands, if you like).
Ignoring comments and formatting, the parser will load the script file and look for commands. This may be as simple as:
beep
If a command takes any extra parameters, these should be included in curly brackets following the command:
jpeg
{
filename = TestJPEG
}
As you can guess, this allows for many parameters:
jpeg
{
filename = TestJPEG
style = scaled
bgcolour = black
}
You'll see in the command reference later that many such parameters are optional.
On the whole, the parser is quite forgiving with formatting, tabs, spaces and case sensitivity. So you should be able to format things as feels best to you. For example, all these are valid:
jpeg
{
filename = TestJPEG
}
jpeg {
filename=TestJPEG
}
jpeg{filename=TestJPEG}
Note, though, that if you have multiple parameters inside curly brackets then these must be on separate lines. For the time being, anyway.
And that about sums it up for structure. Easy, eh?
Next I'll walk you through writing a simple script.
Previous: Introduction to advanced usage
Next: Your first script
