mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-20 13:11:44 +00:00
Created Data format (markdown)
73
Data-format.md
Normal file
73
Data-format.md
Normal file
@@ -0,0 +1,73 @@
|
||||
Boostnote saves documents in a folder such as `~/Boostnote` as [cson](https://github.com/bevry/cson) files.
|
||||
|
||||
# data structure
|
||||
|
||||
|
||||
```sh
|
||||
[ 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
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
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
|
||||
Reference in New Issue
Block a user