CaseLeaf

Handbook / The `history` command

The history command

A document has been through three departments and somebody asks what was done to it, and in what order.

Prints the record of what was done to the document, and nothing else. This is how you answer what happened to this file, and in what order, even after it has passed through several hands. It is deliberately narrow: no marks, no text, no metadata, just the ledger.

A document only keeps a history once it has an identity, because a history has to belong to something. note gives it one as it writes the first entry, and identity --mint gives it one on its own; until then the operations still happen and nothing is recorded of them.

How you run it

caseleaf history report.pdf

What each part means

In full, every part it will take:

caseleaf history <file>

The document, and nothing else.

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.

{
  "history" : [

  ]
}

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 "history" on "/path/to/report.pdf"
end tell

All the commands · Asking from a script · Contents