From 8546e255954560f7a14d44bb9e874003f602dea7 Mon Sep 17 00:00:00 2001 From: SuenagaRyota Date: Wed, 4 Oct 2017 10:23:26 +0900 Subject: [PATCH] Updated Data format (markdown) --- Data-format.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Data-format.md b/Data-format.md index 3e9f520..021b6cd 100644 --- a/Data-format.md +++ b/Data-format.md @@ -47,9 +47,19 @@ This is an image of the folder(storage). ![image](https://user-images.githubusercontent.com/11307908/31155778-98f871ac-a8eb-11e7-8f4b-6f922ef52f05.png) -### Naming rule -Random name for folder is created by +## Naming rule +Names used in Boostnote is created as a random string by [keygen.js](https://github.com/BoostIO/Boostnote/blob/95d74d1ca2206ed18add0348682af0063a5ac5b0/browser/lib/keygen.js). +`Folder name` and `Note name` is a 20 letters string created by `browser/main/lib/dataApi/createFolder.js` and by `browser/main/lib/dataApi/createNote.js`. + +https://github.com/BoostIO/Boostnote/blob/a480ca7b551bf70becf8000047b6608194c5c27c/browser/main/lib/dataApi/createFolder.js#L38:L57 +https://github.com/BoostIO/Boostnote/blob/a480ca7b551bf70becf8000047b6608194c5c27c/browser/main/lib/dataApi/createNote.js#L54:L79 + +# Note hash +Each note has a unique hash for jumping a note to a note. You can check it in InfoPanel. +![image](https://user-images.githubusercontent.com/11307908/31156181-c3b37e08-a8ed-11e7-95f8-c0206aef839c.png) + +In this case, the hash is `3bfa3f3e67aef359ac6f-b5176bbf1cc5f34cd578`. This is a combination of `Storage key` and `Note key` (`\`${storageKey}-${noteKey}\``). # Why cson? CSON supports multiline string. So we can use diff much easier.