Data format

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 ofboostnote.jsonis

{

"
folders
"
: [
    {

"
key
"
: 
"
49e4ebf9f16ddfc96534
"
,

"
color
"
: 
"
#E10051
"
,

"
name
"
: 
"
Tutorial
"

    },
    {

"
key
"
: 
"
1de44c2b39b9288e7968
"
,

"
color
"
: 
"
#2BA5F7
"
,

"
name
"
: 
"
aaaaa
"

    }
  ],

"
version
"
: 
"
1.0
"

}

This is an image of the folder(storage).

Naming rule

Names used in Boostnote is created as a random string bykeygen.js.

Folder nameandNote nameis a 20 letters string created bybrowser/main/lib/dataApi/createFolder.jsand bybrowser/main/lib/dataApi/createNote.js.

https://github.com/BoostIO/Boostnote/blob/a480ca7b551bf70becf8000047b6608194c5c27c/browser/main/lib/dataApi/createFolder.js#L38:L57https://github.com/BoostIO/Boostnote/blob/a480ca7b551bf70becf8000047b6608194c5c27c/browser/main/lib/dataApi/createNote.js#L54:L79

Image nameis a 10 letters string created bybrowser/main/lib/dataApi/copyImage.js(We'll merge them someday)https://github.com/BoostIO/Boostnote/blob/a480ca7b551bf70becf8000047b6608194c5c27c/browser/main/lib/dataApi/copyImage.js#L20

Note hash

Each note has a unique hash for jumping a note to a note. You can check it in InfoPanel.

In this case, the hash is3bfa3f3e67aef359ac6f-b5176bbf1cc5f34cd578. This is a combination ofStorage keyandNote key(${storageKey}-${noteKey}).

The storage path is stored inlocalStorage.

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

results matching ""

    No results matching ""