import argparse import logging from pathlib import Path from typing import Any from personal_data.csv_import import load_csv_file logger = logging.getLogger(__name__) def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument( 'file', type=Path, ) parser.add_argument( 'output_file', type=Path, ) return parser.parse_args() def format_data_to_html(data: list[dict[str, Any]], mode: str = 'latest') -> str: sample = data[-1] l = [] l.append('') l.append('
') for k, v in sample.items(): l.append(f'