Cotton code
175 lines · 4.0 KB · JSONRaw
{  "views": [    {      "id": "today",      "label": "Today",      "visibility": "owner",      "is_default": true,      "read": {        "table": "journal_entry",        "empty": {          "line": "empty_views.journal.today",          "table": true        },        "where": {          "day": {            "on": "today"          }        }      },      "sort": {        "column": "day",        "descending": true      }    },    {      "id": "calendar",      "label": "Calendar",      "visibility": "owner",      "is_default": false,      "read": {        "table": "journal_entry",        "empty": {          "line": "empty_views.journal.calendar",          "table": true        }      },      "sort": {        "column": "day",        "descending": true      }    },    {      "id": "moods",      "label": "Moods",      "visibility": "owner",      "is_default": false,      "read": {        "table": "journal_entry",        "empty": {          "line": "empty_views.journal.moods",          "table": true        }      },      "sort": {        "column": "day",        "descending": true      },      "face": "cards",      "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"          }        ]      }    },    {      "id": "on_this_day",      "label": "On this day",      "visibility": "owner",      "is_default": false,      "read": {        "table": "journal_entry",        "empty": {          "line": "empty_views.journal.on_this_day",          "table": true        },        "where": {          "day": {            "on": "this_day"          }        }      },      "sort": {        "column": "day",        "descending": true      }    },    {      "id": "starred",      "label": "Starred",      "visibility": "owner",      "is_default": false,      "read": {        "table": "journal_entry",        "empty": {          "line": "empty_views.journal.starred",          "table": true        },        "where": {          "starred": true        }      },      "sort": {        "column": "day",        "descending": true      }    },    {      "id": "devices",      "label": "Devices",      "visibility": "owner",      "is_default": false,      "read": {        "table": "vault_key",        "empty": {          "line": "empty_views.keys.devices",          "table": true        }      },      "sort": {        "column": "vmk_version",        "descending": false,        "tie": "created_at",        "tie_descending": false      }    }  ],  "id": "journal",  "name": "Journal",  "purpose": "A private journal: a page a day, or as many as you like, sealed on your phone.",  "picture": {    "photo": "photo:c5eb8f1ca78553c5419f520da4fd600be292251b4211ff367b203f8a920620e7",    "object": "tool-notes"  },  "tables": [    "journal_entry",    "vault_key"  ],  "instructions": "Journal is the owner's private diary. Every entry is sealed on the object: reading one asks the owner's phone for a short window, and an assistant writes an entry only when the owner asks, in their words. Today holds today's pages, Calendar every page by month, Moods the pages that carry a mood, On this day the pages written on today's date in earlier years, Starred the ones the owner starred.",  "automations": [],  "author": {    "device": "cotton",    "name": "Cotton"  },  "signature": null}