Skip to content

Data format

SuenagaRyota edited this page Oct 4, 2017 · 5 revisions

Boostnote saves documents in a folder such as ~/Boostnote as cson files.

data structure

[ Boostnote 10:01 ]% tree
.
├── boostnote.json
├── images
│   ├── ay1wuf9yhw0wl8fr.png
│   ├── qppsh9gs44nghkt9.png
│   └── 44yt208ehhcnxw29.png
└── notes
    ├── 01f720cbd38f6079e7cd.cson
    ├── 0391ce9b4b6bf0ae8cb7.cson
    ├── 2b7d62d24dea826d8b86.cson
    ├── 304a604e620fe29efc0e.cson
    ├── b9c22f55de5747604fd8.cson
    ├── d9416376efecccfbfd36.cson
    └── f7780965124b6d8b8e9e.cson

2 directories, 11 files

boostnote.json

The contents of boostnote.json is

{
  "folders": [
    {
      "key": "49e4ebf9f16ddfc96534",
      "color": "#E10051",
      "name": "Tutorial"
    },
    {
      "key": "1de44c2b39b9288e7968",
      "color": "#2BA5F7",
      "name": "aaaaa"
    }
  ],
  "version": "1.0"
}

This is an image of the folder(storage).

image

Naming rule

Random name for folder is created by

Why cson?

CSON supports multiline string. So we can use diff much easier.

.json

{
  content: "a\nlot\nof\lines"
}

.cson

  content: """
    a
    lot
    of
    lines
  """

ref: https://github.com/BoostIO/Boostnote/issues/89

Clone this wiki locally