Opening Files

Select File>Open or click in the toolbar to bring up a file-open dialog. Use it to navigate to the desired file. Guiguts loads the file chosen as a document and displays it in the window.

Guiguts also searches for a matching .bin file and opens it to obtain bookmark and other information about the file. Guiguts also scans the text for page-separator lines, unless this action has been disabled. See below for managing page separators and the .bin file.

While loading a file, Guiguts converts its line-end convention to that of the host operating system: to LF-only for Linux and Mac OS X, and to CR-LF for Windows. Thus when a file is saved, it always has the line-end convention of the host system.

Once a file has been opened, its name is pushed onto the list of ten recently-opened files below the Open command in the File menu, where it is convenient for opening another time. If you need to clear this list, you can do so by editing the settings file.

Saving the File

To save the current file select File>Save, key control-s, or click in the toolbar. Guiguts saves the file to disk, and also saves (or creates) its .bin file at this time. The Word Frequency and Gutcheck operations automatically save the file before running the external routines.

To save the file in a different folder or under a different name, use File>Save As. A file-save dialog opens. Navigate to the desired folder and enter the filename to use. Guiguts also saves a .bin file with the same filename in that folder.

When saving a copy of a file, you should always give it a filename that is unique in that folder. Do not try to save two Guiguts files with the same filename but different extensions in one folder; if you do, the .bin file of the one most recently saved will replace the .bin file of the other, causing errors and confusion.

Automatic Backup Files

Use Prefs>Toggle Auto Backups to cause Guiguts to preserve the three most recent versions of a file. When Auto Backups is enabled, and you save the file mybook.txt which already exists on disk, the existing file is renamed to mybook.txt.bk1. If mybook.txt.bk1 already exists, it is renamed to mybook.txt.bk2, and if mybook.txt.bk2 already exists, it is deleted.

Autosave

You can enable periodic auto-save using Prefs>Toggle Auto Save. Use Prefs>Auto Save Interval to set the period. Each time that period elapses, Guiguts saves the file. This ensures that you can't lose more than a few minutes of work to a system crash.

Caution: when you enable autosave and auto backups together, each autosave action creates a new generation of backup file. Thus the two backup levels (.bk1 and .bk2) will soon contain the last two autosaved versions.

Reverting to Saved

Unlike some editors, Guiguts does not have a "Revert to Saved" command in the File menu. However, you can revert to the last-saved version of the file by selecting the file's name in the File menu, re-opening it. If you have made changes, you are prompted to save the file first; just click the "No" button to reload the file, cancelling all changes since the save.

Clearing the Window

Select File>Clear or click in the toolbar to clear all data. If any changes have been made you are prompted to save the file first.

Inserting a File

Select File>Include to insert the entire contents of another file into the current document. A file-open dialog opens. Navigate to the desired file and click Open. The contents of the selected file are inserted at the current insertion point location. If there is a selection, the file data replaces it.

The insertion can be undone with Edit>Undo.

Page Markers and the .bin Metadata File

Many useful Guiguts features depend on knowing where the text from each page-image begins and ends. Initially, this data comes from the page-separator lines in the downloaded text file. These lines look like:
-----File: 007.png---\LarryBob\Flewts\-------------------------------------
When Guiguts loads a file and does not find a .bin file with the same name, it scans the text looking for these lines. If they exist, Guiguts records the page-image number and filename for every page, along with the names of the first- and second-round proofers.

The scan for page-separator lines can take several seconds, for a large file on a slow machine. If you do not want Guiguts to make this scan by default, you can disable it in the Preferences menu. You can request a scan for separators at any time using File>Set Page Markers.

The page-separator lines are not a permanent part of the book. Part-way through the post-proofing workflow you tell Guiguts to delete them. In order to be able to keep track of page-image boundaries after the visible separator lines have been deleted, Guiguts records the boundary points in a separate file called filename.bin. The .bin file also holds other "metadata" about the file, such as the bookmarks you have set. But the most important and voluminous data in the .bin file is a list of the page boundary locations as offsets in the text, along with the other data from the page separator lines.

The .bin file is written every time you save the file. When you move a file from one folder to another, you need to move its matching .bin file also. If you do not, Guiguts cannot load your bookmarks and data on page boundaries and proofers.

You can tell when Guiguts lacks page-boundary information: after the file is open and you click in it, the status bar should display the Page nnn and See Image buttons. If it does not, there was no .bin file or it was not readable.

If you lose the .bin file after you have cleared the page separator lines, there is no good way to recover the data. You can select File>Guess Page Markers, which generates some page boundaries at fixed intervals of text lines, but these are unlikely to correspond to the original pages.