1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Fixed Enex import issue

This commit is contained in:
Laurent Cozic 2017-07-18 23:38:07 +01:00
parent 7aa21174f6
commit 3bfa68e106
5 changed files with 11 additions and 32 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 <notebook>`."
msgstr ""

View File

@ -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 <notebook>`."
msgstr "Aucun carnet n'est défini. Créez-en un avec `mkbook <carnet>`."

View File

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 <notebook>`."
msgstr ""