CaseLeaf

Handbook / The `reply` command

The reply command

A colleague has queried your comment and you want the answer to sit with it rather than in a thread nobody will find later.

Answers a mark, as a reviewer would. It keeps the exchange attached to the mark rather than scattered across email, so the document carries its own argument. Use it to respond to a comment without creating a second mark on the same words.

How you run it

caseleaf reply report.pdf --page 1 --index 2 --text "force majeure"

caseleaf reply report.pdf --page 1 --index 2 --text "force majeure" --as Reviewer

What each part means

In full, every part it will take:

caseleaf reply <file> --page <n> --index <n> --text <text> [--as <name>]
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.
--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. This command needs it, together with --index: the two name one mark between them.
--index Which mark on that page, counting from 0.
--text What the answer says, in quotation marks, for example --text "Agreed, amended in the next draft". It hangs off the mark being replied to rather than making a new one.
--as Whose name the mark is made in, as in --as Reviewer. Left out, whoever this machine belongs to, unless writing names has been turned off in Settings, and then the mark carries none.

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.

{
  "replied" : "4000-8000-000000000000",
  "to" : "4000-8000-000000000000"
}

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 "reply" on "/path/to/report.pdf" ¬
        options "--page 1 --index 2 --text \"force majeure\""
end tell

tell application "CaseLeaf"
    perform "reply" on "/path/to/report.pdf" ¬
        options "--page 1 --index 2 --text \"force majeure\" --as Reviewer"
end tell

All the commands · Asking from a script · Contents