View Single Post
Old 11-09-2019, 03:12 AM   #1
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,728
Karma: 15356729
Join Date: Dec 2010
Device: Kindle PW2
[Plugin] MarkdownImport - Markdown to HMTL converter

Released: November 11, 2019
Current Version: "0.1.2"

This plugin allows you to import self-contained UTF-8-encoded Markdown files and plain text files without markup.
For more information on the Markdown syntax, see this website, which also offers an interactive Markdown tutorial for beginners.

Credits

This plugin uses cmark-gfm for the actual conversion. (KevinH and DiapDealer kindly provided the macOS and Windows binaries bundled with this plugin. KevinH also updated the code to support non-standard epubs.)

System requirements

This plugin requires Sigil 0.9.8 or higher. If you uncheck the Use Bundled Python option, you'll also need to install Python 3 and PyQt5. Linux users will also need to install the cmark-gfm package.

Installation

1. Select Manage Plugins from the Plugins menu and enable the Use Bundled Python option, if it isn't already enabled (or greyed out).
2. Click Add Plugin and select MarkdownImport_v0.1.1.zip. This will install the plugin, which you can select via Plugins > Edit > MarkdownImport.

If you want to test the plugin, copy test.md and plugin.png from the plugin folder to your Desktop folder, run the plugin and then select test.md as the input file.

Settings

Advanced users can change some conversion settings by editing the following MarkdownImport.json entries:

"extensions": ["footnotes", "table", "strikethrough", "autolink", "tagfilter"],

This entry defines the extensions that'll be used. For more information on these extensions, see the GitHub Flavored Markdown Spec guide.

"strong": true,

By default, the plugin will generate <strong> and <em> tags. If you prefer <b> and <i> tags, change this setting to false.

"sigil_split_marker": false,

If you change this setting to true, the plugin will add sigil_split_marker class attributes to all <hr> tags (defined as --- in Markdown files). This will allow you to split the file using Edit > Split At Markers.

"cmark_exe_path": "C:\\Users\\user\\AppData\\Local\\sigil-ebook\\sigil\\plugins\\MarkdownImport\\cmark-gfm.exe"

This entry defines the cmark-gfm path. You can change this setting to specify a custom cmark-gfm path.

License: GNU General Public License v3 (GPL-3)
Attached Files
File Type: zip MarkdownImport_v0.1.2.zip (208.9 KB, 19 views)

Last edited by Doitsu; 11-10-2019 at 01:33 AM. Reason: Attached new version with Sigil 1.x support
Doitsu is offline   Reply With Quote