💾 Archived View for dioskouroi.xyz › thread › 25004215 captured on 2020-11-07 at 00:54:26. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
________________________________________________________________________________
Looks like a very nice tool.
Question about the GitHub repo, out of curiosity. Did you only start using git in preparation of the open source release?
I don't know PHP. Since your code base looked clean, was hoping to learn some PHP by following along with your git logs, but the beginning of the Ibis universe was only 2 days ago with a very mature code base.
Not op but I know him via the PHP community. You can find a lot of his code in the laravel framework. Super smart dude.
Thanks! :)
Hey. I started with git since the beginning but wiped out the repo history just before making it public. The commits were all "wip" anyway :D I wasn't sure I'll make it public as I was mainly doing this to generate my eBook.
Any good example repo where you can learn about the code as well as evolution by following the git log and commit history?
Papyrus?!?!?
https://www.youtube.com/watch?v=jVhlJNJopOQ
haha. That's hilarious :D
Is there something like this but that does markdown to ePub?
Pandoc
is described as a Universal Document Converter. It can convert markdown (and quite a few other formats) into ePubs, PDFs, doc files, etc. If you need to produce eBooks, Pandoc is a more powerful tool. It's been around for quite a while, and it's very well documented.
I am using pandoc with amazon kdp and it works nicely.
How this tool is different from pandoc?
pandoc supports wide variety of conversions from one format to another, markdown to epub is one of them.
I use pandoc to generate pdf/epub from GitHub style markdown. Here's my custom script for epub:
https://learnbyexample.github.io/customizing-pandoc/#customi...
Epubs are zip files, I wrote PHP code that generates the file using the specification. Use the command line apps that already exists if those do the job but if you want to control exactly how the epub content looks don't be afraid dig a bit.
Check out Pandoc!
From glancing over the code it seems you use Primarily html to control the layout. Is this assumption right?
Some HTML but mostly CSS.
Yeah that’s what I meant. It seems much more convenient to generate PDF layouts this way than to use standard layout structure like you would with tcpdf or similar.
I know there are a bunch of caveats AKA the browser generally helps renders smarter and some features don’t translate well. But generally I prefer your approach.
The sample PDF looks very pretty!
It looks a bit like a printed webpage though, considering it is supposed to be an A4 paper the font is too large.
I went for the large fonts to make it easier for people to read. You can customize everything about fonts and styling while generating your own book.
Technically commendable. But please please please stop contributing to PDF, especially in the conversion _to_ PDF. It’s a horrible format.
I am sure you have an alternative suitable and ready for the masses?
epub 2 and epub 3 are both much better formats than PDF if you really want to publish ebooks.
PDF is not reflowable and results in a crappy reading experience unless the device screen size is just right.
PDF is ultimately for paper when you care about how the content fits on each page. A reflowable format will have to at some point be rendered to pages if one is to go to paper, and I can't think of anything better than PDF for storing that rendering.
epub is basically many html files packaged together and indexed. So rendering for printing can be taken care of with the right media-querying CSS.
HTML.
Accessible, lighter, works on screen readers, extensible, a standard.
You forgot the horror of printing and rogue JS assisted bitcoin mining.
Printing can actually be fixed with the right CSS. The opposite is not true for PDF: you can't fix PDF for responsive rendering.
As for rogue JS, there are good, open-source countermeasures such as dompurify.
Unless it is the Pandoc markdown dialect (and perhaps not even then) the fact that it is markdown and not some more powerful language, already tells me, that its use is rather limited. If it was for example rst, it would be actually useful also for technical and scientific documents in general, which have sometimes need of document internal referencing of arbitraty elements, not only headings. Then of course all the other things Pandoc markdown brings, that are more geared towards finding a syntax for citations and footnotes etc. If all of that is not available either, the use is already quite limited.
Glancing at the source code it seems that it's GitHub flavored markdown.