CaseLeaf

Handbook / The `move` command

The move command

A mark was made on the wrong page, or belongs in a different document entirely, and the replies and links attached to it have to follow it there.

Moves a mark to another page, or another document, keeping its identity. A reply written before the move, and a caseleaf:// link pointing at the mark, still find it afterwards - which is the whole reason to reach for this rather than deleting the mark and drawing a new one where it belongs.

How you run it

caseleaf move report.pdf --mark 958D81B1-BDCA-4091-BD2A-A7F0554309A1 --page 2

What each part means

In full, every part it will take:

caseleaf move <file> --mark <id> --page <n> [--to <other.pdf>]
part what it is for
<file> The PDF to work on, as a path, such as report.pdf beside you, or the full path to it. This command writes to it, so keep a copy if the original matters.
--mark The mark to move, by the identifier marks prints for it.
--page Where it goes, counting sheets from 1. Of --to's document when one is given, of this one otherwise, so --page 4 alone moves the mark to the fourth sheet of the file you named.
--to Another document to move the mark into, as a path. Left out, the mark moves to another page of the same document; given, both files are written and the mark leaves this one for good, taking its thread, its links and its group with it.

The mark keeps its id, its thread, its links and its group — a reply written before the move, or a caseleaf:// link pointing at it, still finds it. Both files are written when --to names a second document.

What comes back

Asked of a short sample document, it answers as below. The sample has eight sheets, a highlight and a note left by a reviewer, a web link, a small table, two pictures and one form field already filled in.

{
  "from" : {
    "file" : "report.pdf",
    "page" : 1
  },
  "moved" : "8C7A21E0-0000-4000-8000-000000000000",
  "to" : {
    "file" : "report.pdf",
    "page" : 2
  }
}

The same thing from AppleScript

Everything above can be asked for from a script instead. There is one AppleScript command, perform: on names the document, and options takes the rest exactly as you would type it.

tell application "CaseLeaf"
    perform "move" on "/path/to/report.pdf" ¬
        options "--mark 958D81B1-BDCA-4091-BD2A-A7F0554309A1 --page 2"
end tell

All the commands · Asking from a script · Contents