Here's a public notebook in Deepnote if anyone wants to play around with the code or duplicate it: https://deepnote.com/project/Converting-Markdown-to-Epub-or-...
2 fun facts about Deepnote:
1. You can create a Custom environment by writing a Dockerfile with all the libraries you need to install and everytime you're in a need to re-use a similar functionality (e.g. convert yet another book to mobi), you can just fire it up and all will be preinstalled. https://docs.deepnote.com/environment/custom-environments
2. You can turn any notebook to a blogpost right away and publish within Deepnote directly.
Disclaimer: I'm a software engineer at Deepnote.
It's like a shell to a vm but in a notebook format that you can then use to blog?
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 shutdown or 100x their price I can take my .ipynb files and use them on my local littlest JupyterHub instance.
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 many non-software-developer data scientists, it's also easier to work in a cloud environment compared to installing stuff locally, and to version their notebooks in Deepnote instead of git. But this really depends on the particular workflow that one has.
Here's how I did it in case anyone is interested: https://pascalprecht.github.io/posts/writing-an-ebook
And the syntax is very friendly and intuitive.
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:
(Pandoc will ingest Asciidoc as well as Markdown, FWIW.)
For new projects, we use Asciidoctor - it does everything but chunked HTML, and it's a pleasure to use.
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.
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 calibreI'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.
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.
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 to use the latest pandoc lead to the wget pull and install, which thanks to their DEB design is easy and clean to do in an ephemeral CI container.
If you are interested in knowing how to customize `pandoc` for generating PDF/EPUB, I have a tutorial [0] based on books I've written. I also have links at the end with related resources, including tools others than `pandoc`.
See this comment from Deepnote engineer for more details: https://news.ycombinator.com/item?id=26899905
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).
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.)
https://digitalsuperpowers.com/blog/2019-02-16-publishing-eb...
I'd definitely want to use such a thing, as a way to feed my bookbinding hobby. I wonder if anyone else would?