Fix package structure and lazy-import ODT formatter

Add missing __init__.py to formatters/ so setuptools.find_packages
includes the subpackage in wheel/sdist builds (#16).

Move ODTFormatter import from top-level to lazy import inside
get_formatter_by_extension() so missing odfpy no longer crashes module
load before main() runs. Remove dead except ImportError handler in
cli.py save() block; surface a clear 'odfpy is not installed' message
when the formatter factory returns None for .odt (#25).

Closes #16, closes #25
This commit is contained in:
Артём Кокос
2026-06-25 20:42:13 +07:00
parent 0e4e0f3ee2
commit 3956decd4e
5 changed files with 132 additions and 16 deletions

View File