diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..4b54b4c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 samuele-cozzi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
index a8f9365..4db0af9 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,21 @@
# Marp Slides for Obsidian
+[](https://github.com/samuele-cozzi/obsidian-marp-slides/releases/latest)
+
[](https://www.codefactor.io/repository/github/samuele-cozzi/obsidian-marp-slides)
[](https://codeclimate.com/github/samuele-cozzi/obsidian-marp-slides/maintainability)
[](https://codeclimate.com/github/samuele-cozzi/obsidian-marp-slides/test_coverage)
+[](https://github.com/samuele-cozzi/obsidian-marp-slides/blob/main/LICENSE)
----
+Marp Slides is simple slide deck extension for [Obsidian](href="https://obsidian.md")
-Advanced Slides is the perfect slide deck extension for Obsidian
+
-
+See the documentation of [Marpit Markdown](https://marpit.marp.app/markdown) and [the features of Marp Core](https://github.com/marp-team/marp-core#features) about how to write.
+
+> Please refer **[https://marp.app/][marp]** for more details of Marp ecosystem. We have powerful tools for Marp Markdown: [Marpit Framework](https://marpit.marp.app/), [CLI tool](https://github.com/marp-team/marp-cli), [Web interface](https://web.marp.app/) and so on.
+
+[marp]: https://marp.app/
---
@@ -24,6 +31,22 @@ image
### Export deck (html, pdf, pptx, img)
+We have integrated [Marp CLI][marp-cli] to export your deck into several formats.
+
+To export the content of active Markdown editor execute command from the Command Palette (F1 or Ctrl/Cmd+P).
+
+[marp-cli]: https://github.com/marp-team/marp-cli/
+
+#### Supported file types
+
+- **HTML**
+- **PDF**
+- **PPTX** (PowerPoint document)
+- **PNG** (_First slide only)_
+- **JPEG** (_First slide only)_
+
+> ⚠️ Export except HTML requires to install any one of [Google Chrome](https://www.google.com/chrome/), [Chromium](https://www.chromium.org/), or [Microsoft Edge](https://www.microsoft.com/edge). You may also specify the custom path for Chrome / Chromium-based browser by preference `markdown.marp.chromePath`.
+
image
### Custom Theme
diff --git a/src/utilities/marpExport.ts b/src/utilities/marpExport.ts
index 94dfeef..fb1ccd6 100644
--- a/src/utilities/marpExport.ts
+++ b/src/utilities/marpExport.ts
@@ -1,4 +1,4 @@
-import { CLIError, CLIErrorCode } from '@marp-team/marp-cli'
+import marpCli, { CLIError, CLIErrorCode } from '@marp-team/marp-cli'
export class MarpCLIError extends Error {}
@@ -32,7 +32,7 @@ export class MarpExport {
throw e
} finally {
- process.env.CHROME_PATH = CHROME_PATH
+ //process.env.CHROME_PATH = CHROME_PATH
}
}
@@ -66,10 +66,11 @@ export class MarpExport {
//console.info(`Execute Marp CLI [${argv.join(' ')}] (${JSON.stringify(opts)})`)
console.info(`Execute Marp CLI [${argv.join(' ')}]`);
+ console.log(process.env.CHROME_PATH);
- const { marpCli } = await import(
- '@marp-team/marp-cli'
- )
+ // const { marpCli } = await import(
+ // '@marp-team/marp-cli'
+ // )
//exitCode = await marpCli(argv, opts)
marpCli(argv)
@@ -84,7 +85,5 @@ export class MarpExport {
console.log("Errore");
console.log(e);
});
-
}
-
}
\ No newline at end of file