| 123456789101112131415161718192021222324 |
- """Example using the current parser and CSV export service."""
- from pathlib import Path
- from mlog_tool.services import MLogService
- def main() -> None:
- service = MLogService()
- sample_log = Path(__file__).resolve().parents[2] / "mlog16.bin"
- output_dir = Path(__file__).resolve().parents[1] / "example_csv_output"
- parsed_log = service.parse(sample_log)
- print(f"Parsed: {parsed_log.source_path}")
- print(f"Data buses: {len(parsed_log.buses)}")
- print(f"Exporting CSV files to: {output_dir}")
- written_files = service.export_csv(parsed_log, output_dir)
- print(f"Exported {len(written_files)} CSV files")
- if __name__ == "__main__":
- main()
|