Cotton code
274 lines · 6.0 KB · JSONRaw
{  "format_version": 1,  "id": "media",  "name": "Picture",  "plural": "Photos",  "picture": {"photo": "photo:cd1fef04863a8c429257401e6b4da235458215a00395ffecd58b3eda10ab3172", "object": "tool-photos"},  "builtin": true,  "engine": "media",  "takes_files": true,  "columns": [    {  "key": "kind",  "name": "Kind",  "type": "choice",  "choices": [    "photo",    "video"  ],  "readonly": true,  "labels": {    "photo": "Photo",    "video": "Video"  }},    {      "key": "key",      "name": "Picture",      "type": "photo",      "readonly": true    },    {      "key": "caption",      "name": "Caption",      "type": "text",      "readonly": true    },    {      "key": "taken_at",      "name": "Taken",      "type": "date",      "readonly": true    },    {      "key": "place_name",      "name": "Place",      "type": "text",      "readonly": true    },    {      "key": "summary",      "name": "Description",      "type": "longtext",      "readonly": true    },    {      "key": "duration_ms",      "name": "Length",      "type": "number",      "readonly": true,      "format": "duration_ms"    },    {      "key": "size_bytes",      "name": "Size",      "type": "number",      "readonly": true,      "format": "bytes"    }  ],  "title": "caption",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "caption",    "subtitle": "place_name",    "trailing": "taken_at",    "photo": "key",    "toggle": null,    "title_fallback": "place_name",    "badge": {      "column": "kind",      "values": [        "video"      ],      "symbol": "play.fill",      "spoken": "Video"    }  },  "viewer": {"words": {"close": "Close", "details": "Details", "more": "More", "share": "Share", "position": "{n} of {count}", "absent": "Not on this phone yet.", "removed": "This was removed.", "fetch": "Fetch it", "play": "Play", "pause": "Pause", "mute": "Mute", "unmute": "Sound on", "picture_in_picture": "Picture in picture", "search": "Search this document", "no_match": "Nothing matches", "page": "Page {n} of {count}", "go_to_page": "Go to page", "go": "Go", "pin_press": "long press to leave a pin", "pin_hint": "A pin on this picture, at the point you pressed.", "pin_placeholder": "What is this about?", "cancel": "Cancel", "save": "Save", "saving": "Saving…"}},  "tile": {    "face": "polaroid-grid"  },  "polaroid": {    "caption": "duration_ms"  },  "layout": "sheet",  "grid": {    "columns": 4  },  "sort": {    "column": "taken_at",    "descending": true  },  "by_month": "taken_at",  "months": {    "over": 0,    "undated": "No date"  },  "count_words": {    "column": "kind",    "units": {      "photo": {        "one": "photo",        "other": "photos"      },      "video": {        "one": "video",        "other": "videos"      }    }  },  "filter": {    "column": "kind",    "tabs": false,    "all": "All",    "words": {      "photo": "Photos",      "video": "Videos"    },    "empty": {      "photo": {        "title": "No photos yet.",        "message": "Pictures and videos from your chats land here on their own."      },      "video": {        "title": "No videos yet.",        "message": "Pictures and videos from your chats land here on their own."      }    }  },  "search": [    "caption",    "summary"  ],  "search_placeholder": "What's in your photos",  "empty": {    "title": "No photos yet.",    "message": "Pictures and videos from your chats land here on their own.",    "search": {      "title": "No matches yet"    }  },  "delete_when": {    "column": "kind",    "present": true  },  "select": {    "verb": "delete"  },  "deletion": {    "bin": true  },  "links": [    {      "label": "Albums",      "table": "album",      "where": {        "state": "open"      },      "words": "suggested",      "path": "/photos/albums",      "review": true    },    {      "label": "Duplicates",      "table": "duplicate",      "path": "/photos/duplicates",      "review": true,      "hides_empty": true    },    {      "label": "People to confirm",      "table": "face",      "where": {        "answer": "open"      },      "path": "/photos/people",      "review": true,      "hides_empty": true    },    {      "label": "Deleted",      "table": "bin",      "where": {        "table": [          "photo",          "video"        ]      }    }  ],  "page": [    {      "heading": null,      "columns": [        "key",        "caption",        "taken_at",        "place_name"      ]    }  ],  "instructions": "The owner's pictures and films as one library, newest first: each row is a photo or a video (kind), read from the photo and video tables. A row opens its photo's or video's own page. Its groups are the albums: create_group on it makes an album of the pictures named, update_group renames one or puts pictures in or takes them out, and delete_group dismisses one.",  "groups": {    "stack": "polaroids",    "kept_in": {      "table": "album",      "items": "album_item"    }  },  "parts": {    "shape": "desk",    "head": {      "facts": [        "taken_at",        "place_name"      ]    },    "links": [],    "body": "summary",    "lists": [],    "acts": {      "more": [],      "away": "delete"    },    "strip": [      {"column": "taken_at"},      {"column": "place_name"},      {"column": "key"}    ]  },  "commands": [    {      "id": "delete",      "label": "Delete",      "kind": "delete",      "verb": "delete_record",      "data": {        "table": "media"      },      "bindings": {        "id": "$id"      },      "when": {        "kind": {          "not": null        }      },      "confirm": "Undo on the receipt brings it back.",      "receipt": "Deleted",      "does": "destroys"    }  ],  "tool": {    "name": "Photos",    "key": "photos",    "icon": "image",    "card_stock": "slate",    "route": "/photos"  ,"purpose":"Your photos and the moments they capture."},  "tables": []}