diff options
author | chrisdaubert <chrisdaubert@gmail.com> | 2021-01-21 19:36:26 +0300 |
---|---|---|
committer | chrisdaubert <chrisdaubert@gmail.com> | 2021-01-21 19:36:26 +0300 |
commit | 37e73bdb389d3051e7e5b66b00b442f2cd608c8d (patch) | |
tree | c9d0c64e5766b1c0bc850a8f2d37ec58fb331872 /importer | |
parent | d5024d627d85c7d139bc2c2d6ea2bda5541ba153 (diff) |
Update google-converter.js
Diffstat (limited to 'importer')
-rw-r--r-- | importer/google-converter.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/importer/google-converter.js b/importer/google-converter.js index be0855b..2bca152 100644 --- a/importer/google-converter.js +++ b/importer/google-converter.js @@ -252,6 +252,26 @@ GoogleConverter.prototype.onDateAvailable = function (date, json, zip, filename, } } } + if (json['listContent'] != undefined) { + var todoList = {"id": "todolist" + generateUID()} + todoList.todo = [] + todoList.done = [] + todoList.todoIds = [] + todoList.doneIds = [] + todoList.stats = [] + for (var todos of json['listContent']) { + if (todos['text'] != undefined) { + if (todos['text'] != undefined && !todos['isChecked']) { + todoList.todo.push(todos['text']) + todoList.todoIds.push(generateUID()) + }else{ + todoList.done.push(todos['text']) + todoList.doneIds.push(generateUID()) + } + } + } + metadata['todolists'].push(todoList) + } zip.file("metadata.json", JSON.stringify(metadata)); importer.importNoteAttachments(currentZip, zip, json['attachments'], function () { |