py2ls 0.1.10.3__tar.gz → 0.1.10.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/PKG-INFO +4 -4
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/batman.py +38 -8
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/ocr.py +185 -33
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/pyproject.toml +6 -4
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/README.md +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.DS_Store +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/COMMIT_EDITMSG +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/FETCH_HEAD +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/HEAD +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/config +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/description +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/applypatch-msg.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/commit-msg.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/fsmonitor-watchman.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/post-update.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/pre-applypatch.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/pre-commit.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/pre-merge-commit.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/pre-push.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/pre-rebase.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/pre-receive.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/prepare-commit-msg.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/push-to-checkout.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/hooks/update.sample +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/index +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/info/exclude +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/logs/HEAD +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/logs/refs/heads/main +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/logs/refs/remotes/origin/HEAD +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/logs/refs/remotes/origin/main +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/01/d5bd8065e6860c0bd23ff9fa57161806a099e1 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/09/08da26de58c114225ad81f484b80bf5d351b34 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/0b/409e1bc918277010f5679b402d1d1dda53e15c +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/12/c2808a1b3a4d0892a4154dfba1e2ae3770fa73 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/14/449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/15/a8e468aacfcb440e090020f36d0b985d45da23 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1a/b4585881a6a42889f01aa0cfe25fd5acfaf46f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1c/3f92adda34344bcbbbf9d409c79855ae2aaea8 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1c/9314c5f69b9390068a2a8616875d974849d71f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1d/fe9d9633b24ea560354f4f93d39c6e5f163ea0 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/20/72c28e83f4347959d29f7b3a6c1fc3e4ee6b59 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/24/6b368b986f758630c46dc02b7fa512b53422f7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/25/b796accd261b9135fd32a2c00785f68edf6c46 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/27/aa6074f652bc6f7078f8647489d9ee8e24f0e2 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/28/c2969d785c1b892c2a96b3f00eba63a59811b3 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/2a/ae95d517d213b660bf4f65a4e0cfae7bb893eb +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/2a/fdf45791a26d42ccead35ace76a8f0b2a56561 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/30/a2f8da47ee947811dc8d993f5a06a45de374f4 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/32/fd627b62fad7cf3b2f9e34ab9777126a0987ad +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/34/9e31b6a3634cea102ce5588b98c11cc1738605 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/34/b6f3a2ee84f39bed4eee57f2c0e0afb994feb1 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/35/1a5f491ab97eee9d1ee699478d75a8bb5d3dc2 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/36/b4a1b7403abc6c360f8fe2cb656ab945254971 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/36/e56a361f526eafa59c5235a5c990bf288b5f9c +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/36/ef43e50009e59db11812c258846d9e38718173 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/39/7ead045fbbcfb17c62019eb18fe21ed05dbee5 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/39/b13be65125556784e44c7a1d9821703c7ab67e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3b/507acc7f23391644cc0b824b1e79fd2677a362 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3b/bd972aa7ad680858f8dfbd0f7fcd97756f0d6f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3c/bbe5f4173d165127b9ad96119f1ec24c306ffc +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3d/9d10d27724657a436c65a6254bfd213d4b3562 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3f/d6561300938afbb3d11976cf9c8f29549280d9 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/41/dcf4b3bf0460946b2da93776cf9e836d62178f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/43/dbd49b2ee367c5434dd545e3b5795434f2ef0b +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/45/b1b6178bacbfc997811a998b5cc60c1ea7fac8 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/47/6cbd5a7c5e35cddef2f8a38bdc4896d403b095 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/48/a88fc5806305d0bb0755ee6801161b79696972 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/4f/7afb40dff2153d857fc85748c2eecb85125042 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/50/08ddfcf53c02e82d7eee2e57c38e5672ef89f6 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/53/e0deb1cb4c2c606bced6e7f9a66b0fda60980d +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/56/e4e8b2d5545e0256090f45aa8fc42c5fe067d0 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/57/63d0c52f5c9c69e89d514a1f96034947abe21a +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/57/bd1c0199483ab316235b094543b85edec6c35e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/58/20a729045d4dc7e37ccaf8aa8eec126850afe2 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/59/380c4c26bdcd4d9b71ae3e2e35f05b3f26c5ab +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/5a/192565abf89c9d765af846ce6d53a92b1ce7ad +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/60/f273eb1c412d916fa3f11318a7da7a9911b52a +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/61/570cec8c061abe74121f27f5face6c69b98f99 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/62/4488173ed2c8936fa5cea3cf5dd3f26a30b86e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/62/7c81b23b4e56e87b042b650b0103653cc9e34a +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/62/d90ccf8cbefdc2e4fd475e7c6f4f76e9fdf801 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/63/100154b27846e8010e55b6bf4b3d7762c14c5f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/64/27a4edff08f93d98f511418423f09f2ab90bcd +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/66/6227eeeba24073e63811e89f1449f3d958f183 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/66/c998778721d424bd0aae80602dabbffa93af2e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/68/6df3072c8b025fb18106ed2df505994ad062a9 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/69/13c452ca319f7cbf6a0836dc10a5bb033c84e4 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/6a/52e747a2b349b128d1490d9e896d2323818eb7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/6b/7fde264d93a7a0986d394c46c7650d0ce2ab92 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/6c/cebb29b7f3f5b0c889f6dadbf9ff066554587d +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/6d/c2cdf4a84e538e5d4777486aeff87e42f41799 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/6d/ee29dbdcc84edeeacede105110446f3ccac963 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/71/36b2074a2754be8b58127d82250e5b37e3c373 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/72/245a05b0966011cb381e6b32b0465000e969ab +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/72/e4179337639859678ddaecf38b16f33aaec8e1 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/78/063f4c863fc371ec0313303c0a81283b35d9b6 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/78/3d4167bc95c9d2175e0df03ef1c1c880ba75ab +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/79/7ae089b2212a937840e215276005ce76881307 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/7e/5956c806b5edc344d46dab599dec337891ba1f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/81/8f26b7bf042269729020cf944fc362d66ba27e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/82/70b319ce4046854fbe7dc41054b6c2d112dab2 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/84/59071b722a255b774a80b27746033f8141ab39 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/85/aee46f478e9afdb84d50a05242c53b04ed2e21 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/86/e288b46f8fe179907e4413f665aeb5053fddb1 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/87/ef1fc3f7f1ddc4d0ab9b3e65381ce9f3388621 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/8b/84f56978e1de8f2ae82abce5f8b3e182d365cd +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/8e/55a7d2b96184030211f20c9b9af201eefcac82 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/91/c69ad88fe0ba94aa7859fb5f7edac5e6f1a3f7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/94/74152b4b463d70ae5ad07f0c658be3e296026b +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/94/f7dbe88e80c4205a901b71eb8f181974376bba +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/97/1aef09ea939f46b60b9646f8d524c78a9220f4 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/9b/ec5ee2236ee2d5532c36bfd132e23c58fdb69c +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/9d/0df52899fe95279059286d9c0ec42287edc168 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/a1/5389729850729fc7bd78a54f26fce77f30be12 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/a1/906da89d1174f74867800c74c43af36253bd5e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/a4/63fdd23e5efd713db8a71f316f3a1c7bd60916 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/a5/ec8f74642fbba27f7ea78c53b372ae0c7dedce +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/a7/3e13eafee65c5b8d73ad2d3ea46d0eee82f0d3 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b0/56be4be89ba6b76949dd641df45bb7036050c8 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b0/9cd7856d58590578ee1a4f3ad45d1310a97f87 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b2/18e6a0f0f1c4df8cdefa9852058348abc713b7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b3/4f7f271c6d6105e35a6556ffda71d03afe8c96 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b3/69579064bde9de9a19d114fc33e4e48cc8c0e4 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b5/61831c7dce8ea51e7ee6b6fa35745f14d8242d +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/b7/2c9e75ab7d0afe594664650aa8f6c772f5ac64 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/bb/81ccc0513f18fc160b54a82861e9a80d23f4f6 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/bb/934eb33bc1a8b85630bf680caffd99560c1b8f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/bf/67907e337021ebff434e02b19b30a741c144af +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/bf/b54d65922ce1dfda1aaa014913a54e7172d0bc +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/c1/20fc812b9ad311c34a3608512d6a9d976bb48e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/c1/397c6ed72c4e20ef6b9ab83163e9a6baba5b45 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/c4/cba65f1163661999ee4b8ed23342b63bc1300c +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/c6/7f17e5707313600efcb85e9a3fedea35dba591 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/c6/f32aced880bd165a251cb52b26b0c1107e2141 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/cc/45df1d317a2eb63ff1ff3a5f3b4a9f98fd92b5 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/cd/822b3574a88ebdd1ed82fd6983f37e626d52b4 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/cf/0c0d9c6fb09473aaeb7f7e2edbd770c3f2ef3d +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d2/992df305f4b56a466a2f221aeb182ddd20f418 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d6/39e8af592cd75a318d8affddd1bcc70c2095f2 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d6/9ab1c4aadf279936dd778e8346ba60f74705b6 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d8/4688b54c0040a30976b3a6540bc47adf7ce680 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d9/005f2cc7fc4e65f14ed5518276007c08cf2fd0 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d9/c2403fd166ce791b4e9d0c6792ed8342c71fcd +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/d9/dfa5aee51e92a541b707e8e7baea6f06deff98 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/db/141dbaa93594df2a8156182f361ee4db829359 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/db/3f2cd643292057936230b95cf7ec3046affe11 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/db/ffa8ea7bda721d0cee7b9e4ce5b2ef927733ff +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/dc/c2bdbafb3296e09d9ee4955cfa55d275825f94 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/dc/cdbd4266765d840be2ae35ab1752a0fa312c16 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/dd/87fb5f606fe380d81e6fe3a2c98f9f99e3e09b +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/de/214c626ac2dd2685bfaa0bc0fc20f528d014d7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/df/e0770424b2a19faf507a501ebfc23be8f54e7b +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/e2/f2f8f4c25e62a297fc55f36acc6b01cfbab76f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/e3/1356f90ea6dd0577b5e0b40b206319adcbf085 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/e3/5a4dafc50850cacac7bf76c56db2715cbda2c4 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/e4/6c715352db9fe3c887a635f1916df4ca1f4ff9 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/e5/0580a0bd1e1b3d29f834382b80fceb61d5cf0c +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/e9/391ffe371f1cc43b42ef09b705d9c767c2e14f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/ea/3a18cc75e53792744ef754e05d3f4481768c13 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/ec/40fd8bf8e4c342534a9fc020289e402ba6bc9d +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/ec/d980279432b13f0374b90ca439a6329cdece0f +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/ee/cee64eacaff022dcdc509c0c2b1da492f21060 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f1/e50757fddc28b445545dc7e2759b54cdd0f42e +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f4/b64d3107b39e3ad6f540c6607004ea34e6c024 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f4/ba7f815b886797b73fede071d86e0c134d2bc7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f5/61c3c1bf1c9ea9c9d1f556a7be2869f71f3bdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f6/44a8ff56fa035105fc517cbb1ac46c3d8e349a +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f7/c98ba5c2f903e603b1f5e63d49fbc8a43815cc +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/f9/045a08e96eb76848fc4d68e3e3e687cca39a2d +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/fa/147e6bb78a2e8db241d231295fd7f1ed061af8 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/fc/292e793ecfd42240ac43be407023bd731fa9e7 +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/refs/heads/main +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/refs/remotes/origin/HEAD +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/refs/remotes/origin/main +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.gitattributes +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.gitignore +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/LICENSE +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/README.md +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/__init__.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/brain_atlas.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/chat.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/correlators.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/.DS_Store +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/db2ls_sql_chtsht.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/docs_links.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/lang_code_iso639.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style1.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style2.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style3.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style4.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style5.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style6.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style7.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style8.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/example/style9.pdf +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style1.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style10.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style11.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style12.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style2.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style3.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style4.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style5.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style6.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style7.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style8.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/data/styles/style9.json +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/db2ls.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/doc.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/export_requirements.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/freqanalysis.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/ich2ls.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/ips.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/netfinder.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/plot.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/setuptools-70.1.0-py3-none-any.whl +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/sleep_events_detectors.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/stats.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/translator.py +0 -0
- {py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/wb_detector.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2ls
|
3
|
-
Version: 0.1.10.
|
3
|
+
Version: 0.1.10.4
|
4
4
|
Summary: py(thon)2(too)ls
|
5
5
|
Author: Jianfeng
|
6
6
|
Author-email: Jianfeng.Liu0413@gmail.com
|
@@ -29,8 +29,8 @@ Requires-Dist: Pygments (>=2.18.0)
|
|
29
29
|
Requires-Dist: QtPy (>=2.4.1)
|
30
30
|
Requires-Dist: SciencePlots (>=2.1.1)
|
31
31
|
Requires-Dist: XlsxWriter (>=3.2.0)
|
32
|
-
Requires-Dist: appnope (>=0.1.4)
|
33
|
-
Requires-Dist: appscript (>=1.2.5)
|
32
|
+
Requires-Dist: appnope (>=0.1.4) ; sys_platform == "darwin"
|
33
|
+
Requires-Dist: appscript (>=1.2.5) ; sys_platform == "darwin"
|
34
34
|
Requires-Dist: asciitree (>=0.3.3)
|
35
35
|
Requires-Dist: asttokens (>=2.4.1)
|
36
36
|
Requires-Dist: attrs (>=23.2.0)
|
@@ -234,7 +234,7 @@ Requires-Dist: websocket-client (>=1.8.0)
|
|
234
234
|
Requires-Dist: wrapt (>=1.16.0)
|
235
235
|
Requires-Dist: wsproto (>=1.2.0)
|
236
236
|
Requires-Dist: xarray (>=2024.6.0)
|
237
|
-
Requires-Dist: xattr (>=0.10.1)
|
237
|
+
Requires-Dist: xattr (>=0.10.1) ; sys_platform == "darwin"
|
238
238
|
Requires-Dist: zarr (>=2.17.2)
|
239
239
|
Description-Content-Type: text/markdown
|
240
240
|
|
@@ -11,6 +11,21 @@ from pprint import pp
|
|
11
11
|
import json
|
12
12
|
|
13
13
|
|
14
|
+
# Helper to convert text or list of text to HTML
|
15
|
+
def convert_to_html(text_list):
|
16
|
+
if not isinstance(text_list, list):
|
17
|
+
text_list = [text_list]
|
18
|
+
|
19
|
+
# Convert each element into HTML and add line breaks
|
20
|
+
html_content = "" # "<html><body>\n"
|
21
|
+
html_content += "".join(
|
22
|
+
text.replace("\n", "<br>") for text in text_list if text.strip()
|
23
|
+
)
|
24
|
+
# html_content += "\n</body></html>"
|
25
|
+
|
26
|
+
return html_content
|
27
|
+
|
28
|
+
|
14
29
|
def extract_kv(
|
15
30
|
dir_data="/Users/macjianfeng/Dropbox/github/python/py2ls/confidential_data/gmail_login.json",
|
16
31
|
idx=0,
|
@@ -36,14 +51,18 @@ def email_to(**kwargs):
|
|
36
51
|
:param what: Email what
|
37
52
|
:param attachments: List of file paths to attach
|
38
53
|
"""
|
39
|
-
who, what, subject = None, None, None
|
54
|
+
who, what, subject, signature = None, None, None, None
|
40
55
|
attachments = False
|
41
56
|
pause_sec = False # default 10 seconds pause
|
42
57
|
|
43
58
|
signature_styles = extract_kv(idx=1)[1] # signature list
|
44
59
|
signature = signature_styles[0] # default signature,None
|
45
60
|
verbose = True
|
46
|
-
|
61
|
+
if not kwargs:
|
62
|
+
print(
|
63
|
+
f'\nUsage:\nemail_to(who="example@gmail.com",\n subject="test",\n what="this is the body",\n attachments="/Users/test.pdf"\n )'
|
64
|
+
)
|
65
|
+
return None
|
47
66
|
# params config
|
48
67
|
for k, v in kwargs.items():
|
49
68
|
if any(
|
@@ -80,15 +99,26 @@ def email_to(**kwargs):
|
|
80
99
|
message["To"] = who
|
81
100
|
message["Subject"] = subject
|
82
101
|
|
83
|
-
# add signature
|
84
|
-
if signature:
|
85
|
-
what += f"\n\n{signature}\n"
|
86
|
-
|
87
102
|
# the eamil's body
|
88
|
-
|
103
|
+
if what is None:
|
104
|
+
what = ""
|
105
|
+
if isinstance(what, list):
|
106
|
+
what = convert_to_html(what)
|
107
|
+
if 'class="dataframe"' in str(attachments):
|
108
|
+
# Combine HTML content correctly
|
109
|
+
html_content = "<html><body>\n"
|
110
|
+
html_content += f"{convert_to_html(what)}<br>{attachments}"
|
111
|
+
html_content += f"<br><br>{convert_to_html([signature])}"
|
112
|
+
html_content += "\n</body></html>"
|
113
|
+
message.attach(MIMEText(html_content, "html"))
|
114
|
+
else:
|
115
|
+
# add signature
|
116
|
+
if signature:
|
117
|
+
what += f"\n\n{signature}\n"
|
118
|
+
message.attach(MIMEText(what, "plain"))
|
89
119
|
|
90
120
|
# attach files
|
91
|
-
if attachments:
|
121
|
+
if attachments and not 'class="dataframe"' in str(attachments):
|
92
122
|
if isinstance(attachments, str):
|
93
123
|
attachments = [attachments]
|
94
124
|
for file in attachments:
|
@@ -12,6 +12,12 @@ import re
|
|
12
12
|
from PIL import Image, ImageDraw, ImageFont
|
13
13
|
import PIL.PngImagePlugin
|
14
14
|
import pytesseract
|
15
|
+
from paddleocr import PaddleOCR
|
16
|
+
import logging
|
17
|
+
|
18
|
+
logging.getLogger("ppocr").setLevel(
|
19
|
+
logging.WARNING
|
20
|
+
) # or logging.ERROR to show only error messages
|
15
21
|
|
16
22
|
"""
|
17
23
|
Optical Character Recognition (OCR)
|
@@ -31,6 +37,25 @@ lang_valid = {
|
|
31
37
|
"kannada": "kn",
|
32
38
|
"german": "de",
|
33
39
|
},
|
40
|
+
"paddleocr": {
|
41
|
+
"chinese": "ch",
|
42
|
+
"chinese_traditional": "chinese_cht",
|
43
|
+
"english": "en",
|
44
|
+
"french": "fr",
|
45
|
+
"german": "de",
|
46
|
+
"korean": "korean",
|
47
|
+
"japanese": "japan",
|
48
|
+
"russian": "ru",
|
49
|
+
"italian": "it",
|
50
|
+
"portuguese": "pt",
|
51
|
+
"spanish": "es",
|
52
|
+
"polish": "pl",
|
53
|
+
"dutch": "nl",
|
54
|
+
"arabic": "ar",
|
55
|
+
"vietnamese": "vi",
|
56
|
+
"tamil": "ta",
|
57
|
+
"turkish": "tr",
|
58
|
+
},
|
34
59
|
"pytesseract": {
|
35
60
|
"afrikaans": "afr",
|
36
61
|
"amharic": "amh",
|
@@ -133,6 +158,8 @@ def lang_auto_detect(
|
|
133
158
|
lang,
|
134
159
|
model="easyocr", # "easyocr" or "pytesseract"
|
135
160
|
):
|
161
|
+
models = ["easyocr", "paddleocr", "pytesseract"]
|
162
|
+
model = strcmp(model, models)[0]
|
136
163
|
res_lang = []
|
137
164
|
if isinstance(lang, str):
|
138
165
|
lang = [lang]
|
@@ -254,7 +281,14 @@ def undistort_image(image, camera_matrix, dist_coeffs):
|
|
254
281
|
return cv2.undistort(image, camera_matrix, dist_coeffs)
|
255
282
|
|
256
283
|
|
257
|
-
def add_text_pil(
|
284
|
+
def add_text_pil(
|
285
|
+
image,
|
286
|
+
text,
|
287
|
+
position,
|
288
|
+
font_size=12,
|
289
|
+
color=(255, 0, 0),
|
290
|
+
bg_color=(173, 216, 230, 120),
|
291
|
+
):
|
258
292
|
# Convert the image to PIL format
|
259
293
|
pil_image = Image.fromarray(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
|
260
294
|
# Create a drawing context
|
@@ -270,17 +304,32 @@ def add_text_pil(image, text, position, font_size=10, color=(255, 0, 0)):
|
|
270
304
|
# cal top_left position
|
271
305
|
# Measure text size using textbbox
|
272
306
|
text_bbox = draw.textbbox((0, 0), text, font=font)
|
307
|
+
# # 或者只画 text, # Calculate text size
|
308
|
+
# text_width, text_height = draw.textsize(text, font=font)
|
273
309
|
text_width = text_bbox[2] - text_bbox[0]
|
274
310
|
text_height = text_bbox[3] - text_bbox[1]
|
311
|
+
|
312
|
+
# Draw background rectangle
|
313
|
+
x, y = position
|
275
314
|
# Calculate 5% of the text height for upward adjustment
|
276
|
-
offset = int(
|
315
|
+
offset = int(
|
316
|
+
0.1 * text_height
|
317
|
+
) # 这就不再上移动了; # int(0.5 * text_height) # 上移动 50%
|
318
|
+
|
277
319
|
# Adjust position to match OpenCV's bottom-left alignment
|
278
320
|
adjusted_position = (position[0], position[1] - text_height - offset)
|
279
321
|
|
322
|
+
background_rect = [
|
323
|
+
adjusted_position[0],
|
324
|
+
adjusted_position[1],
|
325
|
+
x + text_width,
|
326
|
+
y + text_height,
|
327
|
+
]
|
328
|
+
draw.rectangle(background_rect, fill=bg_color)
|
280
329
|
# Add text to the image
|
281
330
|
draw.text(adjusted_position, text, font=font, fill=color)
|
282
331
|
# Convert the image back to OpenCV format
|
283
|
-
image = cv2.cvtColor(np.array(pil_image), cv2.
|
332
|
+
image = cv2.cvtColor(np.array(pil_image), cv2.COLOR_RGBA2BGR)
|
284
333
|
return image
|
285
334
|
|
286
335
|
|
@@ -479,8 +528,8 @@ def text_postprocess(
|
|
479
528
|
def get_text(
|
480
529
|
image,
|
481
530
|
lang=["ch_sim", "en"],
|
482
|
-
model="
|
483
|
-
thr=0.
|
531
|
+
model="paddleocr", # "pytesseract","paddleocr","easyocr"
|
532
|
+
thr=0.1,
|
484
533
|
gpu=True,
|
485
534
|
decoder="wordbeamsearch", #'greedy', 'beamsearch' and 'wordbeamsearch'(hightly accurate)
|
486
535
|
output="all",
|
@@ -493,7 +542,9 @@ def get_text(
|
|
493
542
|
font_scale=0.8,
|
494
543
|
thickness_text=2, # Line thickness of 2 px
|
495
544
|
color_box=(0, 255, 0), # draw_box
|
496
|
-
color_text=(
|
545
|
+
color_text=(203, 44, 57), # draw_box
|
546
|
+
bg_color=(173, 216, 230, 128),
|
547
|
+
usage=False,
|
497
548
|
**kwargs,
|
498
549
|
):
|
499
550
|
"""
|
@@ -513,34 +564,38 @@ def get_text(
|
|
513
564
|
kwargs: 传递给 EasyOCR readtext 函数的其他参数。
|
514
565
|
|
515
566
|
# Uage
|
516
|
-
image_path = 'car_plate.jpg' # 替换为你的图像路径
|
517
|
-
results = get_text(
|
518
|
-
image_path,
|
519
|
-
lang=["en"],
|
520
|
-
gpu=False,
|
521
|
-
output="text",
|
522
|
-
preprocess={
|
523
|
-
"grayscale": True,
|
524
|
-
"threshold": True,
|
525
|
-
"threshold_method": 'adaptive',
|
526
|
-
"denoise": True,
|
527
|
-
"blur_ksize": (5, 5),
|
528
|
-
"morph": True,
|
529
|
-
"morph_op": 'close',
|
530
|
-
"morph_kernel_size": (3, 3),
|
531
|
-
"enhance_contrast": True,
|
532
|
-
"clahe_clip": 2.0,
|
533
|
-
"clahe_grid_size": (8, 8),
|
534
|
-
"edge_detection": False
|
535
|
-
},
|
536
|
-
adjust_contrast=0.7
|
537
|
-
)
|
538
567
|
"""
|
568
|
+
if usage:
|
569
|
+
print(
|
570
|
+
"""
|
571
|
+
image_path = 'car_plate.jpg' # 替换为你的图像路径
|
572
|
+
results = get_text(
|
573
|
+
image_path,
|
574
|
+
lang=["en"],
|
575
|
+
gpu=False,
|
576
|
+
output="text",
|
577
|
+
preprocess={
|
578
|
+
"grayscale": True,
|
579
|
+
"threshold": True,
|
580
|
+
"threshold_method": 'adaptive',
|
581
|
+
"blur": True,
|
582
|
+
"blur_ksize": (5, 5),
|
583
|
+
"morph": True,
|
584
|
+
"morph_op": 'close',
|
585
|
+
"morph_kernel_size": (3, 3),
|
586
|
+
"enhance_contrast": True,
|
587
|
+
"clahe_clip": 2.0,
|
588
|
+
"clahe_grid_size": (8, 8),
|
589
|
+
"edge_detection": False
|
590
|
+
},
|
591
|
+
adjust_contrast=0.7
|
592
|
+
)
|
593
|
+
"""
|
594
|
+
)
|
539
595
|
|
540
|
-
|
541
|
-
|
596
|
+
models = ["easyocr", "paddleocr", "pytesseract"]
|
597
|
+
model = strcmp(model, models)[0]
|
542
598
|
lang = lang_auto_detect(lang, model)
|
543
|
-
print(f"detecting language(s):{lang}")
|
544
599
|
if isinstance(image, str):
|
545
600
|
image = cv2.imread(image)
|
546
601
|
|
@@ -553,6 +608,7 @@ def get_text(
|
|
553
608
|
preprocess = {}
|
554
609
|
image_process = preprocess_img(image, **preprocess)
|
555
610
|
if "easy" in model.lower():
|
611
|
+
print(f"detecting language(s):{lang}")
|
556
612
|
# Perform OCR on the image
|
557
613
|
reader = easyocr.Reader(lang, gpu=gpu)
|
558
614
|
detections = reader.readtext(image_process, decoder=decoder, **kwargs)
|
@@ -565,12 +621,104 @@ def get_text(
|
|
565
621
|
merge=True,
|
566
622
|
)
|
567
623
|
text_corr = []
|
568
|
-
|
624
|
+
[
|
625
|
+
text_corr.extend(text_postprocess(text, **postprocess))
|
626
|
+
for _, text, _ in detections
|
627
|
+
]
|
628
|
+
if show:
|
629
|
+
if ax is None:
|
630
|
+
ax = plt.gca()
|
631
|
+
for bbox, text, score in detections:
|
632
|
+
if score > thr:
|
633
|
+
top_left = tuple(map(int, bbox[0]))
|
634
|
+
bottom_right = tuple(map(int, bbox[2]))
|
635
|
+
image = cv2.rectangle(image, top_left, bottom_right, color_box, 2)
|
636
|
+
# image = cv2.putText(
|
637
|
+
# image, text, top_left, font, font_scale, color_text, thickness_text
|
638
|
+
# )
|
639
|
+
image = add_text_pil(
|
640
|
+
image,
|
641
|
+
text,
|
642
|
+
top_left,
|
643
|
+
font_size=font_scale * 32,
|
644
|
+
color=color_text,
|
645
|
+
)
|
646
|
+
img_cmp = cv2.cvtColor(image, cmap)
|
647
|
+
ax.imshow(img_cmp)
|
648
|
+
ax.axis("off")
|
649
|
+
# plt.show()
|
650
|
+
# 根据输出类型返回相应的结果
|
651
|
+
if output == "all":
|
652
|
+
return ax, detections
|
653
|
+
elif "t" in output.lower() and "x" in output.lower():
|
654
|
+
# 提取文本,过滤低置信度的结果
|
655
|
+
text = [text_ for _, text_, score_ in detections if score_ >= thr]
|
656
|
+
if postprocess:
|
657
|
+
return ax, text
|
658
|
+
else:
|
659
|
+
return text_corr
|
660
|
+
elif "score" in output.lower() or "prob" in output.lower():
|
661
|
+
# 提取分数
|
662
|
+
scores = [score_ for _, _, score_ in detections]
|
663
|
+
return ax, scores
|
664
|
+
elif "box" in output.lower():
|
665
|
+
# 提取边界框,过滤低置信度的结果
|
666
|
+
bboxes = [bbox_ for bbox_, _, score_ in detections if score_ >= thr]
|
667
|
+
return ax, bboxes
|
668
|
+
else:
|
669
|
+
# 默认返回所有检测信息
|
670
|
+
return ax, detections
|
671
|
+
else:
|
672
|
+
# 根据输出类型返回相应的结果
|
673
|
+
if output == "all":
|
674
|
+
return detections
|
675
|
+
elif "t" in output.lower() and "x" in output.lower():
|
676
|
+
# 提取文本,过滤低置信度的结果
|
677
|
+
text = [text_ for _, text_, score_ in detections if score_ >= thr]
|
678
|
+
return text
|
679
|
+
elif "score" in output.lower() or "prob" in output.lower():
|
680
|
+
# 提取分数
|
681
|
+
scores = [score_ for _, _, score_ in detections]
|
682
|
+
return scores
|
683
|
+
elif "box" in output.lower():
|
684
|
+
# 提取边界框,过滤低置信度的结果
|
685
|
+
bboxes = [bbox_ for bbox_, _, score_ in detections if score_ >= thr]
|
686
|
+
return bboxes
|
687
|
+
else:
|
688
|
+
# 默认返回所有检测信息
|
689
|
+
return detections
|
690
|
+
elif "pad" in model.lower():
|
691
|
+
ocr = PaddleOCR(
|
692
|
+
use_angle_cls=True,
|
693
|
+
cls=True,
|
694
|
+
) # PaddleOCR supports only one language at a time
|
695
|
+
result = ocr.ocr(image_process, **kwargs)
|
696
|
+
detections = []
|
697
|
+
for line in result[0]:
|
698
|
+
bbox, (text, score) = line
|
699
|
+
detections.append((bbox, text, score))
|
700
|
+
if postprocess is None:
|
701
|
+
postprocess = dict(
|
702
|
+
spell_check=True,
|
703
|
+
clean=True,
|
704
|
+
filter=dict(min_length=2),
|
705
|
+
pattern=None,
|
706
|
+
merge=True,
|
707
|
+
)
|
708
|
+
text_corr = []
|
709
|
+
[
|
569
710
|
text_corr.extend(text_postprocess(text, **postprocess))
|
711
|
+
for _, text, _ in detections
|
712
|
+
]
|
570
713
|
if show:
|
714
|
+
if ax is None:
|
715
|
+
ax = plt.gca()
|
571
716
|
for bbox, text, score in detections:
|
572
717
|
if score > thr:
|
573
718
|
top_left = tuple(map(int, bbox[0]))
|
719
|
+
bottom_left = tuple(
|
720
|
+
map(int, bbox[1])
|
721
|
+
) # Bottom-left for more accurate placement
|
574
722
|
bottom_right = tuple(map(int, bbox[2]))
|
575
723
|
image = cv2.rectangle(image, top_left, bottom_right, color_box, 2)
|
576
724
|
# image = cv2.putText(
|
@@ -582,6 +730,7 @@ def get_text(
|
|
582
730
|
top_left,
|
583
731
|
font_size=font_scale * 32,
|
584
732
|
color=color_text,
|
733
|
+
bg_color=bg_color,
|
585
734
|
)
|
586
735
|
img_cmp = cv2.cvtColor(image, cmap)
|
587
736
|
ax.imshow(img_cmp)
|
@@ -627,7 +776,10 @@ def get_text(
|
|
627
776
|
else:
|
628
777
|
# 默认返回所有检测信息
|
629
778
|
return detections
|
779
|
+
|
630
780
|
else: # "pytesseract"
|
781
|
+
if ax is None:
|
782
|
+
ax = plt.gca()
|
631
783
|
text = pytesseract.image_to_string(image_process, lang="+".join(lang), **kwargs)
|
632
784
|
bboxes = pytesseract.image_to_boxes(image_process, **kwargs)
|
633
785
|
if show:
|
@@ -649,7 +801,7 @@ def get_text(
|
|
649
801
|
image = add_text_pil(
|
650
802
|
image,
|
651
803
|
char,
|
652
|
-
|
804
|
+
left,
|
653
805
|
font_size=font_scale * 32,
|
654
806
|
color=color_text,
|
655
807
|
)
|
@@ -1,14 +1,14 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "py2ls"
|
3
|
-
version = "0.1.10.
|
3
|
+
version = "0.1.10.4"
|
4
4
|
description = "py(thon)2(too)ls"
|
5
5
|
authors = ["Jianfeng <Jianfeng.Liu0413@gmail.com>"]
|
6
6
|
readme = "README.md"
|
7
7
|
|
8
8
|
[tool.poetry.dependencies]
|
9
9
|
python = "^3.10"
|
10
|
-
appnope = ">=0.1.4"
|
11
|
-
appscript = ">=1.2.5"
|
10
|
+
appnope = { version = ">=0.1.4", markers = "sys_platform == 'darwin'" }
|
11
|
+
appscript = { version = ">=1.2.5", markers = "sys_platform == 'darwin'" }
|
12
12
|
asciitree = ">=0.3.3"
|
13
13
|
asttokens = ">=2.4.1"
|
14
14
|
attrs = ">=23.2.0"
|
@@ -231,7 +231,9 @@ websocket-client = ">=1.8.0"
|
|
231
231
|
wrapt = ">=1.16.0"
|
232
232
|
wsproto = ">=1.2.0"
|
233
233
|
xarray = ">=2024.6.0"
|
234
|
-
xattr = ">=0.10.1"
|
234
|
+
xattr = { version = ">=0.10.1", markers = "sys_platform == 'darwin'" }
|
235
|
+
|
236
|
+
|
235
237
|
XlsxWriter = ">=3.2.0"
|
236
238
|
zarr = ">=2.17.2"
|
237
239
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/01/d5bd8065e6860c0bd23ff9fa57161806a099e1
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/09/08da26de58c114225ad81f484b80bf5d351b34
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/0b/409e1bc918277010f5679b402d1d1dda53e15c
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/12/c2808a1b3a4d0892a4154dfba1e2ae3770fa73
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/14/449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/15/a8e468aacfcb440e090020f36d0b985d45da23
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1a/b4585881a6a42889f01aa0cfe25fd5acfaf46f
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1c/3f92adda34344bcbbbf9d409c79855ae2aaea8
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1c/9314c5f69b9390068a2a8616875d974849d71f
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/1d/fe9d9633b24ea560354f4f93d39c6e5f163ea0
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/20/72c28e83f4347959d29f7b3a6c1fc3e4ee6b59
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/24/6b368b986f758630c46dc02b7fa512b53422f7
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/25/b796accd261b9135fd32a2c00785f68edf6c46
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/27/aa6074f652bc6f7078f8647489d9ee8e24f0e2
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/28/c2969d785c1b892c2a96b3f00eba63a59811b3
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/2a/ae95d517d213b660bf4f65a4e0cfae7bb893eb
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/2a/fdf45791a26d42ccead35ace76a8f0b2a56561
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/30/a2f8da47ee947811dc8d993f5a06a45de374f4
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/32/fd627b62fad7cf3b2f9e34ab9777126a0987ad
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/34/9e31b6a3634cea102ce5588b98c11cc1738605
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/34/b6f3a2ee84f39bed4eee57f2c0e0afb994feb1
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/35/1a5f491ab97eee9d1ee699478d75a8bb5d3dc2
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/36/b4a1b7403abc6c360f8fe2cb656ab945254971
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/36/e56a361f526eafa59c5235a5c990bf288b5f9c
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/36/ef43e50009e59db11812c258846d9e38718173
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/39/7ead045fbbcfb17c62019eb18fe21ed05dbee5
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/39/b13be65125556784e44c7a1d9821703c7ab67e
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3b/507acc7f23391644cc0b824b1e79fd2677a362
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3b/bd972aa7ad680858f8dfbd0f7fcd97756f0d6f
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3c/bbe5f4173d165127b9ad96119f1ec24c306ffc
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3d/9d10d27724657a436c65a6254bfd213d4b3562
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/3f/d6561300938afbb3d11976cf9c8f29549280d9
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/41/dcf4b3bf0460946b2da93776cf9e836d62178f
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/43/dbd49b2ee367c5434dd545e3b5795434f2ef0b
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/45/b1b6178bacbfc997811a998b5cc60c1ea7fac8
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/47/6cbd5a7c5e35cddef2f8a38bdc4896d403b095
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/48/a88fc5806305d0bb0755ee6801161b79696972
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/4f/7afb40dff2153d857fc85748c2eecb85125042
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/50/08ddfcf53c02e82d7eee2e57c38e5672ef89f6
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/53/e0deb1cb4c2c606bced6e7f9a66b0fda60980d
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/56/e4e8b2d5545e0256090f45aa8fc42c5fe067d0
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/57/63d0c52f5c9c69e89d514a1f96034947abe21a
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/57/bd1c0199483ab316235b094543b85edec6c35e
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/58/20a729045d4dc7e37ccaf8aa8eec126850afe2
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/59/380c4c26bdcd4d9b71ae3e2e35f05b3f26c5ab
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/5a/192565abf89c9d765af846ce6d53a92b1ce7ad
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/60/f273eb1c412d916fa3f11318a7da7a9911b52a
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/61/570cec8c061abe74121f27f5face6c69b98f99
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/62/4488173ed2c8936fa5cea3cf5dd3f26a30b86e
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/62/7c81b23b4e56e87b042b650b0103653cc9e34a
RENAMED
File without changes
|
{py2ls-0.1.10.3 → py2ls-0.1.10.4}/py2ls/.git/objects/62/d90ccf8cbefdc2e4fd475e7c6f4f76e9fdf801
RENAMED
File without changes
|