Several computers, one shelf
Each computer with Parseh installed holds its own shelf and works alone. Pair two of them, and they keep each other up to date: a document you wrote on the laptop is on the desktop the next time both are on, a book narrated on the desktop is on the laptop. There is no server in between: the two talk directly, peer to peer, whenever both are on and can reach each other.
Use Settings → Devices on a computer or Settings → Your computers in the Android app.
1. Pairing#
On one computer, open Settings → Devices and press Show a code. A code such as KP4-R7M appears, with a QR code, the addresses this computer answers at and its fingerprint. On the other computer, open the same page, type the code and one of the addresses under Type a code shown on another computer, and press Pair.
- Fifteen minutes.
- The code lasts that long and is used once; Throw the code away ends it sooner.
- The fingerprint is optional.
- Typed too, it makes sure the computer you reach is the one whose screen you are reading.
- A name.
- Each computer has one, which its partners show; change it under This computer.
- Remove.
- It forgets a partner: from that moment the partner is refused, until you pair the two again. The partner is told, if it answers within a few seconds: its own page then says this computer removed it, with a button to remove it there too. If it does not answer, it is removed here all the same, and the page says it was not told.
A copied Parseh folder is not a new computer. A copy carries the identity of the computer it came from, so its partners cannot tell the two apart, and pairing the copy with the original is refused. On the copy, open Settings → Devices and press This is a copy of another computer: give it its own identity under This computer. It gets a new identity and keeps its name. Its list of partners is emptied, because those partners belong to the original; pair the copy with them again. The original is not changed. When Parseh sees that its identity was made on another machine, the page says so and offers the same button, or It is the same computer if you only moved your system to a new disk. It never changes the identity on its own.
Both computers must reach each other — the same Wi-Fi, or a VPN — through the third door on Settings → Network, Paired computers. It lets in only a computer paired with this one, never a browser, and it opens by itself when you show a code or pair a computer: you need not open the Wi-Fi door for sync. Shut it when you want this computer left alone; your partners stay paired, Settings → Devices says that sync from them is paused, and it resumes when you open the door again.
The installed Android app calls its paired computer to exchange changes in both directions. The computer needs to be reachable from the app. A browser on another device can also open the computer’s pages directly. From a phone or another computer.
2. Watching a sync#
Open Settings → Devices on a computer or Settings → Your computers in the app. During a sync the app’s hub shows progress too. The first sync says how many books, videos, documents and decks this device will keep. On a large shelf, Looking through this device’s shelf… means Parseh is checking what is here before comparing it with the partner.
Once the transfer starts, the bar names the item and counts how many there are, for example Receiving A Book Far Away · 3 of 12. During a large recording or film it also shows the bytes transferred. After the transfer, the line reports what changed. If the connection or the engine stops, open Parseh again with the partner available. It keeps the files and verified chunks already received and tells you when it resumes.
A sync is one line from its first step to its last, on both sides, and between two steps it says what it waits for: Getting ready to sync…, Waiting for the other computer… (or device), Saving. After a sync that was cut off, the line says Finishing a sync cut off earlier… while Parseh puts the last write right; its pages open meanwhile, and the next sync waits for it.
In the app’s notification#
On a phone or tablet, the Android app shows what Parseh does in the background in a notification with a bar: a sync, a file it fetches, a job a computer does for the device, and the device’s own long work — a reader being built, a book, video or backup being brought in, a speech pack, dictionary or the word analyzers being fetched, and the tidying after a start when it takes a while. A job on a computer says what the computer is doing, for example drawing 2 of 5… or transcribing…, with a bar where the computer counts. The app asks whether it may show notifications when you first pair it with a computer, and again at the first sync if you have not answered yet; refusing them changes nothing else.
3. What syncs, and what does not#
Sync compares units, and a unit is always taken whole:
- A studio document.
- Its text, its settings and its own pictures and recordings, together.
- A note
- beside a book or a video.
- A video’s own edited files.
- The transcript, its times, the glosses, the phrase notes, together — never half of one with half of the other.
- A book’s source
- , all its chapters together.
- An exercise of a deck, and a deck’s options.
- A prompt and a LaTeX theme.
- Your personal settings
- , one at a time: the theme, the levels of each language, the reading places.
This computer’s own settings never sync: the zoom, the port, the network doors, the certificate, the job switches, what it holds and its partners. Caches, downloaded models and dictionaries never sync either: each computer fetches its own.
Pictures, recordings and built pages are copied whole; they never change once written, so they cannot disagree.
Builds travel with their source. A book’s reader and its PDF, a studio document’s PDF and the drawings of its LaTeX blocks go to the other computer with the source they were built from. A computer without LaTeX — and, later, a phone — can therefore read a book, open a document’s PDF and see its drawings built elsewhere. A build is taken only when it was made from the very source that computer has; nothing is asked. A book this computer leaves out never brings its build either.
Additions to a list — a clip added to the tray, a chunk flagged to review later, a card in the Anki store — combine: each computer gets the other’s.
Exercise progress combines too. Different exercises studied on the two computers simply add up; the same exercise studied on both keeps the state of the most recent answer. A personal setting or a reading place changed on both keeps the most recent, with no question.
4. The choice#
A thing changed on one computer goes to the other, with no question. When it changed on both since they last agreed, sync stops for that one thing and asks. It never merges two versions.
- Two answers only.
- Keep this computer’s, or keep <partner>’s. There is no “keep both”.
- Until you answer.
- Each computer keeps working with its own version, and the rest syncs on.
- Asked once.
- The question comes up on whichever computer you open next, and is settled there for both. It is listed in Settings → Devices under Questions waiting, and a banner on the thing’s own page — the document, the video, the book, the deck — leads to it.
The choice page shows the diff before you press. Under each of the two buttons is what that button would throw away, as git would show it: lines taken out in red, lines added in green. Text gets a line-by-line diff, structured files the fields that differ, and a picture or a recording the name of the file put aside.
After you press, the same diff is offered as a file to download, and it stays in Settings → Devices → Diff files until you delete it. With it you can copy back by hand whatever you wanted from the side you did not keep.
5. Deletions are always asked#
A deletion never travels without a question.
- Deleted on the partner, untouched here.
- Delete it here too, or restore it on the partner.
- Deleted on the partner, edited here.
- Send the edited version everywhere, or delete it everywhere.
- Many at once.
- Deletions from one sync — the clip tray emptied, say — come as one question with the list: delete them all, restore them all, or go through them one by one.
A deleted thing never comes back by accident from a partner that still had it.
A video moved to another language#
A video whose language was changed is not a deletion and a new video: it travels as a move. The partner moves its own copy to the new language, takes only what changed (the video’s details and glosses — never its film again) and asks nothing; on a third computer the move arrives the same way. Only a copy changed on the partner since the two last agreed is not moved silently: the video comes under its new language, its film found on that computer rather than sent, and the copy under the old language is asked about, as above.
6. Making this computer identical to another#
Each partner in Settings → Devices has Make this computer identical to <partner>. It is meant for a computer Parseh was not opened on for a while, and for a computer just paired that holds nothing yet, which is offered it as its first sync.
- A summary first.
- It says how many things will be replaced, added and deleted here, and lists this computer’s own changes that will be lost. One button runs it.
- It goes one way.
- This computer takes the partner’s state; the partner is not changed.
- It touches the synced things only.
- This computer’s own settings, what it holds and its partners stay.
- Questions and jobs.
- Questions waiting here are answered in the partner’s favour; jobs this computer had waiting are listed in the summary and cancelled.
- Nothing lost silently.
- The lost changes are written as one diff file, and everything it replaced is kept for a day.
7. Undo for a day#
Every version a sync replaced or deleted on a computer — a change that came in, a choice, an answered deletion, “make identical” — is kept on that computer for one day. Settings → Devices → Kept for a day lists them, each with Put back. Put back, a version becomes this computer’s change and syncs like any other. After a day it is gone; the diff files stay.
8. While you edit#
A thing open in an editor — the studio editor, a video’s phrase editor, a note, an exercise’s form, a deck’s options — is not touched by sync until the editor is closed. Its incoming change waits; if both sides changed, the choice is asked once the editor closes. The other way round, while a sync is writing a thing, its editor says Sync is writing this just now and opens by itself a moment later.
9. Out of date#
A book’s reader or a studio PDF records the source it was built from. When the source has changed since — through sync or here — and no paired computer has a build of the new source, the build is marked Out of date on its page, with a button to build it again. Nothing rebuilds by itself: when the other computer rebuilds, its build arrives at the next sync and the mark goes by itself.
10. Jobs#
Heavy work — transcribing with Whisper, building a book, estimating or aligning times — can be lent: one computer sends the job, a partner that can do it does it, and the result comes back through sync. Two switches in Settings → Devices → Jobs decide it:
- Send heavy jobs to paired computers.
- A job this computer cannot do, or does slowly, goes to a partner that says it can.
- Accept jobs from paired devices.
- A partner’s job runs here.
Both are off on a fresh install, and a computer with both off still syncs. The page lists what this computer can run, and every job sent or taken, with its state; a job not finished can be cancelled there.
Where this computer cannot do the work, the button that starts it offers Send to <partner>, and the page then says Waiting for a computer, On <partner> or Done. A partner that goes silent gives the job back after two minutes; while nobody is reachable a job waits, and it never fails for that.
- Transcribing a video.
- The sound is recorded on this computer as always — a YouTube video’s sound is the tab’s, which a partner cannot fetch — and the recording travels to the partner’s Whisper. The transcript, with its word times, comes back into the add page’s usual review (Speech to text).
- A book out of date.
- Its mark’s Rebuild rebuilds that book there and then, or sends the build to a partner.
- A studio document’s PDF.
- On a computer without XeLaTeX, Build PDF — and Build again on a PDF marked out of date — offers Send to <partner>: the partner builds it, and the PDF comes back with the source it was built from, so it is not marked out of date.
- Estimating by the sound.
- The page follows the job for as long as it waits, past its usual two minutes.
- Exact word times.
- Transcribing with Exact word times on a computer that has Whisper but no aligner for the language offers Send to <partner> when a partner has one: the transcription runs here, the alignment there, and the review says where the times were made. Not now keeps Whisper’s own times.
- The graphics card or the CPU.
- A transcription sent to a partner runs on what you chose here; a partner without a graphics card ready uses its CPU, and the review says so.
- LaTeX drawings.
- A drawing another computer made travels as a build (above). One that no computer has made yet shows a frame saying this computer cannot make it; with Send on, the frame has Have a paired computer draw it, which sends every such drawing of the page as one job, and the page shows them once they are back.
11. What this computer holds#
A computer holds everything by default. Under What this computer holds you can leave a language out: nothing is deleted here, but this computer stops taking it. A thing left out shows as on <partner>, with a button to fetch it, and from then on it is held here again.
12. Sync is not a backup#
A deletion, once answered, travels to every paired computer. A mistake synced is a mistake on both. Keep backups as before — Settings → Backups and each shelf’s own Backup button (Backups): a backup is a copy that nothing changes afterwards, which sync is not.