sasanarakkha / pali-english-recitations

Sāsanārakkha Pāli-English Recitations
https://sasanarakkha.org/
Other
8 stars 1 forks source link

Unnecessary files in a EPUB artifact #17

Closed bergentroll closed 5 months ago

bergentroll commented 1 year ago

When opening the SBS_Pali-English_Recitations.epub from the releases with Sigil, it says there is a plenty redundant entries in file, which are not listed in the Manifest:

current-recitations.epub
source/pali-only-sandhi-split-canonical.txt
source/pali-only-sandhi-split.txt
source/pali-only-without-split.txt
source/pali-only.txt
tex/*.tex

The first one is also about a half of a resulting size.

If bhante like, I may exclude them in the Makefile.

paladhammika commented 1 year ago

Dear Bergen,

The project has been on a bit of a hiatus lately. I'm attempting to wrap it up. Would you be willing to explain what causes the the build to fail?

bergentroll commented 1 year ago

The reason is zip includes any from the manuscript/ dir. So the clear way to fix will be to move manuscript/tex/ and other redundant for EPUB entries to another location. Other more simple way is to pass list of required files to zip explicitly.

:pray: :pray: :pray:

bergentroll commented 1 year ago

Oh, now I figured out you asked about current upload error. I will check it.

bergentroll commented 1 year ago

Well, there is a couple of errors.

  1. Makefile trying to download epubcheck with curl, but there is no curl in the image. I would suggest to make downloading executable optional in the Makefile, i. e. no targets should depends on $(EPUBCHECK). There is already the epubcheck command in the image, but it needs little fix. If you would like, I will update.

  2. make optimize target fails because of No META-INF/container.xml in epub error. Sorry, bhante, I do not know where the container.xml must coming from.

If building the EPUB is not crucial, it may be disabled as in the example just to avoid the errors.

bergentroll commented 1 year ago

There is already the epubcheck command in the image, but it needs little fix.

epubcheck shipped in the image has been fixed.

paladhammika commented 1 year ago

If bhante like, I may exclude them in the Makefile.

Please do. If they aren't already.

So the clear way to fix will be to move manuscript/tex/ and other redundant for EPUB entries to another location.

Okay I did just that. I split up the different text formats into their own directories inside the project root.

There is already the epubcheck command in the image, but it needs little fix. If you would like, I will update.

This has been already fixed, no?

make optimize target fails because of No META-INF/container.xml in epub error. Sorry, bhante, I do not know where the container.xml must coming from.

This is in the epub which I was removing when using make extractcurrent. I've removed those lines in the make command.

paladhammika commented 1 year ago

I attempted to bring the 'sasanarakkha-build-actions' to the sasanarakkha organzation (https://github.com/sasanarakkha/document-build-actions).

bergentroll commented 1 year ago

Please do. If they aren't already.

A resulting epub contains now only redundant current-recitations.epub. In the PR21 it made ignored.

Also epub/current-recitations.epub as a local binary artifact should not be even presented in the repository. It seems, you already had add it to the .gitignore, but file is still here.

This [epubcheck] has been already fixed, no?

The Makefile uses assets/tools/epubcheck/, and it is also installed epubcheck in the building image. The image built-in epubcheck had been fixed to run with epubcheck command, but it is not using by the Makefile for now.

It is also may not be optimal to keep exterial binary files (like epubcheck and kindlegen) in a git repository because its will be transferred and processed on every repository recieving including CI build action.

paladhammika commented 5 months ago

It is also may not be optimal to keep exterial binary files (like epubcheck and kindlegen)

Understood. I removed assets/tools/epubcheck/ and the redundant current-recitations.epub

image

bergentroll commented 5 months ago

mobi target switched to Calibre.

Also Makefile requisites fixed to avoid rebuilding artifacts: recurrent make run recreates only *.tex from recitations.tex.org. latexmk is a new dependency to build PDF for the same sake.

Fixed validate and optimize actions.