Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Makefile target to include Annexes in (ePub) output #190

Open
toonn opened this issue Jun 10, 2024 · 1 comment · May be fixed by #212
Open

Add a Makefile target to include Annexes in (ePub) output #190

toonn opened this issue Jun 10, 2024 · 1 comment · May be fixed by #212
Assignees

Comments

@toonn
Copy link
Contributor

toonn commented Jun 10, 2024

The ePub output provided is much appreciated. Technical documents such as the ARF are a great use of otherwise hard to productively use commute time and eReaders allow a more comfortable reading experience.

The ARF contains many references to its annexes, which are accessible on the website due to how URLs work and the annexes are hosted. However, after conversion to ePub those links are not functional.

The Markdown annexes can be very easily appended to the ePub output.

diff --git a/Makefile b/Makefile
index 56d2094..3e4b054 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ PANDOC_EPUB_OPTIONS=--to epub3
 
 %.epub : %.md
        mkdir -p $(BUILD_DIR)/epub
-       $(PANDOC) $(PANDOC_OPTIONS) $(PANDOC_EPUB_OPTIONS) -o $(BUILD_DIR)/epub/$(notdir $@) $<
+       $(PANDOC) $(PANDOC_OPTIONS) $(PANDOC_EPUB_OPTIONS) -o $(BUILD_DIR)/epub/$(notdir $@) $< docs/annexes/*/*.md
 
 
 # Targets and dependencies

This is a kludgy implementation as a proof of concept. It would happily append the annexes to any ePub generated with the Makefile, which is undesirable.

However, this does not work for the majority of annexes, which are not in the Markdown format. The PDF figures could be converted to PNG images and included in their own separate Markdown file. This would cover annex 4. Annex 5 contains two PDF documents that might be converted to Markdown if they're being authored as part of this repository.
Annex 6 would be the biggest stumbling block since it's a large PDF document authored independently by ENISA, though covering all the annexes but one would still be an improvement.

Note that while I'm particularly interested in the ePub output, this would apply to any non-hosted version of the ARF, such as the PDF and Docx outputs. Even a self-contained version of the HTML output might be useful for those who prefer scrolling through a single page and using browser native find functionality for the ARF and its annexes.

@skounis skounis self-assigned this Jun 11, 2024
skounis added a commit to skounis/architecture-and-reference-framework that referenced this issue Jun 26, 2024
@skounis
Copy link
Contributor

skounis commented Jun 26, 2024

@toonn Could you please review the following PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants