This project generates an EPUB ebook of the EU Cyber Resilience Act (Regulation (EU) 2024/2847) from the official Formex XML source.
curlandunzip- for downloading the sourcexsltproc- for XML transformationpandoc- for EPUB generation
On NixOS/with devenv, simply run devenv shell to get all dependencies.
Download the Formex XML source and build the EPUB:
make formex # Download source XML from EUR-Lex
make # Build cra.epubOr in one step (if formex directory doesn't exist):
make formex && makeTo clean up generated files:
make clean- Source: The official Formex XML is downloaded from the EU Publications Office Cellar API
- Transform: XSLT transforms the XML to clean HTML with proper structure
- Convert: Pandoc converts the HTML to EPUB3 with embedded styles
render.xslt- XSLT transformation from Formex XML to HTMLstyles.css- Ebook stylingmetadata.yaml- EPUB metadata (title, author, etc.)Makefile- Build automation
The code in this repository (XSLT, CSS, Makefile, etc.) is licensed under the MIT License. See LICENSE for details.
The EU Cyber Resilience Act text itself is © European Union, 2024. According to EU policy, reuse is authorised provided the source is acknowledged.
Note: This repository only contains the transformation code, not the generated EPUB. You need to build the ebook yourself using the instructions above. I haven't investigated the legal situation around redistributing EU legislative documents and couldn't be bothered to figure it out.