Cotton code
214 lines · 4.0 KB · JSONRaw
{  "format_version": 1,  "id": "book",  "name": "Book",  "plural": "Books",  "picture": null,  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "title",      "name": "Title",      "type": "text",      "required": true,      "placeholder": "The book's title"    },    {      "key": "author",      "name": "Author",      "type": "text",      "placeholder": "Who wrote it"    },    {      "key": "cover",      "name": "Cover",      "type": "photo"    },    {      "key": "status",      "name": "Status",      "type": "choice",      "choices": [        "to_read",        "reading",        "read"      ],      "labels": {        "to_read": "To read",        "reading": "Reading",        "read": "Read"      },      "default": "to_read"    },    {      "key": "started_on",      "name": "Started",      "type": "date"    },    {      "key": "finished_on",      "name": "Finished",      "type": "date"    },    {      "key": "pages",      "name": "Pages",      "type": "number",      "units": {        "one": "page",        "other": "pages"      }    },    {      "key": "current_page",      "name": "On page",      "type": "number"    },    {      "key": "rating",      "name": "Rating",      "type": "number",      "units": {        "one": "{n} of 5",        "other": "{n} of 5"      }    },    {      "key": "notes",      "name": "Notes",      "type": "longtext",      "placeholder": "What stayed with you"    },    {      "key": "quote",      "name": "Favourite quote",      "type": "longtext",      "placeholder": "A line you kept"    },    {      "key": "note",      "name": "Note",      "type": "text",      "placeholder": "In a few words"    }  ],  "title": "title",  "date": "finished_on",  "project": null,  "order": null,  "slip": {    "title": "title",    "subtitle": "author",    "trailing": "status",    "photo": "cover",    "toggle": null  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "cover",        "title",        "author",        "status"      ]    },    {      "heading": "Reading",      "columns": [        "started_on",        "finished_on",        "current_page",        "pages",        "rating"      ]    },    {      "heading": "Notes",      "columns": [        "note",        "quote",        "notes"      ]    }  ],  "sort": {    "column": "title",    "descending": false  },  "empty": {    "title": "No books yet",    "message": "Add a book you are reading, have read or mean to read."  },  "instructions": "One row per book the owner is reading, has read or means to read: its title and author, its cover, a status (to_read, reading, read), the day it was started and finished, how many pages it has and the page the owner is on, a rating out of 5 and notes. Move a book along by changing its status and the matching date; never guess a date, a page or a rating the owner did not give.",  "card": {    "face": "book.jacket",    "pages": [      "notes"    ],    "fields": [      {        "slot": "photo",        "column": "cover"      },      {        "slot": "title",        "column": "title"      },      {        "slot": "subtitle",        "column": "author"      },      {        "slot": "used",        "column": "current_page"      },      {        "slot": "limit",        "column": "pages"      },      {        "slot": "date",        "column": "finished_on"      },      {        "slot": "count",        "column": "rating"      },      {        "slot": "quote",        "column": "quote"      },      {        "slot": "note",        "column": "note"      },      {        "slot": "state",        "column": "status",        "only": [          "to_read",          "reading",          "read"        ]      },      {        "slot": "started",        "column": "started_on"      },      {        "slot": "body",        "column": "notes"      }    ],    "offers": [      "book.jacket",      "book"    ]  }}