Cotton code
290 lines · 5.6 KB · JSONRaw
{  "format_version": 1,  "id": "film",  "name": "Film",  "plural": "Films",  "picture": null,  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "title",      "name": "Title",      "type": "text",      "required": true,      "placeholder": "The film's or series' title"    },    {      "key": "year",      "name": "Year",      "type": "text",      "placeholder": "2019"    },    {      "key": "poster",      "name": "Poster",      "type": "photo"    },    {      "key": "file",      "name": "Film",      "type": "file"    },    {      "key": "kind",      "name": "Kind",      "type": "choice",      "choices": [        "film",        "series"      ],      "labels": {        "film": "Film",        "series": "Series"      },      "default": "film"    },    {      "key": "status",      "name": "Status",      "type": "choice",      "choices": [        "watchlist",        "watched"      ],      "labels": {        "watchlist": "To watch",        "watched": "Watched"      },      "default": "watchlist"    },    {      "key": "watched_on",      "name": "Watched",      "type": "date"    },    {      "key": "rating",      "name": "Rating",      "type": "number",      "units": {        "one": "{n} of 5",        "other": "{n} of 5"      }    },    {      "key": "notes",      "name": "Notes",      "type": "longtext",      "placeholder": "What you thought of it"    },    {      "key": "minutes",      "name": "Length",      "type": "number",      "format": "duration",      "units": {        "one": "minute",        "other": "minutes"      }    },    {      "key": "director",      "name": "Director",      "type": "text",      "placeholder": "Who directed it"    },    {      "key": "recommended_by",      "name": "Recommended by",      "type": "link",      "link_to": "person"    },    {      "key": "recommended_by_name",      "name": "Recommended by (name)",      "type": "text",      "placeholder": "Someone not in People"    },    {      "key": "watched_with",      "name": "Watched with",      "type": "text",      "placeholder": "Who you watched it with"    },    {      "key": "on_phone",      "name": "On this phone",      "type": "text",      "readonly": true    }  ],  "title": "title",  "date": "watched_on",  "project": null,  "order": null,  "slip": {    "title": "title",    "subtitle": "year",    "trailing": "status",    "photo": "poster",    "toggle": null,    "player": "file"  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "poster",        "title",        "year",        "minutes",        "director",        "kind",        "status"      ]    },    {      "heading": "Watched",      "columns": [        "watched_on",        "watched_with",        "recommended_by",        "recommended_by_name",        "rating",        "notes"      ]    }  ],  "sort": {    "column": "title",    "descending": false  },  "empty": {    "title": "No films yet",    "message": "Add a film or a series you mean to watch or have watched."  },  "instructions": "One row per film or series: its title, year and poster, its kind (film or series), its status (watchlist, watched), the day it was watched, a rating out of 5 and notes. A series is made of seasons (film_season), each of episodes (film_episode); a film is not.",  "commands": [    {      "id": "keep_on_phone",      "label": "Keep on phone",      "kind": "update",      "method": "settings.openFlow",      "data": {        "flow": "keepFilm",        "origin_table": "film"      },      "bindings": {        "origin_id": "$id"      },      "when": {        "on_phone": "streams"      },      "receipt": "Keeping {name} on this phone",      "object": "folder"    },    {      "id": "remove_download",      "label": "Remove download",      "kind": "update",      "method": "settings.openFlow",      "data": {        "flow": "removeFilmDownload",        "origin_table": "film"      },      "bindings": {        "origin_id": "$id"      },      "when": {        "on_phone": [          "keeping",          "kept"        ]      },      "receipt": "Removed {name} from this phone",      "object": "bin"    }  ],  "card": {    "face": "film.vhs",    "fields": [      {        "slot": "photo",        "column": "poster"      },      {        "slot": "title",        "column": "title"      },      {        "slot": "subtitle",        "column": "year"      },      {        "slot": "state",        "column": "status",        "only": [          "watchlist",          "watched"        ]      },      {        "slot": "date",        "column": "watched_on"      },      {        "slot": "count",        "column": "rating"      },      {        "slot": "facts",        "column": "kind"      },      {        "slot": "length",        "column": "minutes",        "form": "clock"      },      {        "slot": "director",        "column": "director"      },      {        "slot": "recommended_by",        "column": "recommended_by",        "also": [          "recommended_by_name"        ]      },      {        "slot": "watched_with",        "column": "watched_with"      },      {        "slot": "body",        "column": "notes"      }    ],    "opens": {      "table": "film_season",      "by": "film",      "order": [        "number"      ],      "when": {        "column": "kind",        "values": [          "series"        ]      }    }  },  "groups": {    "stack": "covers"  }}