Table of Contents

Download

ILF can be downloaded as a Zip file from the following link:

Download Interlinear Formatter version 0.3 (5.0KB)

The current source is also available as a Git repository.

About ILF

ILF (the InterLinear Formatter) is a simple Python script that formats interlinear texts (ILs) into HTML files. These tables can then be pasted into a Web page. The script also has an option to output MediaWiki-formatted tables.

Usage

ILF is a very simple program. It currently has very little error-checking capability. The program expects the IL to be in a specific format. Each line should begin with a marker. These markers are:

All of these markers (except for \i, which is my own addition), are used by SIL Toolbox (Windows-only). All of the markers except \t are optional, and any line without a marker will be considered the same as \f.

ILF does not break long lines itself. If the lines are too long, then the generated table will be too wide for the screen. I'm working on this.

The older version of this script simply added the output to the main script page. The new Python version actually has options! The command to run ILF is as follows:

python ilf.py [-i|--input] input_file [-o|--output] output_file [-w|--wiki]

Non-Windows users can also run the script directly, using "./ilf.py". The options are as follows:

If you want to add styles to the ILs, the simplest way is to define CSS style rules for each row. Each row is defined as a separate class, "il_t" for \t lines, "il_m" for \m, etc. The IL as a whole can be referenced as "#interlinear". As of version 0.2, a basic CSS file is included.

License

Copyright © 2005-2009 Michael Potter

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Changes


© 2005-2009 Michael Potter
Home | Personal Page | IdzonWiki