How to 'send' and Inkdrop MD document to Pandoc

Let’s imagine that I write down a MD document in Inkdrop, and I want it to be ‘compiled’ or processed by Pandoc (for instance, to convert it to HTML or PDF format). How can this be done??


EDIT: I guess I can just ‘copy’ the document in Inkdrop and save it as a .MD text document, and then process it with Pandoc.

Do you have any other suggestion about how to do this (ideally, with fewer steps)?

2 Likes

Well, there are a few options you can accomplish that.

Use backup files

Inkdrop backs up your notes continuously in a simple JSON format.

You can watch the file changes, then send them to Pandoc with a script written in your favorite language.

Use plain_text_backups plugin

It’s created by @Ryan_McQuen. It allows you to backup files but in .md format.
So you don’t have to understand the backup format.

Use local HTTP server

Another programmatic way to process notes is to use the local HTTP server feature:

It allows you to access your note database via a simple REST API.


Hope that helps!

3 Likes

I would also suggest that pandoc is a very versatile tool, but actually, the pipeline to go from Markdown to PDF goes through LaTeX (unless I am mistaken), which I think is really a deprecated way of going about it.

I recommend you look at the wonderful md-to-pdf:

In the beginning, I thought that using headless Chrome + Node.js for such a simple conversion was overkill, but I have gotten around. I use md-to-pdf in GitHub Actions continuous integration when writing exams for my students: I commit changes to the markdown file in the repo, and the continuous integration generates a PDF that I can provide students.

1 Like

There’s nothing deprecated about LaTeX. Development is still very active. But beyond that, Pandoc supports several PDF engines besides LaTeX.

1 Like

Hello @Ryan_McQuen,

You are correct, I completely agree. There’s nothing deprecated about LaTeX.

What I meant, is that between when pandoc was first created in 2006, and now, it’s much more likely that someone who is using this conversion would know how to write some CSS than some LaTeX to tweak the output format. That is what I meant by deprecated: Today, I would expect it is more likely to find a user that can cobble together some CSS to change attributes than some LaTeX, and so I think a more pertinent tool to convert from Markdown to PDF would expose styling as CSS. But you’re right that it’s just my opinion.

Also I did not know that pandoc allowed using different PDF engines. I just looked it up and it seems Weasyprint is an open source engine that uses HTML/CSS as an intermediate rendering format. That could be a good option to use.