Your files¶
A manuscript is a folder on your device. You can read it, back it up, and open it with another program.
On a Mac, new manuscripts go in Imparfait Manuscripts, in your Documents folder, unless you chose another folder. File › Open or Create Project… Cmd+O opens a manuscript from any folder, and File › Open Recent lists the last ones.
What is in the folder¶
imparfait.yaml |
The manuscript's title and identity, and how it numbers its titles |
manuscript/index.txt |
The order of the files of text |
manuscript/section_….html |
Your text, one passage per line |
manuscript/enrichments.json |
Your comments, if you have any |
world/ |
Each sheet you wrote in, in a folder of its own named by its id, written like manuscript/; and the moodboards, once you make any |
sources/notes/ |
Each note, in a folder of its own, written the same way |
| Hidden folders | Imparfait's own working state and your versions. Leave these alone |
Each file starts with a line that says it is UTF-8, so that another editor or a browser shows its accents. Then each passage is a line of simple tags:
<meta charset="utf-8">
<p id="p_1" kind="description">Maëlle pushed the door open with her shoulder.</p>
Editing outside Imparfait¶
What another program changes is read as if you had typed it: a date or a known name it brings is proposed, as for your own writing.
You can change those text files with another editor, a tool or a script, with Imparfait open or closed. Imparfait notices when the file is saved.
By default what changed arrives as suggestions, signed “external file”, for you to accept or refuse. The bottom bar says Files changed: and how many suggestions. So nothing is overwritten while you work, and you can keep writing.
To let these changes go straight into the text, go to Settings › Appearance › Files changed outside Imparfait and choose Directly. This is a setting of this device. It applies at once, and to what changed while Imparfait was closed.
Formatting changed in a file may not come through. If so, the bottom bar says Files changed: formatting of so many passages could not be applied.
When a file is set aside¶
Imparfait refuses to guess when it doesn't understand a file. It sets it aside: nothing from it is applied, and the bottom bar says 1 file set aside, with Review. Whichever setting you chose, this happens when:
- the file can't be read as simple tags, or isn't valid text;
- the file is missing;
- most of a long file changed at once;
- the suggestion marks were edited by hand. Accepting or refusing goes through the app.
Review says why, since when and by what, and asks which one to keep:
- Keep the file · as suggestions takes in what it says, for you to go through, even if you chose to take files in directly. Only for a file that reads but changed too much at once.
- Open the file shows it, when it can't be read, for you to see what is wrong and fix it.
- Keep Imparfait's version · rewrite the file goes back to what the manuscript says. What the file said is gone from the folder.
- Compare first shows the manuscript with that file as it stands beside the manuscript as it is, then brings you back to choose. It isn't offered for a file that no longer reads.
Nothing is lost until you choose. Your text in Imparfait stays as it was, and the file stays as you wrote it. Fixing the file settles it too, and you can leave the manuscript in the meantime. With several files set aside, nothing from any of them comes in until each is settled.
A file kept beside its own¶
Sometimes Imparfait can neither take a file in nor write over it: too much of a file changed at once, a file can't be
read, a file changed while Imparfait was writing the files, or a folder has no record of being written in a project
other copies hold too. The band and Review it say which. Then it keeps your text, and renames the other
file beside it (name.set-aside-….html). Nothing is lost, and you learn it once:
- While you write, a band at the top of the text says The file of … was set aside., why, and that your text is unchanged, with Review it and Later. If it happened somewhere not open, a short message says so, with Review.
- While opening, after a recovery, Imparfait first says how many files were set aside, and why, with Later and Review them.
- Until you look at it, the bottom bar says 1 file set aside. Review there lists them in To look at. On a phone, the top of ⋯ says it.
Review it says why, when, how far apart the two are (in passages and words) and the file's name, then:
- Compare shows the manuscript with that chapter as the file has it, beside the manuscript as it is (a chapter only).
- Take it in · as suggestions brings the differences in as suggestions, to accept or refuse one by one.
- Keep it aside leaves the file where it is. It leaves the list, and stays in Storage.
- Delete it… asks once, then deletes the file. Your text is not touched.
- Open the file and Show in Finder (Show in Explorer on Windows). On a phone, Share the file… instead.
A set-aside file is never part of the text, the export or the word count, and Imparfait never deletes one on its own.
When Imparfait's working copy is damaged¶
Beside your files, Imparfait keeps a working copy of its own. If it's gone or can no longer be read, the manuscript doesn't open, and Home says Imparfait's working copy is damaged, with what you keep (text, formatting, references, comments, saved versions) and what you lose (undo, who typed what since the last version, decisions not yet in a version).
Rebuild from the files moves the damaged copy aside, without deleting it, and opens the manuscript. It then becomes a manuscript of its own: other copies of it no longer sync with it. Click beside the dialog to leave it for now.
When your account still has the project, because it is kept online or another of your devices holds it, the card offers two choices instead. Get it back from your account brings back the same project, in step with your other devices: only what was typed here since it was last saved online can be missing. The damaged project is first set aside whole, never deleted, in the damaged-copies folder beside your projects, and Home says where; the project shows on Home as coming until its text is here. Rebuild from its files rebuilds it as above, as a project of its own.
Sheets and notes¶
A sheet or a note is written as the manuscript is: its text in section_….html files, in world/<its id>/ for a sheet and
sources/notes/<its id>/ for a note, with its own index.txt and its comments in enrichments.json. Its name is not in
them: Imparfait shows it above the text. You can edit these files with another app, as those of the manuscript: what you
change comes back into the sheet or the note as if you had typed it, and the tags on the words you left alone stay. Notes,
like the rest of your sources, are not in your versions; sheets are.

