$ show akretion/factur-x
factur-x is a Python library for generating, validating, and extracting Factur-X/ZUGFeRD hybrid PDF+XML invoices. It exposes a high-level API (generate_from_file, generate_from_binary, get_xml_from_pdf, xml_check_xsd, xml_check_schematron, generate_cii_xml, generate_ubl_xml) and three CLI entry points (facturx-pdfgen, facturx-pdfextractxml, facturx-xmlcheck). The library supports both CII (Cross-Industry Invoice) and UBL 2.1 XML profiles, and bundles the necessary XSD schemas, Schematron/XSLT validation rules, and code-list databases. It is a standards-compliance tool for e-invoicing, not a data pipeline or research project.
The LLM identified 3 files worth highlighting for reuse:
Core public API exposing generate_from_file, generate_from_binary, get_xml_from_pdf, xml_check_xsd, xml_check_schematron, generate_cii_xml, and generate_ubl_xml. It encapsulates the complexity of Factur-X/ZUGFeRD XML generation and validation behind simple functions. Reusable as a reference implementation for building similar standards-compliant XML libraries, though it depends on the package's bundled schemas.
A ready-to-use Schematron/XSLT validation rule set for Order-X Basic documents. It encodes business-rule assertions (attribute requirements, code lists) in a portable XSLT form that can be executed with Saxon or similar processors. Could be extracted and reused as a standalone validator for Order-X Basic, though it is tightly coupled to the D20B/Comfort message version.
XML test fixture annotated with inline BT-code comments (e.g., BT-1, BT-2) that map elements to EN 16931 business terms. This pattern turns fixtures into self-documenting validation inputs and is a useful convention for standards-based XML projects, making it a reusable testing pattern beyond this repository.