GenderDysphoria / GenderDysphoria.fyi

Site code
Other
224 stars 63 forks source link

Add EPUB download option #87

Open Freso opened 2 years ago

Freso commented 2 years ago

EPUB is a much more accessible format for ebook readers and mobile devices than PDFs (most of the time anyway), so it would be really nice to have an option for downloading as that.

I tried looking through the source to see how the PDF was made, since the more efficient path would be to automate the generation of the EPUB, but I didn’t find anything. Is the PDF manually updated? If so, I can probably make a commandline command or a small Python script that will compile the EPUB (pandoc should be able to deal with the brunt of it) on command.

ErdaradunGaztea commented 2 years ago

Just a small thought — perhaps we could utilize Github Actions to run potential document-compiling scripts?

Twipped commented 2 years ago

Yes, I had been making the PDF manually by printing to PDF. I would LOVE a github action to handle that, if somebody wants to spearhead it.

gjvnq commented 2 years ago

Look at how I implemented WARC generation. This might be able to be adapted into generating an EPUB.

As for generating PDF, one option would be using something like Chrome Puppeteer.

If you folks want, I think I can make the EPUB generation happen almost entirely in gulp. I would likely still use W3C's epubcheck for the final step as this tool can detect lots of potential mistakes in the EPUB.