How camellia2077/bills_master_cpp works
Project type and purpose
• This is a C++-based, command-line data-processing tool (“Bills_Master”) with a small Python component for graph generation and a helper log generator.
• Purpose: take raw bill files, validate and modify them according to JSON rules, insert the cleaned data into an SQLite database, run queries (monthly/yearly), and optionally produce bar-chart reports. A side utility can emit synthetic logs.
File structure
• Top-level CMakeLists.txt + build.sh: controls the build (C++), compiles into a CLI executable.
• main.cpp / AppController: orchestrates user menu, invokes sub-modules.
• reprocessing/: “BillValidator” + “BillModifier” + Reprocessor facade → pre-insert pipeline.
• db_insert/: parser + DataProcessor + BillInserter → reads raw text, maps it to Transaction structures, writes to SQLite via C API.
• query/: QueryFacade + MonthlyQuery + YearlyQuery → read-only access to SQLite, output text reports.
• config/: JSON files drive validation and modification rules.
• graph/: Python script + JSON config → uses sqlite3/python-json + matplotlib to render bar charts.
• log_generator/: separate C++ project with its own CMakeLists.sh that emits fake bill logs for ingestion.
README for additional insights
• Dependencies: nlohmann/json in C++, Python std-json/sqlite3, SQLite C API, matplotlib.
• Configuration drives two domains: bill pre-processing and chart styling.
Detail and granularity
• Component with its major classes or scripts (e.g., “Reprocessor: BillValidator, BillModifier”).
• Error-handling or logging pathways only if they are critical for understanding the flow.