Cotton code
314 lines · 5.9 KB · JSONRaw
{  "format_version": 1,  "id": "journal_entry",  "name": "Journal entry",  "plural": "Journal entries",  "builtin": false,  "visibility": "owner",  "picture": {    "photo": "photo:c5eb8f1ca78553c5419f520da4fd600be292251b4211ff367b203f8a920620e7",    "object": "tool-notes"  },  "engine": null,  "columns": [    {      "key": "day",      "name": "Day",      "type": "date",      "required": true    },    {      "key": "title",      "name": "Title",      "type": "text",      "placeholder": "Untitled"    },    {      "key": "body",      "name": "Words",      "type": "longtext",      "placeholder": "Write what happened"    },    {      "key": "mood",      "name": "Mood",      "type": "choice",      "choices": [        "great",        "good",        "okay",        "low",        "awful"      ],      "labels": {        "great": "Great",        "good": "Good",        "okay": "Okay",        "low": "Low",        "awful": "Awful"      }    },    {      "key": "weather",      "name": "Weather",      "type": "choice",      "choices": [        "sunny",        "cloudy",        "rain",        "storm",        "snow",        "wind",        "fog"      ],      "labels": {        "sunny": "Sunny",        "cloudy": "Cloudy",        "rain": "Rain",        "storm": "Storm",        "snow": "Snow",        "wind": "Wind",        "fog": "Fog"      }    },    {      "key": "place",      "name": "Where",      "type": "text"    },    {      "key": "starred",      "name": "Starred",      "type": "bool",      "default": false    },    {      "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    }  ],  "seal": {    "clear": [      "day",      "starred"    ],    "blind": [      "title",      "body",      "place"    ]  },  "title": "title",  "date": "day",  "project": null,  "order": null,  "by_month": "day",  "slip": {    "title": "title",    "subtitle": "body",    "trailing": "day",    "photo": null,    "toggle": null,    "title_fallback": "body"  },  "tile": {    "face": "slip-list"  },  "card": {    "face": "journal.diary",    "fields": [      {        "slot": "title",        "column": "title"      },      {        "slot": "date",        "column": "day",        "form": "weekday_date"      },      {        "slot": "body",        "column": "body",        "markdown": true      },      {        "slot": "seal",        "column": "mood"      },      {        "slot": "weather",        "column": "weather"      },      {        "slot": "place",        "column": "place"      },      {        "slot": "star",        "column": "starred"      }    ]  },  "page": [    {      "heading": null,      "columns": [        "day",        "body"      ]    },    {      "heading": "The day",      "columns": [        "mood",        "weather",        "place"      ]    }  ],  "parts": {    "shape": "desk",    "head": {      "facts": [        "day"      ]    },    "links": [],    "body": "body",    "lists": [],    "acts": {      "more": [        "star",        "unstar"      ],      "away": "delete"    },    "cards": [      {        "column": "mood"      },      {        "column": "weather"      }    ],    "strip": []  },  "sort": {    "column": "day",    "descending": true  },  "create": {    "label": "New entry",    "dated": "day"  },  "empty": {    "title": "Nothing written yet"  },  "deletion": {    "bin": true  },  "links": [    {      "label": "Deleted",      "table": "bin",      "where": {        "table": "journal_entry"      }    }  ],  "commands": [    {      "id": "star",      "label": "Star",      "object": "star",      "kind": "update",      "verb": "update_record",      "data": {        "table": "journal_entry",        "patch": {          "starred": true        }      },      "bindings": {        "id": "$id"      },      "when": {        "starred": false      },      "receipt": "Starred",      "undo": "unstar"    },    {      "id": "unstar",      "label": "Unstar",      "object": "star",      "kind": "update",      "verb": "update_record",      "data": {        "table": "journal_entry",        "patch": {          "starred": false        }      },      "bindings": {        "id": "$id"      },      "when": {        "starred": true      },      "receipt": "Unstarred",      "undo": "star"    },    {      "id": "delete",      "label": "Delete",      "kind": "delete",      "verb": "delete_record",      "data": {        "table": "journal_entry"      },      "confirm": "It can come back from Deleted, and Undo on the receipt brings it back now.",      "bindings": {        "id": "$id"      },      "receipt": "Deleted",      "does": "destroys",      "object": "bin"    }  ],  "groups": {    "stack": "slips"  },  "instructions": "A journal entry is one page of the owner's private journal: the day it is about, an optional title, the words as they wrote them, and, if they said so, the mood (great, good, okay, low or awful), the weather and where they were. Each tap of Plus is a new entry, so a day can hold several. Keep the owner's words as they wrote them; never write, rewrite or summarise an entry unless they ask, and only name a mood they gave. The journal is sealed: every column but the day and the star is sealed on the object, so reading one asks the owner's phone for a window.",  "send": {    "columns": [      "day",      "title",      "body",      "mood",      "weather",      "place"    ]  }}