Gutterpress proof

Markdown & CSS, typeset for printOpen source · by Dimm City

Keep versions and back up your work

The status control

The status bar has one status control, on the left after the book switcher. It shows whether your edits are saved and where the book stands in its online copy: Saving…, Saved on this computer, Saved · Backed up, Saved · Backing up…, Saved · Not backed up yet, Saved · Offline — backs up when you're back, Saved · Sign in to back up, Saved · Backing up paused, Unsaved changes, Couldn't save or Versions need attention. A shape beside the words (a check, a cloud, a warning) says the same thing without colour.

Click it to open Setup → Online copy, the one place for everything below. It has three cards:

If the book is a plain folder, the status card offers Turn on version history instead. Save now stays on Ctrl+S (Cmd+S on a Mac) and the editor's Save button.

See what each version changed

Click the status control, then Browse versions in the Version history card (or click one of the versions listed there). Version history opens as a screen of its own:

Go back to an earlier version

  1. Open Version history as above and select the version you want.
  2. Click Restore this version at the top.
  3. Click Restore. Gutterpress saves your current work as a version first, so nothing is lost.

Version history: the versions on the left, each with the files it changed, and the selected one's changed files on the right

Your online copy

An online copy keeps your book and all its versions on GitHub (or another Git server). It backs up on its own, and changes your collaborators make arrive on their own. Setup → Online copy says in one line where the book is kept, and offers the one next step:

GitHub and other Git servers can also be signed in to, edited and removed on the Accounts page, which lists every account saved on this computer.

Revisions

A revision is a separate line of work in the same book: a "Second edition", an "Editor's pass". Setup → Online copy lists the book's revisions under Revisions. Each row has the revision's name, says You're working on this for the open one (always first; the rest follow by name), and says where it is kept:

The card shows five revisions, the open one first; Show all lists the rest. With more than five, a Find a revision field above the list narrows it as you type.

Each row has Switch (except the open one) and a ⋯ menu with Rename… (every revision) and Delete… (every revision but the open one). Rename, Delete and New revision each open a small dialog that says what will happen before it happens:

New revision, in the card's header, asks for a name (spaces become hyphens), starts the revision from your book as it is now (saving any work not in a version yet first), and opens it. It goes online the next time you back up. If the online copy can't be checked, the list says so and shows the revisions on this computer.

Setup → Online copy: where the book is kept, its last version, and its revisions

Set up an online copy for a book you started here

  1. Click the status control, then Keep this book safe online…. This opens Setup → Online copy.
  2. If the book is a plain folder, click Turn on version history first. The online copy holds the versions Gutterpress keeps, so it needs them.
  3. Click Connect GitHub… if GitHub isn't signed in yet, and enter the code shown on the GitHub page that opens.
  4. Choose where the book goes:
    • The Name of the online copy starts as your book's title and you can change it. Private: only you can see it is on by default.
    • Or click Use an empty one you already made on GitHub and pick one from the list. Empty online copies are listed. To make one, click Open github.com to create one… and leave "Add a README" off (GitHub calls it a repository).
  5. Click Back up to GitHub. Gutterpress sends the book and all its earlier versions to the online copy. When it finishes, the status bar shows Saved · Backed up and the book works like one opened from GitHub.

If something goes wrong, Gutterpress says what happened in plain words and leaves your book as it was. The common cases:

Settings → Saving has the switches: Save changes automatically, Keep version history and Back up online automatically.

Back up to another Git server

Gutterpress also backs up to GitLab, Gitea, Forgejo, Bitbucket, Azure Repos and other Git servers, over their https:// address. It doesn't create online copies there, so the book starts from one that already exists on the server:

  1. Put the book on your server with your usual Git tool, or download one that is already there.
  2. Open the book's folder in Gutterpress, then Setup → Online copy. It names the server the book's online copy is on.
  3. Create an access token on that server, paste it under Access token (with your Username if the server needs one) and click Sign in. The token is checked with the server before it is saved. For a server Gutterpress recognises, Create an access token on … opens the page that makes one; for any other, How to make an access token opens this section.

To save a server's token before you open a book, use Add a Git server… under Other Git servers on the Accounts page; Edit there replaces it later.

Where each server makes its tokens:

If backing up keeps failing

Once a book's online copy can back up, the status card in Setup → Online copy ends with a collapsed Backing up keeps failing?, with these tools:

Repair and Start over each ask once more before they run. If GitHub stopped accepting your sign-in, use Sign in again… beside GitHub on the Accounts page; its Test sign-in checks the sign-in itself, while Test connection here checks this book's online copy.

Get and send changes yourself

To get changes from the online copy and send yours only when you choose, turn off Back up online automatically in Settings. The status bar then shows two buttons next to the status:

Get latest and Sync now in Setup → Online copy do the same. While automatic backing up is off, Gutterpress checks for new changes in the online copy every few minutes and when you come back to the window. When it finds some, Get latest reads New online, Sync is highlighted, and a message says New changes are online for this book, with a Get latest button. In Reader mode none of this shows: a reader gets the latest changes on their own.

When your changes and the online copy overlap

If you and someone else edited the same passage, getting the latest changes combines both sides in the file and tells you so: Two takes of a passage were kept in chapter-02.md — yours and the online copy's. Choose which to keep in the editor, with a Review button. Nothing is lost, but the book will not export until you choose.

  1. Click Review, or open the Problems list from the editor toolbar. Each passage with two takes is listed as Two takes; click one to open its file.
  2. A card above the text asks, one passage at a time, which take you want to keep: Keep yours, Keep online or Keep both. The editor scrolls to that passage, and the preview shows both takes in the page, each in a labelled box, so you can read either one as it would print. Compare the text shows the two texts in the card, with the words only one side has marked (two takes that differ only in spacing say so). With several passages, the count and arrows in the card's corner move between them.
  3. Click your choice. The file is updated right away, the card moves on to the next passage, and a message confirms it with an Undo button. Keep both puts your take first and the online copy's take after it, as two paragraphs.

When the last passage in a file is settled, a message offers the Next file that has one. Undo in the text (Ctrl+Z, or Cmd+Z on a Mac) also brings both takes back. Stylesheets work the same way, rule by rule, and so does the book's settings file: while manifest.yaml holds two takes of a setting the preview shows This book's settings have two takes instead of a page, and comes back on its own once you choose.

If a passage's two texts look nothing alike, someone online may have rewritten or removed paragraphs above it, so the two sides are offset by a paragraph from there on. Keep the same side all the way down the chapter, or keep both and tidy the text afterwards.

A picture or other file that cannot hold two takes is kept as two files instead, the online one named cover.online.png beside your cover.png. Keep the one you want and delete the other from the Files list.

Next: settings, updates and getting help.