diff --git a/CliClient/app/app.js b/CliClient/app/app.js index d9bb5275c..06406ccd2 100644 --- a/CliClient/app/app.js +++ b/CliClient/app/app.js @@ -380,7 +380,8 @@ class Application { reg.setLogger(this.logger_); this.dbLogger_.addTarget('file', { path: profileDir + '/log-database.txt' }); - this.dbLogger_.setLevel(initArgs.logLevel); + this.dbLogger_.setLevel(Logger.LEVEL_INFO); + //this.dbLogger_.setLevel(initArgs.logLevel); this.syncLogger_.addTarget('file', { path: profileDir + '/log-sync.txt' }); this.syncLogger_.setLevel(initArgs.logLevel); diff --git a/CliClient/app/import-enex-md-gen.js b/CliClient/app/import-enex-md-gen.js index 0fca2dd95..549c891ad 100644 --- a/CliClient/app/import-enex-md-gen.js +++ b/CliClient/app/import-enex-md-gen.js @@ -499,7 +499,7 @@ function setTableCellContent(table) { for (let trIndex = 0; trIndex < table.lines.length; trIndex++) { const tr = table.lines[trIndex]; for (let tdIndex = 0; tdIndex < tr.lines.length; tdIndex++) { - const td = tr.lines[tdIndex]; + let td = tr.lines[tdIndex]; td.content = processMdArrayNewLines(td.lines); td.content = td.content.replace(/\n\n\n\n\n/g, ' '); td.content = td.content.replace(/\n\n\n\n/g, ' '); @@ -536,29 +536,6 @@ function colWidths(table) { return output; } -// function wrapLine(line, maxWidth) { -// if (line.length <= maxWidth) return line; - -// let output = []; -// while (line.length) { -// const l = line.substr(0, maxWidth); -// line = line.substr(maxWidth); -// output.push(l); -// } - -// return output.join("\n"); -// } - -// function wrapCellLines(cellText, maxWidth) { -// const lines = cellText.split("\n"); -// let output = []; -// for (let i = 0; i < lines.length; i++) { -// let line = wrapLine(lines[i], maxWidth); -// output.push(line); -// } -// return output.join("\n"); -// } - function drawTable(table, colWidths) { // | First Header | Second Header | // | ------------- | ------------- | @@ -575,7 +552,7 @@ function drawTable(table, colWidths) { let emptyHeader = null; for (let tdIndex = 0; tdIndex < colWidths.length; tdIndex++) { const width = colWidths[tdIndex]; - const cell = tr.lines[tdIndex].content; + const cell = tr.lines[tdIndex] ? tr.lines[tdIndex].content : ''; line.push(stringPadding(cell, width, ' ', stringPadding.RIGHT)); if (!headerDone) { @@ -615,6 +592,7 @@ async function enexXmlToMd(stream, resources) { let line = result.content.lines[i]; if (typeof line === 'object') { // A table let table = setTableCellContent(line); + //console.log(require('util').inspect(table, false, null)) const cw = colWidths(table); const tableLines = drawTable(table, cw); mdLines.push(BLOCK_OPEN); diff --git a/CliClient/locales/en_GB.po b/CliClient/locales/en_GB.po index 32575f714..7041f0b0a 100644 --- a/CliClient/locales/en_GB.po +++ b/CliClient/locales/en_GB.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Joplin-CLI 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-18 23:12+0100\n" +"POT-Creation-Date: 2017-07-18 23:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,7 +62,7 @@ msgstr "" msgid "Synchronizing with directory \"%s\"" msgstr "" -#: /mnt/d/Web/www/joplin/CliClient/app/app.js:419 +#: /mnt/d/Web/www/joplin/CliClient/app/app.js:420 msgid "No notebook is defined. Create one with `mkbook `." msgstr "" diff --git a/CliClient/locales/fr_FR.po b/CliClient/locales/fr_FR.po index 9ec373a19..b929ad09d 100644 --- a/CliClient/locales/fr_FR.po +++ b/CliClient/locales/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Joplin-CLI 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-18 23:12+0100\n" +"POT-Creation-Date: 2017-07-18 23:18+0100\n" "PO-Revision-Date: 2017-07-18 13:27+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -64,7 +64,7 @@ msgstr "Quitter le logiciel." msgid "Synchronizing with directory \"%s\"" msgstr "Synchronisation avec dossier \"%s\"" -#: /mnt/d/Web/www/joplin/CliClient/app/app.js:419 +#: /mnt/d/Web/www/joplin/CliClient/app/app.js:420 msgid "No notebook is defined. Create one with `mkbook `." msgstr "Aucun carnet n'est défini. Créez-en un avec `mkbook `." diff --git a/CliClient/locales/joplin.pot b/CliClient/locales/joplin.pot index 32575f714..7041f0b0a 100644 --- a/CliClient/locales/joplin.pot +++ b/CliClient/locales/joplin.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Joplin-CLI 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-18 23:12+0100\n" +"POT-Creation-Date: 2017-07-18 23:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,7 +62,7 @@ msgstr "" msgid "Synchronizing with directory \"%s\"" msgstr "" -#: /mnt/d/Web/www/joplin/CliClient/app/app.js:419 +#: /mnt/d/Web/www/joplin/CliClient/app/app.js:420 msgid "No notebook is defined. Create one with `mkbook `." msgstr ""