This repository has been archived by the owner on Jul 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathinit.js
34 lines (28 loc) · 1.78 KB
/
init.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Generated by CoffeeScript 1.10.0
var Note, Tree, async, note, server;
server = require('./server');
async = require("async");
Note = require('./server/models/note');
Tree = require('./server/models/tree');
note = new Note({
title: "Tutorial",
parent_id: "tree-node-all",
path: "[\"Tutorial\"]",
content: "# What is Cozy Notes ?\n\nCozy Notes is a simple yet powerful note manager.\nIt can be used entirely with the keyboard and its original text editor\nmakes formating incredibly fast.\n\n# Navigation\n\nYou organize your notes following a tree structure.\n* To create a top level note, click the \"+\" button in the left panet on the\nright side of \"My notes\" logo\n* To create a sub level note, hover the mouse on an existing note and press\nthe \"+\" button\n\n# Layout\n\nYou can structure your notes with two actions.\n* Toggle between titles and bullet points pressing Alt + A or clicking\n\"T\" button\n* Indent and un-indent lines pressing Tab and Shift + Tab or using the buttons\n\n# Tools\n\n* Add in text links pressing Ctrl + K or using the button\n* Attach files to a note by clicking the paper clip\n* Search your notes using the top left input box\n\n# Tips\n\n* Lines of similar indent level are either titles or bullet point\n* You can implement a list of decreasing indent level\n * like this one\n * by indenting a selection of lines\n"
});
Note.create(note, function(err, finalNote) {
if (err) {
console.log(err);
console.log("Initialization failed (can't save note)");
process.exit(0);
}
return finalNote.index(["title", "content"], function(err) {
if (err) {
console.log(err);
console.log("Initialization failed (can't index note)");
} else {
console.log("Done creating tutorial");
}
return process.exit(0);
});
});