import argparse
from kerykeion import Report, AstrologicalSubject, KerykeionChartSVG

def main():
    # Initialize the argument parser
    parser = argparse.ArgumentParser(description="Generate an astrological report.")
    
    # Add arguments to the parser
    parser.add_argument("name", type=str, help="Name of the person")
    parser.add_argument("year", type=int, help="Birth year")
    parser.add_argument("month", type=int, help="Birth month")
    parser.add_argument("day", type=int, help="Birth day")
    parser.add_argument("hour", type=int, help="Birth hour")
    parser.add_argument("minute", type=int, help="Birth minute")
    parser.add_argument("city", type=str, help="Birth city")
    parser.add_argument("nation", type=str, help="Birth nation")

    # Parse the arguments
    args = parser.parse_args()

    # Create the astrological subject
    subject = AstrologicalSubject(
        args.name,
        args.year,
        args.month,
        args.day,
        args.hour,
        args.minute,
        args.city,
        args.nation
    )
    
    # Generate the report
    report = Report(subject)
    
    # Print the report
    report.print_report()
    chart_svg = KerykeionChartSVG(subject,new_output_directory=".")

    chart_svg.makeSVG()

if __name__ == "__main__":
    main()

