HowTo: The "Priorview" preview utility
Background and principles
Priorview is a small utility that provides a preview function for use with OmegaT. For the background and principles, refer to the Preview Howto. This HowTo describes the use of Priorview for Windows and Linux. If you are using Mac OSX, you can download a version of Priorview for Mac here. The Mac OSX version is not yet documented and the information below does not apply to it.
To use Priorview on Windows or Linux, you need the following:
1. A browser, specifically either:
- Firefox together with the "ReloadEvery" add-on for Firefox
Install Firefox first (if you do not already have it installed), then ReloadEvery.
- (Download from the links provided; Linux users may prefer to install from their distribution's repositories, where this is possible)
2. A conversion utility, specifically either:
Almost any current version of Tcl/Tk will probably be suitable, but you must have both Tcl (the scripting interpreter) and Tk (the graphical component).
To install Priorview, simply unpack the zip archive at any suitable location on your hard drive. To launch Priorview, open a command prompt/terminal/console and type in:
where path is the full pathname of the folder in which you placed preview.tcl. Then type in:
You can simplify launching by writing a script file, i.e. a plain-text file containing these two lines.
All being well, Priorview should appear when launched as described above. On this, select:
- the name of the target file (in /target in your OmegaT project);
- the browser you have installed;
- the frequency with which the script is to check whether this file has changed (polling interval);
- the file conversion utility that you have installed.
When you have selected all of these, the Start button appears. When actuated, this launches your browser with a dummy page instructing you to set the automatic refresh function, which you should then do, and then to hit Ctrl+s, Ctrl+d in OmegaT to launch automatic updating of the browser.
Whilst Priorview is running, you can:
- interrupt and restart it;
- select a new file (if you are working in a project containing several files, you do not have to relaunch Priorview when you reach the end of one file; you can simply select the next);
- change the polling interval.
Once Priorview has been launched, however, you cannot select a different browser or conversion utility; these options are therefore hidden after launch. To select a different browser or conversion utility, you must close Priorview and relaunch it.
The Quit button closes Priorview and also deletes the temporary files that it creates. (Other methods of closing Priorview will not delete the temporary files.)
A European Commission press release (in .odt format) in OmegaT and below it the instantaneous target text displayed in Opera. Bottom right: the Priorview utility. The layout shown here is just for the sake of example; you can of course arrange the windows as you like.
If the path to the location of priorview.tcl contains spaces, put it in quotes, e.g.:
cd "C:\My Files\priorview"
If Priorview fails to launch:
Depending upon the version of Tcl/Tk that you have installed, you may have to add the version number to the wish command, e.g.:
Pay attention to lower/upper case.
If the file displayed in the browser is not being updated, check the following:
- That you are remembering to hit Ctrl+s, Ctrl+d in OmegaT. Until/unless you do, there will be no changes to detect/display!
- That the file conversion utility is installed properly and is working. You can test this with the relevant command below on the command line (terminal/console/DOS prompt). In each case, file is the name of a .docx or .odt file. If all is well, an .html version of the file will be produced:
abiword --to=html file
For LibreOffice+Unoconv:br/> unoconv -f html file
- That you have set the auto-refresh interval in the browser.
Copyright Marc Prior 2012