Repository navigation
v0.3.0
报销帮手:按发票内容给文件改名(可以预览、可以改回去),检查发票抬头。
For reimbursement: rename invoice files after their contents (with a preview and an undo), and check who invoices are made out to.
pip install --upgrade ofdkit
ofdkit rename 发票文件夹 # 预览新名字 / preview the new names
ofdkit rename 发票文件夹 --apply # 改名 / rename
ofdkit 发票文件夹 --buyer 某某有限公司 # 检查抬头 / check the buyerAdded
ofdkit rename: renames invoice files after their contents, by default as{开票日期}_{销售方}_{价税合计}_{发票号码}.ofd. It only previews until--applyis given, renames PDF and XML copies with the same name along with the OFD file, never overwrites a file (a clashing name gets(2)), leaves files that already have their new name alone, and writes a log thatofdkit rename --undo LOGuses to restore the old names.--patternsets the format from 13 fields, in Chinese or English.--buyer NAME_OR_TAX_IDforshowandbatch: flags invoices made out to another buyer (发票抬头), in the summary, the CSVwarningsand in orange in Excel. The MCP toollist_ofd_invoicesandofdkit.read_invoices()takebuyertoo.py.typed, so type checkers use ofdkit's annotations.