File size: 900 Bytes
9703837 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | from __future__ import annotations
import argparse
from pathlib import Path
from .pipeline import convert_report
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description="Finansal PDF raporunu doğrulanmış Excel dosyasına dönüştürür."
)
parser.add_argument("input", type=Path, help="PDF veya görüntü dosyası")
parser.add_argument("-o", "--output", type=Path, help="Çıktı XLSX yolu")
return parser
def main() -> None:
args = build_parser().parse_args()
result = convert_report(args.input, args.output)
print(f"Durum: {result.validation.status}")
print(
f"Hata: {result.validation.error_count} · "
f"Uyarı: {result.validation.warning_count} · "
f"Bilgi: {result.validation.info_count}"
)
print(f"Excel: {result.output_path}")
if __name__ == "__main__":
main()
|