Code Monkey home page Code Monkey logo

invoicerenametool's Introduction

InvoiceRenameTool

发票命名,python,带GUI,可打包.exe或者.app,win10、mac os10、 mac os11系统已经验证过。

结合github上其他作者的方案,以及我自己实际测试来看,pdf发票文件,商家开的千差万别,使用图片识别,而非读文本,是一种识别率比较高的方式。

同时考虑到一般使用此软件的,一般都是非程序员群体,必须打包.exe或者.app,且安装方便(没有太多外部依赖库)。

实现思路:

发票号通过左上角二维码来识别,价格、类型通过图片识别。因为我的命名方式为:类型+发票号+价格。这个如果需要别的方式,改起来不麻烦。

UI使用pyside2做的,windows和mac通用。

具体过程:

1.将pdf转为图片,pdfminer等库。

2.设置裁切区域大小,用于图片识别,图片越大,识别速度越慢。看个人需求,二维码裁一块区域,价格裁一块,类型裁切一块。

3.发票号通过左上角二维码来识别,windows使用zbar,mac os使用pyzxing(我用的mac os 10.13.6,zbar实在安装不上)。

4.类型和价格通过easyocr识别出来(easyocr纯python方式,适合打包)。

5.通过pyinstaller打包.exe或者.app。

细节待完善

主要是打包的细节,windows和mac差别较大,涉及到各种路径的修改。

windows的pyinstaller库有几个错,也需要修改,所以写的详细的话,得截图说明。需要点时间,逐步完善。

mac os打包成.app特别特别麻烦,截图说明,逐步完善。

invoicerenametool's People

Contributors

guobaozi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.