CaseLeaf

Handbook / The `anchor` command

The anchor command

The meeting that settled this clause was recorded, and you want the paragraph to carry the minute it was settled at.

Writes down that a mark belongs to a moment in a recording. When a document is gone through in a recorded meeting, this ties the passage to the point where it was argued: the mark, the recording carried inside the document, and how many seconds in. anchors lists what a document holds, and cue takes one back to the sound.

How you run it

caseleaf anchor report.pdf --recording meeting.m4a --at 41 --page 1 --index 0

What each part means

In full, every part it will take:

caseleaf anchor <file> --recording <name> --at <seconds> [--mark <id> | --page <n> --index <n>] [--in <docid>]
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.
--recording The name of a recording already carried inside the document. attachments lists what is there.
--at How far into the recording the moment is, in seconds. --at 41 is forty-one seconds in, and --at 41.5 is as good, since a sentence rarely begins on a whole one. Negative is refused.
--mark Which mark to anchor, by the identifier marks prints for it. Use this or --page with --index, not both.
--page Which sheet, counting from 1, so --page 4 is the fourth sheet as it sits in the file, whatever number is printed on it. Needed with --index unless you name the mark outright with --mark; either way round names one mark.
--index And which mark on that page, counting from 0.
--in The identity of the document the mark is in, when that is not this one. It is what identity prints for it. A recording that runs across several documents keeps all its anchors with the audio, and this is how one of them says the mark is elsewhere. Left out, the mark is in this 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.

{
  "anchored" : "4000-8000-000000000000",
  "anchors" : 1,
  "at" : 41,
  "recording" : "meeting.m4a"
}

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 "anchor" on "/path/to/report.pdf" ¬
        options "--recording meeting.m4a --at 41 --page 1 --index 0"
end tell

All the commands · Asking from a script · Contents