diff --git a/README.md b/README.md index 100c244..edf7ba3 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,15 @@ I was using Calibre and Pandoc-Export plugin, but I was wondering about a short - [x] Become a Communityplugin 🎉 - [x] Create workaround for other embedded files - [x] Add ==highlighting== -- [x] .md export _(mergedown)_ - [ ] Foldercover or filecover - [ ] .html export (Archive) - [ ] .epub export (Pocketbook) - [ ] .pdf export (would be nice for IOS & Android) - +### Extra features (no kindle data needed) +- [x] .md export _(mergedown)_ +- [x] Audio export +- [x] Video export +- [x] define own exportpath ### Just try it! For embedding local images, please use the following format: ``` ![[image.jpg]] ``` diff --git a/main.js b/main.js index 2cf8e75..c2b18f7 100644 --- a/main.js +++ b/main.js @@ -1941,6 +1941,11 @@ var KindleSettingTab = class extends import_obsidian.PluginSettingTab { this.app.plugins.unloadPlugin("obsidian-kindle-export"); this.app.plugins.loadPlugin("obsidian-kindle-export"); }))); + new import_obsidian.Setting(containerEl).setName("Exportpath").setDesc("Set the path where you want to export your files to. (e.g. /folder)").addText((text) => text.setPlaceholder("/folder").setValue(this.plugin.settings.expath).onChange((value) => __async(this, null, function* () { + this.plugin.settings.expath = value; + yield this.plugin.saveSettings(); + console.log(this.plugin.settings); + }))); containerEl.createEl("hr"); containerEl.createEl("p", { text: "Host your own Obsidian2Kindle-Converter." }); containerEl.createEl("a", { text: "Fork from Github \u{1F517}", href: "https://github.com/SimeonLukas/Obsidian2Kindle" }); @@ -1964,6 +1969,7 @@ var DEFAULT_SETTINGS = { port: "", smtphost: "", pass: "", + expath: "", backend: "https://staneks.de/apps/md2mobi/" }; var Kindle = class extends import_obsidian2.Plugin { @@ -1996,8 +2002,11 @@ var Kindle = class extends import_obsidian2.Plugin { let lines = data.split("\n"); let result = yield this.Mergedown(lines, Inhalt, imagelist, imagename, links); Inhalt = result.Inhalt; + Inhalt = Inhalt.replace(/%%[\s\S]*?%%/g, ""); let time = new Date().getTime(); - this.app.vault.create(dokument.basename + "_mergedown_" + time + ".md", Inhalt); + let expath = this.settings.expath; + this.app.vault.createFolder(expath); + this.app.vault.create(expath + "/" + dokument.basename + "_mergedown_" + time + ".md", Inhalt); if (lang2 == "de") { new import_obsidian2.Notice("\u2714\uFE0F Mergedown erfolgreich!"); } else { @@ -2230,6 +2239,16 @@ var Kindle = class extends import_obsidian2.Plugin { imagelist.push(base64); Inhalt += "\n![" + file.name + "](data:image/" + file.extension + ";base64," + base64 + ")\n"; } + if (file.extension == "mp4" || file.extension == "webm" || file.extension == "ogv" || file.extension == "avi" || file.extension == "mov" || file.extension == "wmv" || file.extension == "mpg" || file.extension == "mpeg" || file.extension == "mkv" || file.extension == "flv" || file.extension == "swf" || file.extension == "vob" || file.extension == "m4v" || file.extension == "m4a" || file.extension == "m4b" || file.extension == "m4r" || file.extension == "3gp" || file.extension == "3g2" || file.extension == "f4v" || file.extension == "f4a" || file.extension == "f4b") { + let data = yield this.app.vault.readBinary(file); + let base64 = import_buffer.Buffer.from(data).toString("base64"); + Inhalt += '\n\n'; + } + if (file.extension == "mp3" || file.extension == "ogg" || file.extension == "wav" || file.extension == "flac") { + let data = yield this.app.vault.readBinary(file); + let base64 = import_buffer.Buffer.from(data).toString("base64"); + Inhalt += '\n\n'; + } if (file.extension == "md") { let links2 = []; let data = yield this.app.vault.cachedRead(file); @@ -2300,4 +2319,4 @@ var Kindle = class extends import_obsidian2.Plugin { * @license MIT */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibm9kZV9tb2R1bGVzL2Jhc2U2NC1qcy9pbmRleC5qcyIsICJub2RlX21vZHVsZXMvaWVlZTc1NC9pbmRleC5qcyIsICJidWZmZXIvaW5kZXguanMiLCAibWFpbi50cyIsICJzZXR0aW5ncy50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiJ3VzZSBzdHJpY3QnXG5cbmV4cG9ydHMuYnl0ZUxlbmd0aCA9IGJ5dGVMZW5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dDogXCJTZXQgeW91ciBkYXRhIGZvciB5b3VyIEtpbmRsZS4gVXNlIHlvdXIgZW1haWwgd2hpY2ggaXMgYXBwcm92ZWQgYnkgQW1hem9uLlwiIH0pO1xyXG5cclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoXCJBdXRob3JcIilcclxuICAgICAgLnNldERlc2MoXCJEZWZhdWx0IGF1dGhvciBmb3IgbmV3IGRvY3VtZW50c1wiKVxyXG4gICAgICAuYWRkVGV4dCgodGV4dCkgPT5cclxuICAgICAgICB0ZXh0XHJcbiAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJPYnNpZGlhblwiKVxyXG4gICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmF1dGhvcilcclxuICAgICAgICAgIC5vbkNoYW5nZShhc3luYyAodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuYXV0aG9yID0gdmFsdWU7XHJcbiAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICB9KVxyXG4gICAgICApO1xyXG5cclxuICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKFwiRW1haWxcIilcclxuICAgICAgLnNldERlc2MoXCJBcHByb3ZlZCBFbWFpbCBmb3IgeW91ciBLaW5kbGVcIilcclxuICAgICAgLmFkZFRleHQoKHRleHQpID0+XHJcbiAgICAgICAgdGV4dFxyXG4gICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwieW91QG9ic2lkaWFuLm1kXCIpXHJcbiAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3Muc2VuZG1haWwpXHRcclxuICAgICAgICAgIC5vbkNoYW5nZShhc3luYyAodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Muc2VuZG1haWwgPSB2YWx1ZTtcclxuICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgIH0pXHJcbiAgICAgICk7XHJcblxyXG4gICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoXCJLaW5kbGVtYWlsXCIpXHJcbiAgICAgIC5zZXREZXNjKFwiWW91ciBLaW5kbGUgZW1haWxcIilcclxuICAgICAgLmFkZFRleHQoKHRleHQpID0+XHJcbiAgICAgICAgdGV4dFxyXG4gICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwieW91QGtpbmRsZS5jb21cIilcclxuICAgICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5raW5kbGVtYWlsKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKGFzeW5jICh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5raW5kbGVtYWlsID0gdmFsdWU7XHJcbiAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICB9KVxyXG4gICAgICApO1xyXG5cclxuICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKFwiU01UUCBIb3N0XCIpXHJcbiAgICAgIC5zZXREZXNjKFwiWW91ciBTTVRQIGhvc3QgKGUuZy4gc210cC5nbWFpbC5jb20pXCIpXHJcbiAgICAgIC5hZGR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lYWtcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgIHNlY29uZEJ5dGUgPSBidWZbaSArIDFdXG4gICAgICAgICAgaWYgKChzZWNvbmRCeXRlICYgMHhDMCkgPT09IDB4ODApIHtcbiAgICAgICAgICAgIHRlbXBDb2RlUG9pbnQgPSAoZmlyc3RCeXRlICYgMHgxRikgPDwgMHg2IHwgKHNlY29uZEJ5dGUgJiAweDNGKVxuICAgICAgICAgICAgaWYgKHRlbXBDb2RlUG9pbnQgPiAweDdGKSB7XG4gICAgICAgICAgICAgIGNvZGVQb2ludCA9IHRlbXBDb2RlUG9pbnRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSAzOlxuICAgICAgICAgIHNlY29uZEJ5dGUgPSBidWZbaSArIDFdXG4gICAgICAgICAgdGhpcmRCeXRlID0gYnVmW2kgKyAyXVxuICAgICAgICAgIGlmICgoc2Vjb25kQnl0ZSAmIDB4QzApID09PSAweDgwICYmICh0aGlyZEJ5dGUgJiAweEMwKSA9PT0gMHg4MCkge1xuICAgICAgICAgICAgdGVtcENvZGVQb2ludCA9IChmaXJzdEJ5dGUgJiAweEYpIDw8IDB4QyB8IChzZWNvbmRCeXRlICYgMHgzRikgPDwgMHg2IHwgKHRoaXJkQnl0ZSAmIDB4M0YpXG4gICAgICAgICAgICBpZiAodGVtcENvZGVQb2ludCA+IDB4N0ZGICYmICh0ZW1wQ29kZVBvaW50IDwgMHhEODAwIHx8IHRlbXBDb2RlUG9pbnQgPiAweERGRkYpKSB7XG4gICAgICAgICAgICAgIGNvZGVQb2ludCA9IHRlbXBDb2RlUG9pbnRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSA0OlxuICAgICAgICAgIHNlY29uZEJ5dGUgPSBidWZbaSArIDFdXG4gICAgICAgICAgdGhpcmRCeXRlID0gYnVmW2kgKyAyXVxuICAgIC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0aW5ncygpO1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICB9KVxyXG4gICAgICApO1xyXG5cclxuXHJcblxyXG4gICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoXCJTTVRQIFBhc3N3b3JkXCIpXHJcbiAgICAgIC5zZXREZXNjKFwiWW91ciBTTVRQIHBhc3N3b3JkXCIpXHJcbiAgICAgIC5hZGRUZXh0KCh0ZXh0KSA9PlxyXG4gICAgICAgIHRleHRcclxuICAgICAgICAgIC5zZXRQbGFjZWhvbGRlcihcIioqKioqKioqXCIpXHJcbiAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MucGFzcylcclxuICAgICAgICAgIC5vbkNoYW5nZShhc3luYyAodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MucGFzcyA9IHZhbHVlO1xyXG4gICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgY29uc29sZS5sb2codGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgfSlcclxuICAgICAgKTtcclxuXHJcbiAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZShcIkJhY2tlbmRcIilcclxuICAgICAgLnNldERlc2MoXCJZb3VyIGJhY2tlbmRhZHJlc3MgKGUuZy4gaHR0cHM6Ly9zdGFuZWtzLmRlL2FwcHMvbWQybW9iaS8pIGNhbiBiZSB1c2VkIGZvciBmcmVlIG9yIGhvc3QgeW91ciBvd24gQmFja2VuZC5cIilcclxuICAgICAgLmFkZFRleHQoKHRleHQpID0+XHJcbiAgICAgICAgdGV4dFxyXG4gICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiaHR0cHM6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1BQUs7QUFDMUMsa0JBQUksVUFBVSxJQUFHLFdBQVcsUUFBUSxLQUFLLE1BQU07QUFDOUMsdUJBQU8sS0FBSyxVQUFVO0FBQUE7QUFBQTtBQUl4QixnQkFBSSxTQUFTLEtBQUssTUFBTTtBQUV4QixnQkFBSSxTQUFTLE1BQU0sS0FBSyxVQUFVLFFBQVEsUUFBUSxXQUFXLFdBQVc7QUFDeEUscUJBQVMsT0FBTztBQUFBLGlCQUVWO0FBQUE7QUFBQSxlQU1EO0FBRU4sY0FBSSxLQUFLLFNBQVMsU0FBUyxLQUFLLFNBQVMsUUFBUSxLQUFLLFNBQVMsY0FBYyxLQUFLLFNBQVMsU0FBUyxLQUFLLFNBQVMsUUFBUSxLQUFLLFNBQVMsYUFBYTtBQUVwSixvQkFBUSxJQUFJO0FBQ1osc0JBQVUsT0FBTztBQUFBLGlCQUtkO0FBQ0gsc0JBQVUsT0FBTztBQUFBO0FBQUE7QUFBQTtBQVNwQixhQUFPO0FBQUEsUUFDTjtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/main.ts b/main.ts index 56fa83d..06c8d24 100644 --- a/main.ts +++ b/main.ts @@ -28,6 +28,7 @@ const DEFAULT_SETTINGS: Partial < KindlePluginSettings > = { port: "", smtphost: "", pass: "", + expath: "", backend: "https://staneks.de/apps/md2mobi/", @@ -66,9 +67,11 @@ export default class Kindle extends Plugin { let lines = data.split("\n") let result = await this.Mergedown(lines, Inhalt, imagelist, imagename, links); Inhalt = result.Inhalt; - // get time in milliseconds + Inhalt = Inhalt.replace(/%%[\s\S]*?%%/g, ""); let time = new Date().getTime(); - this.app.vault.create(dokument.basename + '_mergedown_'+time+'.md', Inhalt); + let expath = this.settings.expath; + this.app.vault.createFolder(expath); + this.app.vault.create(expath +'/'+ dokument.basename + '_mergedown_'+time+'.md', Inhalt); if (lang == "de") { new Notice("✔️ Mergedown erfolgreich!"); } else { @@ -348,9 +351,22 @@ export default class Kindle extends Plugin { let base64 = Buffer.from(data).toString('base64'); imagename.push(file.name); imagelist.push(base64); - Inhalt += '\n!['+ file.name +'](data:image/'+ file.extension+';base64,' + base64 + ')' + '\n'; + Inhalt += '\n!['+ file.name +'](data:image/'+ file.extension+';base64,' + base64 + ')\n'; + } + + if (file.extension == "mp4" || file.extension == "webm" || file.extension == "ogv" || file.extension == "avi" || file.extension == "mov" || file.extension == "wmv" || file.extension == "mpg" || file.extension == "mpeg" || file.extension == "mkv" || file.extension == "flv" || file.extension == "swf" || file.extension == "vob" || file.extension == "m4v" || file.extension == "m4a" || file.extension == "m4b" || file.extension == "m4r" || file.extension == "3gp" || file.extension == "3g2" || file.extension == "f4v" || file.extension == "f4a" || file.extension == "f4b") { + let data = await this.app.vault.readBinary(file); + let base64 = Buffer.from(data).toString('base64'); + Inhalt += '\n\n'; } + if (file.extension == "mp3" || file.extension == "ogg" || file.extension == "wav" || file.extension == "flac") { + let data = await this.app.vault.readBinary(file); + let base64 = Buffer.from(data).toString('base64'); + Inhalt += '\n\n'; + } + + if (file.extension == 'md') { let links2: Array < string > = []; let data = await this.app.vault.cachedRead(file); diff --git a/manifest.json b/manifest.json index 7dd21b5..b9f2ece 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-kindle-export", "name": "Kindle", - "version": "0.0.9", + "version": "0.0.10", "minAppVersion": "0.13.24", "description": "Send .md as .mobi to Kindle", "author": "Simeon Stanek", diff --git a/settings.ts b/settings.ts index 8985d79..5f66e93 100644 --- a/settings.ts +++ b/settings.ts @@ -161,6 +161,20 @@ export class KindleSettingTab extends PluginSettingTab { }) ); + new Setting(containerEl) + .setName("Exportpath") + .setDesc("Set the path where you want to export your files to. (e.g. /folder)") + .addText((text) => + text + .setPlaceholder("/folder") + .setValue(this.plugin.settings.expath) + .onChange(async (value) => { + this.plugin.settings.expath = value; + await this.plugin.saveSettings(); + console.log(this.plugin.settings); + }) + ); + containerEl.createEl("hr"); containerEl.createEl("p", { text: "Host your own Obsidian2Kindle-Converter."}); containerEl.createEl("a", { text: "Fork from Github 🔗", href: "https://github.com/SimeonLukas/Obsidian2Kindle"}); diff --git a/versions.json b/versions.json index 650c3d5..03a2eaa 100644 --- a/versions.json +++ b/versions.json @@ -6,4 +6,5 @@ "0.0.7": "0.13.24", "0.0.8": "0.13.24", "0.0.9": "0.13.24", + "0.0.10": "0.13.24", }