Automate exporting to HTML

MrC's Avatar

MrC

25 Jan, 2019 02:54 AM

I need to build an HTML file from a base md file, and some make(1) auto-generated md files. I currently manually export as HTML via Marked 2.

The makefile builds an archive, and the archive contains the HTML file.

In a quick, cheesy fashion, as part of the build steps, I'm currently opening Marked 2 and holding the build process (open -W) until Marked 2 is closed (i.e. I manually export as HTML, and Quit). This is not elegant.

Is there a way to script Marked 2 to export in a desired format? I suppose I could write some AppleScript to do this, but... AppleScript. A URL handler would be nice here.

  1. Support Staff 1 Posted by Brett on 25 Jan, 2019 03:02 AM

    Brett's Avatar

    At this time there's no automated way to export via Marked. Part of the
    reason I've always hesitated to put too much time into fully automating
    Marked's export is the plethora of command line tools already available.
    Is there a specific Marked feature that you'd need to replicate in a
    command line tool like Pandoc or MultiMarkdown?

    -Brett

  2. 2 Posted by MrC on 25 Jan, 2019 04:12 PM

    MrC's Avatar

    The primary usage for me is to visually review changes I make to docs before I package them up. I'm sure I could get MultiMarkdown to generate what I need (I may be using a few Marked 2-specific features, but I'd have to re-check).

    I like to make my changes, and review them real-time; Marked 2 has been wonderful for this.

    Don't worry about this one - I'll work out a reasonable workflow. I don't put out that many package updates, so I'll just be sure to generate my docs first, then build the package. With some judicious Makefile dependency alterations, I should be able to streamline the process.

    Thanks for you great support.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac