That's how I wrote and self-published my book as well! Although, I created a script that turns md to epub/mobi/pdf using pandoc. Here's how I did it in case anyone is interested: https://pascalprecht.github.io/posts/writing-an-ebook
Converting Markdown to ePub or Mobi Using Pandoc
41–50 of 56 posts
Re: Converting Markdown to ePub or Mobi Using Pandoc
#42Note that mobi format is being deprecated by Amazon. If you're producing a file for distribution by Amazon, you only need the epub file.
Re: Converting Markdown to ePub or Mobi Using Pandoc
#43Note that mobi format is being deprecated by Amazon. If you're producing a file for distribution by Amazon, you only need the epub file.
However, Kindles can't read epub directly. If you're trying to produce a file you can sideload on your (or your customer's) Kindle without going through Amazon, you're still gonna need mobi, or one of the later proprietary (and undocumented) Amazon mobi variants.
Re: Converting Markdown to ePub or Mobi Using Pandoc
#44Earlier quoted context omitted.
However, Kindles can't read epub directly. If you're trying to produce a file you can sideload on your (or your customer's) Kindle without going through Amazon, you're still gonna need mobi, or one of the later proprietary (and undocumented) Amazon mobi variants.
True, but I wouldn't count on that being supported forever.
Re: Converting Markdown to ePub or Mobi Using Pandoc
#45Don'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.
It was created as an equivalent to DocBook XML for the creation of book-length technical documents. It has a rich history and is well supported in many places (try writing a README.adoc for your next GitHub-hosted repo).
It is also currently undergoing a standardization process:
Re: Converting Markdown to ePub or Mobi Using Pandoc
#46Don'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.
(Pandoc will ingest Asciidoc as well as Markdown, FWIW.)
Re: Converting Markdown to ePub or Mobi Using Pandoc
#47Earlier quoted context omitted.
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…
One feature I wanted that made me go with bookdown is that the static website it creates has search builtin.
Re: Converting Markdown to ePub or Mobi Using Pandoc
#48Why 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
I use pandoc in a CD pipeline, the version in the repos is stale compared to upstream (normal, that's how it is) unless you're on a rolling distro like Arch. I have reported pandoc bugs and had them fixed (great dev team), pulling the latest single-DEB install (no deps, unlike the one in the Debian repo) and using it gets all the latest updates which matter to a process like this. In this particular case your needs t…
Re: Converting Markdown to ePub or Mobi Using Pandoc
#49Earlier quoted context omitted.
I use pandoc in a CD pipeline, the version in the repos is stale compared to upstream (normal, that's how it is) unless you're on a rolling distro like Arch. I have reported pandoc bugs and had them fixed (great dev team), pulling the latest single-DEB install (no deps, unlike the one in the Debian repo) and using it gets all the latest updates which matter to a process like this. In this particular case your needs t…
Do you have any more details about how you integrated Pandoc into your pipeline? A post or something?
image: debian:latest
before_script:
- bash myscript.sh
Your myscript.sh can be as simple as four lines (one to install curl, it's not a default on Debian), example: apt-get -y install curl
VERSION=$(curl -s "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
curl -sLo "pandoc-${VERSION}-1-amd64.deb" "https://github.com/jgm/pandoc/releases/download/${VERSION}/pandoc-${VERSION}-1-amd64.deb"
apt-get -y install "./pandoc-${VERSION}-1-amd64.deb"
The Github API used above has the nice default of listing the latest release as you see used there in the grep on the right, one could enhance that with `jq` for higher intelligence but this very simple setup is functional as a starting point to develop your own style.Re: Converting Markdown to ePub or Mobi Using Pandoc
#50Is 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).