Cotton code
177 lines · 3.5 KB · JSONRaw
{  "format_version": 1,  "id": "track",  "name": "Song",  "plural": "Songs",  "picture": null,  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "title",      "name": "Title",      "type": "text",      "required": true,      "placeholder": "Name this song"    },    {      "key": "file",      "name": "Recording",      "type": "file"    },    {      "key": "artist",      "name": "Artist",      "type": "link",      "link_to": "artist"    },    {      "key": "album",      "name": "Album",      "type": "link",      "link_to": "music_album"    },    {      "key": "track_number",      "name": "Track",      "type": "number"    },    {      "key": "duration",      "name": "Length",      "type": "number",      "format": "duration"    },    {      "key": "artist_name",      "name": "By",      "type": "text",      "computed": {        "lookup": {          "through": "artist",          "column": "name"        }      }    },    {      "key": "album_title",      "name": "On",      "type": "text",      "computed": {        "lookup": {          "through": "album",          "column": "title"        }      }    },    {      "key": "cover",      "name": "Cover",      "type": "photo",      "computed": {        "lookup": {          "through": "album",          "column": "cover"        }      }    },    {      "key": "spotify_id",      "name": "Spotify id",      "type": "text",      "readonly": true    },    {      "key": "spotify_uri",      "name": "Spotify",      "type": "text",      "readonly": true    }  ],  "title": "title",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "title",    "subtitle": [      "artist_name",      "album_title"    ],    "trailing": "duration",    "photo": "cover",    "toggle": null  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "cover",        "title",        "artist",        "album",        "track_number",        "duration"      ]    },    {      "heading": "Recording",      "columns": [        "file"      ]    }  ],  "sort": {    "column": "title",    "descending": false  },  "empty": {    "title": "No songs yet",    "message": "Add a song you keep as a file."  },  "create": {    "label": "Add a song"  },  "instructions": "One row per song the person keeps as a file: file is the recording itself (an audio file in this database, never a link or a service). artist and album link the song's artist and album; track_number is its place on the album, duration its length in seconds. artist_name, album_title and cover are read through those links. Never guess an artist, an album or a length. A song from the person's Spotify library has no file: spotify_id and spotify_uri name it on Spotify, and the Spotify pull keeps it by them.",  "card": {    "face": "track",    "fields": [      {        "slot": "photo",        "column": "cover"      },      {        "slot": "title",        "column": "title"      },      {        "slot": "subtitle",        "column": "artist_name",        "also": [          "album_title"        ]      },      {        "slot": "number",        "column": "track_number",        "line": "field.track"      },      {        "slot": "length",        "column": "duration",        "form": "clock"      },      {        "slot": "play",        "column": "file"      }    ]  },  "groups": {    "stack": "slips"  }}