Scripting: manipulation of annotations
By shab... on September 22, 2014 14:16 (imported from Google Code)
Add applescript support for querying, adding and deleting annotations for a given session.
API might include:
set sess to current session of current window
-- list access
set la to last annotation of sess
get every annotation of sess
-- query access
get every annotation of sess where text contains "cats"
get first annotation of sess where timestamp after '09:00:00' -- or however applescript does datetimes.
-- value extraction
get timestamp of la
get text of la
get line {number,content} of la
-- creation
make new annotation at current line of sess with data (timestamp: now, text: "I love ponies") -- except with more syntax.
make new annotation at {screen/absolute} line N of sess ...
-- editing
set text of first annotation of sess to 'I got changed!'
-- deleting?
delete every annotation of sess