Live data from Hacker News

Converting Markdown to ePub or Mobi Using Pandoc

themythicalengineer.com

31–40 of 56 posts

Re: Converting Markdown to ePub or Mobi Using Pandoc

#31

Is Pandoc being used mostly to join the files? I recently started converting Markdown files to epub (and kepub) for my new Kobo. I load the Markdown straight into Calibre though. On a side note, is there some benefit to mobi over epub? Kepub seems to be the preferred format on Kobo, because for some reason it turns pages _much_ faster than epub and gives access to reader statistics (if one cares about that).

>On a side note, is there some benefit to mobi over epub?

AFAIK Amazon Kindle devices can read mobi files but not epub files (unless you convert them to something else first).

(The mobi format is older, so if you want to read an ebook on your old Palm Pilot PDA then you'll probably want mobi.)

Re: Converting Markdown to ePub or Mobi Using Pandoc

#32
post #29
post #25

Don't want to be a troll, but if you are writing anything that is not a README and/or is a book or booklet or bookish, do yourself a favor and use Asciidoc instead.

Give me a reason to use asciidoc rather than bookdown.

I assume the person you're replying to was referring to Markdown rather than Bookdown. It seems that Asciidoc was designed for the direction which Markdown has going with all these variants. If you find yourself chasing these Markdown variants to get more flexibility, then Asciidoc might be what you're looking for.

I don't know anything about Bookdown and it may be similar to Asciidoc. I would be willing to bet that Asciidoc would be around longer than most of the MD variants though.

Why might you want to continue using MD flavors? You already have loads of MD docs and you have no control over the processes which create them (shared environment, higher-ups force you to use MD, etc.)

NOTE: If you're interested in Asciidoc, also take a look at Asciidoctor.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#33
You know, I bet it wouldn't take that much to go from epub to PDF, suitable for printing and binding. The structural information is pretty much all there, I think - it'd just need pagination and formatting for print, really.

I'd definitely want to use such a thing, as a way to feed my bookbinding hobby. I wonder if anyone else would?

Re: Converting Markdown to ePub or Mobi Using Pandoc

#34
post #21

Why wget|dpkg and wget|sh instead of apt to download Pandoc and Calibre? You should be able to replace all this: !wget https://github.com/jgm/pandoc/releases/download/2.11.3.2/pandoc-2.11.3.2-1-amd64.deb !sudo dpkg -i pandoc-2.11.3.2-1-amd64.deb !apt install libgl1-mesa-glx -y !wget -q -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin With simply this: !apt install pandoc calibre

Calibre website strongly recommends downloading from their site instead of OS packages, mentioning that the packages are often out of date. And I've generally found this to be true - Calibre versions on package repos are often several versions behind, more than the usual "package maintainer trying to play catch up" differences.

I'm usually averse to the wget|sh installs, but in this case it seems worth it. You can inspect the .sh file (which is really mostly Python code) before running it, just to not get into the bad habit of directly piping in code from the internet.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#35
post #21

Why wget|dpkg and wget|sh instead of apt to download Pandoc and Calibre? You should be able to replace all this: !wget https://github.com/jgm/pandoc/releases/download/2.11.3.2/pandoc-2.11.3.2-1-amd64.deb !sudo dpkg -i pandoc-2.11.3.2-1-amd64.deb !apt install libgl1-mesa-glx -y !wget -q -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin With simply this: !apt install pandoc calibre

Calibre website strongly recommends downloading from their site instead of OS packages, mentioning that the packages are often out of date. And I've generally found this to be true - Calibre versions on package repos are often several versions behind, more than the usual "package maintainer trying to play catch up" differences. I'm usually averse to the wget|sh installs, but in this case it seems worth it. You can in…

> You can inspect the .sh file

That's not the issue. Installing software this way means you have no automatic updates in the future. It's fine if you re-run the install script on a regular basis (eg. by recreating containers) AND you don't pin versions

But OP's instructions fail both: there is no mention of updates, and they pin the pandoc version.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#36
post #25

Don't want to be a troll, but if you are writing anything that is not a README and/or is a book or booklet or bookish, do yourself a favor and use Asciidoc instead.

This! Asciidoc is the grown-up brother of Markdown. Designed to scale up to entire books, handle images, tables, references, citation, book indexes, maths.

And the syntax is very friendly and intuitive.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#37
post #30
post #23

Earlier quoted context omitted.

what would be advantages to going to Deepnote from regular Jupyter notebooks based workflow? Let's assume someone who has been working with Jupyter notebooks(mostly Python based) for a long time. Are Deepnote notebooks exportable? The big worry is that you guys decide to pivot or radically change your pricing model and there is no offramp. By comparison I don't mind using Google Colab. If Google Colab decides to shut…

Deepnote internally supports .ipynb format and you can always export the Deepnote notebook to .ipynb similarly as you'd in Colab. In general the main selling points are live collaboration (you can work on a notebook with you team as you'd do on a google doc), and integrations (you can plug-in your snowflake db, or s3 bucket or whatever, and have it connected for any further analysis, or a long-term training, etc. For…

Thank you for the answers!

I can absolutely see a need for collaboration tool. Collaboration on regular Jupyter is a pain. I create a shared folder for coworkers and well read/write permissions* are not fun.

* knows chmod - https://www.reddit.com/r/linux/comments/dily0/i_know_how_to_...

Re: Converting Markdown to ePub or Mobi Using Pandoc

#38
post #25

Don't want to be a troll, but if you are writing anything that is not a README and/or is a book or booklet or bookish, do yourself a favor and use Asciidoc instead.

This! Asciidoc is the grown-up brother of Markdown. Designed to scale up to entire books, handle images, tables, references, citation, book indexes, maths. And the syntax is very friendly and intuitive.

And it's quite easy to insert compiled images, e.g. Graphviz, UML diagrams, Ditaa, just by having the SOURCE in your document.
Post reply on HN