318 lines · 6.3 KB · JSONRaw
{ "format_version": 1, "id": "highlight", "name": "Highlight", "plural": "Highlights", "picture": null, "builtin": false, "visibility": "owner", "engine": null, "columns": [ { "key": "book", "name": "Book", "type": "link", "link_to": "book", "required": true }, { "key": "book_title", "name": "Book", "type": "text", "computed": { "lookup": { "through": "book", "column": "title" } } }, { "key": "cover", "name": "Cover", "type": "photo", "computed": { "lookup": { "through": "book", "column": "cover" } } }, { "key": "text", "name": "Passage", "type": "longtext", "readonly": true, "required": true }, { "key": "note", "name": "Note", "type": "longtext", "placeholder": "Why you marked it" }, { "key": "colour", "name": "Colour", "type": "choice", "choices": [ "red", "yellow", "teal" ], "labels": { "red": "Red", "yellow": "Yellow", "teal": "Teal" }, "default": "yellow" }, { "key": "locator", "name": "Place", "type": "text", "readonly": true }, { "key": "progress", "name": "Where", "type": "number", "readonly": true, "units": { "one": "{n}%", "other": "{n}%" } }, { "key": "page_label", "name": "Page", "type": "text", "readonly": true }, { "key": "chapter", "name": "Chapter", "type": "text", "readonly": true }, { "key": "made_at", "name": "Marked", "type": "date", "readonly": true, "format": "calendar-datetime" }, { "key": "sent_by", "name": "Sent by", "type": "text", "readonly": true }, { "key": "sent_by_number", "name": "Sent from", "type": "text", "readonly": true }, { "key": "sent_at", "name": "Sent", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "send_id", "name": "Send", "type": "text", "readonly": true }, { "key": "book_author", "name": "Author", "type": "text", "computed": { "lookup": { "through": "book", "column": "author" } } } ], "title": "text", "date": "made_at", "project": null, "order": null, "slip": { "title": "text", "subtitle": "book_title", "trailing": "page_label", "photo": "cover", "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "text", "note", "book_title", "chapter", "page_label", "colour", "made_at" ] } ], "sort": { "column": "made_at", "descending": true }, "empty": { "title": "No highlights yet", "message": "Select a line while reading to keep it." }, "instructions": "One row per passage the owner marked while reading a book: the words as they stand in the book (text), the owner's note, the pencil it is underlined in (red, yellow or teal), and where it is. locator is a Readium Locator (JSON text): for an EPUB its href, progression and the text around it; for a PDF the page (href #page=N) and the selection's quads under locations.otherLocations.quads. progress (0 to 100) is how far through the book, page_label the printed page where the book has one, chapter its chapter's title. The reader writes every one and lays the highlight back on from its locator. Never make one by hand or change its text; Recolour sets colour, Note writes note, and Remove deletes it to unmark.", "card": { "face": "highlight.passage", "fields": [ { "slot": "quote", "column": "text" }, { "slot": "note", "column": "note" }, { "slot": "source", "column": "book_title" }, { "slot": "place", "column": "page_label", "line": "field.page" }, { "slot": "crumb", "column": "chapter" }, { "slot": "ink", "column": "colour" }, { "slot": "photo", "column": "cover" }, { "slot": "subtitle", "column": "book_author" } ] }, "groups": { "stack": "slips" }, "commands": [ { "id": "go_to", "label": "Open in book", "object": "page", "kind": "update", "method": "reader.open", "bindings": { "id": "book", "at": "locator" } }, { "id": "recolour", "label": "Recolour", "kind": "update", "verb": "update_record", "data": { "table": "highlight" }, "bindings": { "id": "$id" }, "pick": { "argument": "patch.colour", "kind": "text", "label": "Pencil" }, "receipt": "Recoloured", "object": "tag" }, { "id": "note", "label": "Note", "kind": "update", "verb": "update_record", "data": { "table": "highlight" }, "bindings": { "id": "$id" }, "pick": { "argument": "patch.note", "kind": "text", "label": "Note" }, "receipt": "Noted", "object": "slip" }, { "id": "remove", "label": "Remove", "kind": "delete", "verb": "delete_record", "data": { "table": "highlight" }, "bindings": { "id": "$id" }, "confirm": "Undo on the receipt brings it back.", "receipt": "Removed", "does": "destroys", "object": "bin" } ], "send": { "columns": [ "text", "note", "colour", "locator", "progress", "page_label", "chapter", "made_at" ], "same": [ [ "book", "text", "locator" ] ], "carry": { "book": [ "title", "author", "cover", "isbn", "ol_work", "ol_edition", "doi", "year", "language" ] } }}