Cotton code
204 lines · 5.0 KB · JSONRaw
{  "views": [    {      "id": "reading",      "label": "Reading",      "visibility": "owner",      "is_default": true,      "read": {        "table": "book",        "where": {          "status": "reading"        },        "empty": {          "line": "empty_views.books.reading",          "table": true        }      },      "sort": {        "column": "position_at",        "descending": true      },      "picture": "open_book"    },    {      "id": "want_to_read",      "label": "Want to read",      "visibility": "owner",      "is_default": false,      "read": {        "table": "book",        "where": {          "status": "want_to_read"        },        "empty": {          "line": "empty_views.books.want_to_read",          "table": true        }      },      "sort": {        "column": "added_on",        "descending": true      },      "picture": "ribbon"    },    {      "id": "finished",      "label": "Finished",      "visibility": "owner",      "is_default": false,      "read": {        "table": "book",        "where": {          "status": "finished"        },        "empty": {          "line": "empty_views.books.finished",          "table": true        }      },      "sort": {        "column": "finished_on",        "descending": true      },      "head": {        "period": "this_year",        "line": "list.this_year",        "goal": {          "table": "face_settings",          "row": "reader",          "column": "year_goal",          "line": "list.this_year_of_goal"        }      },      "picture": "banded_book"    },    {      "id": "stopped",      "label": "Stopped",      "visibility": "owner",      "is_default": false,      "read": {        "table": "book",        "where": {          "status": "stopped"        },        "empty": {          "line": "empty_views.books.stopped",          "table": true        }      },      "sort": {        "column": "position_at",        "descending": true      },      "picture": "slipped_book"    },    {      "id": "highlights",      "label": "Highlights",      "visibility": "owner",      "is_default": false,      "read": {        "table": "highlight",        "empty": {          "line": "empty_views.books.highlights",          "table": true        }      },      "sort": {        "column": "made_at",        "descending": true      },      "picture": "pencil"    },    {      "id": "on_phone",      "label": "On this phone",      "visibility": "owner",      "is_default": false,      "read": {        "table": "book",        "where": {          "on_phone": [            "kept"          ]        },        "empty": {          "line": "empty_views.books.on_phone",          "table": true        }      },      "sort": {        "column": "position_at",        "descending": true      },      "acts": [        "export_library"      ],      "head": {        "line": "list.on_phone",        "here": {          "not_backed_up": "list.on_phone_not_backed_up"        }      },      "lists_before": true,      "picture": "keypad_phone"    },    {      "id": "all",      "label": "All",      "visibility": "owner",      "is_default": false,      "read": {        "table": "book"      },      "sort": {        "column": "title",        "descending": false      },      "picture": "book_pile"    }  ],  "id": "books",  "name": "Books",  "purpose": "The books you read here, mean to read and have read, and the passages you marked.",  "picture": {    "photo": "photo:4f2bf442c6575038c717c5dc906758c1f19a12f9cc790866fd3ad11b2eb8c83e"  },  "card_stock": "cream",  "tables": [    "book",    "highlight",    "vault_key"  ],  "instructions": "Books keeps the owner's reading: one book row per book (an EPUB or a PDF they read in the app, or a shelf entry with no file) and one highlight row per passage they marked. Reading, Want to read, Finished and Stopped are views by status: Reading and Stopped the last opened first, Want to read the last added first, Finished the last finished first; All is every book by title; Highlights lists the marked passages, newest first; On this phone the books this phone keeps. Lists are record groups of books. Start and finish a book with its Start reading and Finished acts (the object stamps the day and counts the reading), find one by name with find_book, and bring a Goodreads library with import_goodreads. Never guess a date, a page or a rating the owner did not give, and never write a highlight or a reading position by hand.",  "automations": [],  "acts": [    {      "id": "account_sign_in",      "label": "Sign in",      "object": "arrow"    },    {      "id": "account_back_up",      "label": "Sync now",      "object": "cycle"    },    {      "id": "account_sign_out",      "label": "Sign out",      "object": "send"    },    {      "id": "export_library",      "label": "Export library",      "object": "parcel"    }  ],  "author": {    "device": "cotton",    "name": "Cotton"  },  "signature": null}