Cotton code
219 lines · 4.7 KB · JSONRaw
{  "format_version": 1,  "id": "story_story",  "name": "Story",  "plural": "Stories",  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "title",      "name": "Title",      "type": "text",      "required": true,      "placeholder": "What is your story called?"    },    {      "key": "logline",      "name": "In a sentence",      "type": "longtext",      "placeholder": "One or two sentences: who wants what, and what stands in the way"    },    {      "key": "written_by",      "name": "Written by",      "type": "text"    },    {      "key": "language",      "name": "Language",      "type": "text",      "default": "English"    },    {      "key": "translation_of",      "name": "Translated from",      "type": "link",      "link_to": "story_story"    },    {      "key": "format",      "name": "Kind",      "type": "choice",      "default": "feature",      "choices": [        "feature",        "short",        "episode",        "micro-drama"      ],      "labels": {        "feature": "Feature film",        "short": "Short film",        "episode": "Episode",        "micro-drama": "Micro-drama"      }    },    {      "key": "made_at",      "name": "Started",      "type": "date"    },    {      "key": "chosen_at",      "name": "Last written in",      "type": "date",      "format": "calendar-datetime"    },    {      "key": "scenes",      "name": "Scenes",      "type": "number",      "readonly": true,      "units": {        "one": "1 scene",        "other": "{n} scenes"      },      "computed": {        "rollup": {          "table": "story_scene",          "link": "story",          "op": "count"        }      }    },    {      "key": "pages",      "name": "Pages",      "type": "number",      "readonly": true,      "decimals": 1,      "units": {        "one": "1 page",        "other": "{n} pages"      },      "computed": {        "rollup": {          "table": "story_scene",          "link": "story",          "op": "sum",          "column": "pages"        }      }    },    {      "key": "interval_at",      "name": "Interval at",      "type": "number"    }  ],  "seal": {    "clear": [      "language",      "translation_of",      "format",      "made_at",      "chosen_at",      "scenes",      "pages",      "interval_at"    ],    "blind": [      "title",      "logline",      "written_by"    ]  },  "title": "title",  "date": "made_at",  "project": null,  "order": null,  "slip": {    "title": "title",    "subtitle": "logline",    "trailing": "pages",    "photo": null,    "toggle": null  },  "tile": {    "face": "slip-list"  },  "card": {    "face": "story.card",    "fields": [      {        "slot": "title",        "column": "title"      },      {        "slot": "subtitle",        "column": "logline"      },      {        "slot": "note",        "column": "pages"      },      {        "slot": "tag",        "column": "language"      }    ]  },  "page": [    {      "heading": null,      "columns": [        "title",        "logline",        "written_by",        "format",        "language",        "translation_of",        "made_at"      ]    }  ],  "sort": {    "column": "chosen_at",    "descending": true  },  "create": {    "label": "New story"  },  "empty": {    "title": "No story yet",    "message": "Start a story: give it a title, and write the rest when you are ready."  },  "deletion": {    "bin": true  },  "links": [    {      "label": "Deleted",      "table": "bin",      "where": {        "table": "story_story"      }    }  ],  "commands": [    {      "id": "delete",      "label": "Remove",      "kind": "delete",      "verb": "delete_record",      "data": {        "table": "story_story"      },      "confirm": "It can come back from Deleted, and Undo brings it back now. Its scenes stay until you remove them.",      "bindings": {        "id": "$id"      },      "receipt": "Removed",      "does": "destroys",      "object": "bin"    }  ],  "instructions": "A story is one screenplay the owner is writing: its title, a logline of one or two sentences, who wrote it, the language it is written in (English unless they say), the story it translates (translation_of, when it is a copy made for translating), its kind (feature, short, episode, micro-drama) and the day it was started. Its scenes are story_scene rows in order by position; its characters, places and notes are story_character, story_place and story_note rows linked to it. scenes and pages are worked out from its scenes, never written. Read the whole story as Fountain with story_fountain_write { story }."}