import notes from tar archive, closes #63

This commit is contained in:
azivner
2018-02-26 00:07:43 -05:00
parent 60bba46d80
commit 1501fa8dbf
9 changed files with 175 additions and 117 deletions

View File

@@ -31,6 +31,10 @@ async function exportNote(noteTreeId, directory, pack) {
const noteTree = await sql.getRow("SELECT * FROM note_tree WHERE noteTreeId = ?", [noteTreeId]);
const note = await sql.getRow("SELECT * FROM notes WHERE noteId = ?", [noteTree.noteId]);
if (note.isProtected) {
return;
}
const content = note.type === 'text' ? html.prettyPrint(note.content, {indent_size: 2}) : note.content;
const childFileName = directory + sanitize(note.title);