Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/PhieF/CarnetElectron.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhieF <phie@phie.ovh>2021-02-20 23:21:59 +0300
committerGitHub <noreply@github.com>2021-02-20 23:21:59 +0300
commitbc9de07afd218a045541db1fb3be1a452d7be9ec (patch)
tree6f95a3ce710b593e082136fe4a60ecd9332b913c /importer
parent30440f77e3adc1c094977fdf6f469ca35bc00e24 (diff)
parent37e73bdb389d3051e7e5b66b00b442f2cd608c8d (diff)
Merge pull request #52 from chrisdaubert/GoogleTodoListImport
Update google-converter.js w/todo list support
Diffstat (limited to 'importer')
-rw-r--r--importer/google-converter.js20
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 () {