pyxllib 0.3.131__tar.gz → 0.3.132__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.
- {pyxllib-0.3.131/pyxllib.egg-info → pyxllib-0.3.132}/PKG-INFO +16 -16
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/stat.py +3 -1
- pyxllib-0.3.132/pyxllib/ext/autogui/__init__.py +5 -0
- pyxllib-0.3.132/pyxllib/ext/autogui/activewin.py +234 -0
- pyxllib-0.3.131/pyxllib/ext/autogui/__init__.py → pyxllib-0.3.132/pyxllib/ext/autogui/all.py +2 -1
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/autogui/autogui.py +9 -10
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/docxlib.py +1 -1
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/packlib/__init__.py +112 -75
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/xlsxlib.py +1 -1
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/__init__.py +46 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/xllog.py +4 -3
- {pyxllib-0.3.131 → pyxllib-0.3.132/pyxllib.egg-info}/PKG-INFO +16 -16
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib.egg-info/SOURCES.txt +2 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/setup.py +1 -1
- {pyxllib-0.3.131 → pyxllib-0.3.132}/LICENSE +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/MANIFEST.in +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/README.md +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/disjoint.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/geo.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/intervals.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/matcher.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/newbie.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/pupil.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/shapelylib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/specialist.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/treelib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/algo/unitlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/expert.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/imfile.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/imhash.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/pupil.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/rgbfmt.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/trackbartools.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/xlcvlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/cv/xlpillib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/echarts.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/jsonlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/oss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/pglib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/sqlite.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/data/sqllib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/JLineViewer.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/autogui/virtualkey.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/demolib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/drissionlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/kq5034lib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/old.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/qt.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/robustprocfile.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/seleniumlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/tk.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/unixlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/utools.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/webhook.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/win32lib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/ext/yuquelib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/gitlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/libreoffice.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/movielib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/newbie.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/onenotelib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/packlib/zipfile.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/pdflib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/pupil.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/specialist/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/specialist/dirlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/specialist/download.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/specialist/filelib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/file/xlsyncfile.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/cachetools.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/deprecatedlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/ipyexec.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/multiprocs.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/newbie.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/pupil.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/scheduler.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/sitepackages.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/bc.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/browser.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/common.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/datetime.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/specialist/tictoc.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/prog/xlosenv.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/stdlib/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/stdlib/tablepyxl/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/stdlib/tablepyxl/style.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/stdlib/tablepyxl/tablepyxl.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/ahocorasick.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/charclasslib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/jiebalib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/jinjalib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/jscode.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/latex/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/levenshtein.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/nestenv.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/newbie.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/pupil/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/pupil/common.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/pupil/xlalign.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/pycode.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/specialist/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/specialist/common.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/specialist/ptag.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/spellchecker.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/templates/echart_base.html +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/templates/highlight_code.html +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/templates/latex_editor.html +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/vbacode.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/text/xmllib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/xl.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib/xlcv.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib.egg-info/dependency_links.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib.egg-info/requires.txt +15 -15
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxllib.egg-info/top_level.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ai/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ai/clientlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ai/specialist.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ai/torch_app.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ai/xlpaddle.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ai/xltorch.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/coco.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/datacls.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/datasets.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/gptlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/icdar/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/icdar/deteval.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/icdar/icdar2013.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/icdar/iou.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/icdar/rrc_evaluation_funcs_1_1.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/imtextline.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/labelme.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/removeline.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/specialist.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/data/tiktokenlib.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/eval/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/openai2/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/openai2/_core/chat.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/openai2/_core/chat_in_cmd.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/openai2/_core/group_chat.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/openai2/openai2.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/paddleocr.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/configs/rec/multi_language/generate_multi_language_configs.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/ColorJitter.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/copy_paste.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/east_process.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/gen_table_mask.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/iaa_augment.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/label_ops.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/make_border_map.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/make_pse_gt.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/make_shrink_map.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/operators.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/pg_process.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/randaugment.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/random_crop_data.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/rec_img_aug.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/sast_process.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/text_image_aug/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/text_image_aug/augment.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/imaug/text_image_aug/warp_mls.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/lmdb_dataset.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/pgnet_dataset.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/pubtab_dataset.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/data/simple_dataset.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/ace_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/basic_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/center_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/cls_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/combined_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/det_basic_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/det_db_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/det_east_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/det_pse_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/det_sast_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/distillation_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/e2e_pg_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/kie_sdmgr_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_aster_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_att_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_ctc_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_enhanced_ctc_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_nrtr_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_sar_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/rec_srn_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/losses/table_att_loss.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/cls_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/det_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/distillation_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/e2e_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/eval_det_iou.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/kie_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/rec_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/metrics/table_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/architectures/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/architectures/base_model.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/architectures/distillation_model.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/det_mobilenet_v3.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/det_resnet_vd.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/det_resnet_vd_sast.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/e2e_resnet_vd_pg.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/kie_unet_sdmgr.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_mobilenet_v3.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_mv1_enhance.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_nrtr_mtb.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_resnet_31.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_resnet_aster.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_resnet_fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/backbones/rec_resnet_vd.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/cls_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/det_db_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/det_east_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/det_pse_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/det_sast_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/e2e_pg_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/kie_sdmgr_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/multiheadAttention.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/rec_aster_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/rec_att_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/rec_ctc_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/rec_nrtr_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/rec_sar_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/rec_srn_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/self_attention.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/heads/table_att_head.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/db_fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/east_fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/pg_fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/rnn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/sast_fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/necks/table_fpn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/transforms/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/transforms/stn.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/transforms/tps.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/modeling/transforms/tps_spatial_transformer.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/optimizer/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/optimizer/learning_rate.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/optimizer/lr_scheduler.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/optimizer/optimizer.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/optimizer/regularizer.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/cls_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/db_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/east_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/locality_aware_nms.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/pg_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/pse_postprocess/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/pse_postprocess/pse/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/pse_postprocess/pse/setup.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/pse_postprocess/pse_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/rec_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/postprocess/sast_postprocess.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/eval.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/export_center.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/export_model.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer/predict_cls.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer/predict_det.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer/predict_e2e.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer/predict_rec.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer/predict_system.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer/utility.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer_cls.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer_det.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer_e2e.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer_kie.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer_rec.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/infer_table.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/program.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/test_hubserving.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/train.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/tools/xlprog.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/EN_symbol_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ar_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/arabic_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/be_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/bg_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/chinese_cht_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/cyrillic_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/devanagari_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/en_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/fa_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/french_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/german_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/hi_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/it_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/japan_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ka_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/korean_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/latin_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/mr_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ne_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/oc_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/pu_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/rs_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/rsc_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ru_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ta_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/table_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/table_structure_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/te_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ug_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/uk_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/ur_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict/xi_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/dict90.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_metric/Deteval.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_metric/polygon_fast.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_utils/extract_batchsize.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_utils/extract_textpoint_fast.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_utils/extract_textpoint_slow.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_utils/pgnet_pp_utils.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/e2e_utils/visual.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/en_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/gen_label.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/ic15_dict.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/iou.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/logging.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/network.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/ppocr_keys_v1.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/profiler.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/save_load.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/stats.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppocr/utils/utility.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/predict_system.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/eval_table.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/matcher.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/predict_structure.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/predict_table.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/table_metric/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/table_metric/parallel.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/table_metric/table_metric.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/tablepyxl/__init__.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/tablepyxl/style.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/table/tablepyxl/tablepyxl.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/ppstructure/utility.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/pyxlpr/xlai.py +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/requirements.txt +0 -0
- {pyxllib-0.3.131 → pyxllib-0.3.132}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyxllib
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.132
|
4
4
|
Summary: 厦门理工模式识别团队通用python代码工具库
|
5
5
|
Home-page: https://github.com/XLPRUtils/pyxllib
|
6
6
|
Author: code4101
|
@@ -38,33 +38,33 @@ Requires-Dist: Jinja2
|
|
38
38
|
Requires-Dist: pandas>=0.23.4
|
39
39
|
Requires-Dist: pillow
|
40
40
|
Provides-Extra: xlcv
|
41
|
+
Requires-Dist: pillow; extra == "xlcv"
|
41
42
|
Requires-Dist: opsdroid-get-image-size; extra == "xlcv"
|
42
43
|
Requires-Dist: opencv-python; extra == "xlcv"
|
43
|
-
Requires-Dist: pillow; extra == "xlcv"
|
44
44
|
Provides-Extra: xlai
|
45
|
+
Requires-Dist: pillow; extra == "xlai"
|
45
46
|
Requires-Dist: pynvml; extra == "xlai"
|
47
|
+
Requires-Dist: opsdroid-get-image-size; extra == "xlai"
|
46
48
|
Requires-Dist: visdom; extra == "xlai"
|
47
49
|
Requires-Dist: opencv-python; extra == "xlai"
|
48
|
-
Requires-Dist: pillow; extra == "xlai"
|
49
|
-
Requires-Dist: opsdroid-get-image-size; extra == "xlai"
|
50
50
|
Provides-Extra: xlall
|
51
|
+
Requires-Dist: flask; extra == "xlall"
|
51
52
|
Requires-Dist: flask-cors; extra == "xlall"
|
52
|
-
Requires-Dist:
|
53
|
-
Requires-Dist: uvicorn; extra == "xlall"
|
54
|
-
Requires-Dist: openai2; extra == "xlall"
|
55
|
-
Requires-Dist: opencv-python; extra == "xlall"
|
53
|
+
Requires-Dist: flask-jwt-extended; extra == "xlall"
|
56
54
|
Requires-Dist: pillow; extra == "xlall"
|
57
|
-
Requires-Dist:
|
58
|
-
Requires-Dist: xlrd; extra == "xlall"
|
59
|
-
Requires-Dist: html2text; extra == "xlall"
|
60
|
-
Requires-Dist: flask; extra == "xlall"
|
61
|
-
Requires-Dist: flask-wtf; extra == "xlall"
|
55
|
+
Requires-Dist: uvicorn; extra == "xlall"
|
62
56
|
Requires-Dist: fastapi; extra == "xlall"
|
63
|
-
Requires-Dist:
|
64
|
-
Requires-Dist: opsdroid-get-image-size; extra == "xlall"
|
57
|
+
Requires-Dist: html2text; extra == "xlall"
|
65
58
|
Requires-Dist: ujson; extra == "xlall"
|
66
|
-
Requires-Dist:
|
59
|
+
Requires-Dist: openai2; extra == "xlall"
|
60
|
+
Requires-Dist: opsdroid-get-image-size; extra == "xlall"
|
61
|
+
Requires-Dist: xlrd; extra == "xlall"
|
67
62
|
Requires-Dist: flask-restful; extra == "xlall"
|
63
|
+
Requires-Dist: zhconv; extra == "xlall"
|
64
|
+
Requires-Dist: sentencepiece; extra == "xlall"
|
65
|
+
Requires-Dist: opencv-python; extra == "xlall"
|
66
|
+
Requires-Dist: arts; extra == "xlall"
|
67
|
+
Requires-Dist: flask-wtf; extra == "xlall"
|
68
68
|
|
69
69
|
# 1 install
|
70
70
|
|
@@ -261,7 +261,9 @@ def xlpivot(df, index=None, columns=None, values=None):
|
|
261
261
|
def func(items): # 输入匹配的多行数据
|
262
262
|
x = items.iloc[0]
|
263
263
|
return f'{x["precision"]:.0f},{x["recall"]:.0f},{x["hmean"]:.2f},{x["fps"]}' # 返回显示的值
|
264
|
-
|
264
|
+
|
265
|
+
>> df2 = xlpivot(df, ['model_type'], ['dataset', 'total_frame'],
|
266
|
+
{'precision,recall,hmean,fps': func})
|
265
267
|
|
266
268
|
注意技巧:如果要在分组后约束特定顺序,可以使用特殊前缀进行编号对齐
|
267
269
|
"""
|
@@ -0,0 +1,234 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# @Author : 陈坤泽
|
4
|
+
# @Email : 877362867@qq.com
|
5
|
+
# @Date : 2024/10/29
|
6
|
+
|
7
|
+
import platform
|
8
|
+
import sys
|
9
|
+
|
10
|
+
import cv2
|
11
|
+
import psutil
|
12
|
+
import numpy as np
|
13
|
+
|
14
|
+
from pyxllib.prog.cachetools import xlcache
|
15
|
+
from pyxllib.cv.xlcvlib import CvImg
|
16
|
+
|
17
|
+
if sys.platform == 'win32':
|
18
|
+
import pyautogui
|
19
|
+
import win32gui
|
20
|
+
import win32process
|
21
|
+
from pywinauto import Desktop
|
22
|
+
|
23
|
+
# 根据平台扩展相应的类
|
24
|
+
if platform.system().lower() == "darwin":
|
25
|
+
from mss.darwin import MSS as OriginalMSS
|
26
|
+
elif platform.system().lower() == "linux":
|
27
|
+
from mss.linux import MSS as OriginalMSS
|
28
|
+
elif platform.system().lower() == "windows":
|
29
|
+
from mss.windows import MSS as OriginalMSS
|
30
|
+
else:
|
31
|
+
raise RuntimeError("Unsupported platform")
|
32
|
+
|
33
|
+
|
34
|
+
def adjust_monitors(monitors, scale_factor):
|
35
|
+
# 调整所有物理显示器的尺寸和位置
|
36
|
+
for i in range(1, len(monitors)):
|
37
|
+
monitors[i]['width'] = int(monitors[i]['width'] / scale_factor)
|
38
|
+
monitors[i]['height'] = int(monitors[i]['height'] / scale_factor)
|
39
|
+
monitors[i]['top'] = int(monitors[i]['top'] / scale_factor)
|
40
|
+
monitors[i]['left'] = int(monitors[i]['left'] / scale_factor)
|
41
|
+
|
42
|
+
# 计算虚拟桌面的边界
|
43
|
+
left_bound = min(monitor['left'] for monitor in monitors[1:])
|
44
|
+
top_bound = min(monitor['top'] for monitor in monitors[1:])
|
45
|
+
right_bound = max(monitor['left'] + monitor['width'] for monitor in monitors[1:])
|
46
|
+
bottom_bound = max(monitor['top'] + monitor['height'] for monitor in monitors[1:])
|
47
|
+
|
48
|
+
# 设置虚拟桌面的尺寸和位置
|
49
|
+
monitors[0]['width'] = right_bound - left_bound
|
50
|
+
monitors[0]['height'] = bottom_bound - top_bound
|
51
|
+
monitors[0]['top'] = top_bound
|
52
|
+
monitors[0]['left'] = left_bound
|
53
|
+
|
54
|
+
return monitors
|
55
|
+
|
56
|
+
|
57
|
+
class ActiveWindowCapture(OriginalMSS):
|
58
|
+
"""
|
59
|
+
基于`MSS`库的一个扩展,用于实现跨平台的多屏幕截图,并添加了以下独特功能:
|
60
|
+
1. 实时窗口捕获:能够获取当前激活的窗口信息,并关联到对应的进程对象。
|
61
|
+
这一特性使得该类在需要实时监控、分析特定应用窗口时尤为实用。
|
62
|
+
2. 缓存机制:该类采用了缓存策略,通过`xlcache`装饰器缓存截取的屏幕和窗口数据,避免频繁重复捕获,提升性能。
|
63
|
+
缓存机制同时确保在多窗口环境中,当前获取的窗口信息是实际的活动窗口,防止数据滞后或错位。
|
64
|
+
3. 多屏幕拼接与坐标调整:支持多屏幕拼接功能,能够调整不同显示器的坐标和尺寸,以生成全屏拼接的截图画布。
|
65
|
+
对于分辨率缩放和多屏偏移,也可以进行自适应调整。
|
66
|
+
4. 标记窗口功能:在截屏时,可以选择性地标记当前激活窗口的位置,支持自定义标记的颜色、厚度和偏移量,便于在截图中直观地显示当前活跃窗口。
|
67
|
+
|
68
|
+
适合需要频繁截图、实时监控活动窗口和对应进程的场景,尤其在多屏和分辨率适配方面提供了便捷的解决方案。
|
69
|
+
"""
|
70
|
+
|
71
|
+
def __1_动态成员变量(self):
|
72
|
+
pass
|
73
|
+
|
74
|
+
def __init__(self, *, scale=1):
|
75
|
+
"""
|
76
|
+
:param scale: 可适当兼容主屏幕做了缩放处理的情景,但太复杂的情况下也不一定对
|
77
|
+
"""
|
78
|
+
super().__init__()
|
79
|
+
self.scale = scale
|
80
|
+
|
81
|
+
@xlcache(property=True)
|
82
|
+
def monitors2(self):
|
83
|
+
""" 修正后的各个屏幕坐标 """
|
84
|
+
monitors = self.monitors
|
85
|
+
if self.scale != 1:
|
86
|
+
monitors = adjust_monitors(monitors, self.scale)
|
87
|
+
return monitors
|
88
|
+
|
89
|
+
@xlcache(property=True)
|
90
|
+
def window(self):
|
91
|
+
""" 当前激活窗口 """
|
92
|
+
hwnd = win32gui.GetForegroundWindow()
|
93
|
+
return Desktop(backend="win32").window(handle=hwnd)
|
94
|
+
|
95
|
+
@xlcache(property=True)
|
96
|
+
def process(self):
|
97
|
+
""" 当前激活窗口 """
|
98
|
+
hwnd = self.window.handle
|
99
|
+
thread_id, process_id = win32process.GetWindowThreadProcessId(hwnd)
|
100
|
+
return psutil.Process(process_id)
|
101
|
+
|
102
|
+
def __2_截图数据(self):
|
103
|
+
pass
|
104
|
+
|
105
|
+
@xlcache()
|
106
|
+
def _capture_single_monitor(self, order):
|
107
|
+
""" 缓存单个屏幕的截图 """
|
108
|
+
if order == 0:
|
109
|
+
# order=0时,拼接所有屏幕图像。虽然mss其实可以直接提供,但是这样就没有每个屏幕缓存的图片了,还是我自己处理一遍更好。
|
110
|
+
|
111
|
+
# 计算坐标偏移量,将所有坐标调整至非负
|
112
|
+
min_left = min(monitor['left'] for monitor in self.monitors2)
|
113
|
+
min_top = min(monitor['top'] for monitor in self.monitors2)
|
114
|
+
|
115
|
+
# 获取总画布大小(根据所有屏幕的范围计算)
|
116
|
+
max_right = max(monitor['left'] + monitor['width'] for monitor in self.monitors2)
|
117
|
+
max_bottom = max(monitor['top'] + monitor['height'] for monitor in self.monitors2)
|
118
|
+
canvas_width = max_right - min_left
|
119
|
+
canvas_height = max_bottom - min_top
|
120
|
+
|
121
|
+
# 使用numpy创建空白画布 (BGR格式)
|
122
|
+
img_canvas = np.zeros((canvas_height, canvas_width, 3), dtype=np.uint8)
|
123
|
+
|
124
|
+
# 获取并缓存每个子屏幕截图,按调整后的坐标拼接到总画布
|
125
|
+
for i in range(1, len(self.monitors2)):
|
126
|
+
monitor = self.monitors2[i]
|
127
|
+
single_img = self._capture_single_monitor(i) # 获取单屏截图 (cv2格式)
|
128
|
+
# 将子屏幕截图粘贴到总画布的指定位置,应用坐标偏移
|
129
|
+
x_offset = monitor['left'] - min_left
|
130
|
+
y_offset = monitor['top'] - min_top
|
131
|
+
img_canvas[y_offset:y_offset + single_img.shape[0],
|
132
|
+
x_offset:x_offset + single_img.shape[1]] = single_img
|
133
|
+
|
134
|
+
img_cv2 = img_canvas
|
135
|
+
else:
|
136
|
+
if order == -1:
|
137
|
+
# 截取当前活动窗口的截图
|
138
|
+
active_window = self.window
|
139
|
+
rect = active_window.rectangle() # 获取窗口的矩形区域
|
140
|
+
monitor = {
|
141
|
+
'left': int(rect.left),
|
142
|
+
'top': int(rect.top),
|
143
|
+
'width': int(rect.width()),
|
144
|
+
'height': int(rect.height()),
|
145
|
+
}
|
146
|
+
sct_img = self.grab(monitor)
|
147
|
+
else:
|
148
|
+
sct_img = self.grab(self.monitors2[order])
|
149
|
+
|
150
|
+
# 将截图的原始数据转换成numpy数组
|
151
|
+
img_np = np.frombuffer(sct_img.bgra, dtype=np.uint8)
|
152
|
+
img_np = img_np.reshape((sct_img.height, sct_img.width, 4)) # 高、宽、4通道
|
153
|
+
# 转换成BGR通道顺序
|
154
|
+
img_cv2 = cv2.cvtColor(img_np, cv2.COLOR_BGRA2BGR)
|
155
|
+
|
156
|
+
return img_cv2
|
157
|
+
|
158
|
+
def _mark_window_on_screenshot(self, screenshot, window_rect, order=0, mark_params=None):
|
159
|
+
"""
|
160
|
+
在截图中标记窗口,并根据 order 参数自动调整坐标偏移。
|
161
|
+
|
162
|
+
:param screenshot: 要标记的截图图像
|
163
|
+
:param window_rect: 当前激活窗口的原始坐标 (left, top, right, bottom)
|
164
|
+
:param order: 屏幕索引 (0 表示拼接所有屏幕,全图模式)
|
165
|
+
:param mark_params: 标记参数字典,包含 color, base, thickness 等
|
166
|
+
:return: 标记后的截图
|
167
|
+
"""
|
168
|
+
# 1 设定默认标记参数,若传入 mark_params 则进行更新
|
169
|
+
default_params = {
|
170
|
+
"color": (0, 255, 0), # 默认绿色
|
171
|
+
"base": 10, # 默认缩进 10 像素
|
172
|
+
"thickness": 3 # 默认厚度 3 像素
|
173
|
+
}
|
174
|
+
mark_params = mark_params if isinstance(mark_params, dict) else None
|
175
|
+
if mark_params:
|
176
|
+
default_params.update(mark_params)
|
177
|
+
|
178
|
+
color = default_params["color"]
|
179
|
+
base = default_params["base"]
|
180
|
+
thickness = default_params["thickness"]
|
181
|
+
|
182
|
+
# 2 获取对应 order 的屏幕原点坐标进行偏差修正
|
183
|
+
if order == 0:
|
184
|
+
origin_x = self.monitors2[0]['left']
|
185
|
+
origin_y = self.monitors2[0]['top']
|
186
|
+
else:
|
187
|
+
origin_x = self.monitors2[order]['left']
|
188
|
+
origin_y = self.monitors2[order]['top']
|
189
|
+
|
190
|
+
# 计算相对于指定屏幕或全图的窗口坐标
|
191
|
+
adjusted_coords = (
|
192
|
+
int(window_rect.left) - origin_x,
|
193
|
+
int(window_rect.top) - origin_y,
|
194
|
+
int(window_rect.right) - origin_x,
|
195
|
+
int(window_rect.bottom) - origin_y,
|
196
|
+
)
|
197
|
+
|
198
|
+
# 3 绘制矩形标记
|
199
|
+
cv2.rectangle(
|
200
|
+
screenshot,
|
201
|
+
(adjusted_coords[0] + base, adjusted_coords[1] + base),
|
202
|
+
(adjusted_coords[2] - base, adjusted_coords[3] - base),
|
203
|
+
color, # 使用自定义颜色
|
204
|
+
thickness # 使用自定义厚度
|
205
|
+
)
|
206
|
+
|
207
|
+
return screenshot
|
208
|
+
|
209
|
+
@xlcache()
|
210
|
+
def screenshot(self, order=0, *, to_pil=False, mark_active_window=False):
|
211
|
+
""" 截屏
|
212
|
+
|
213
|
+
:param int order:
|
214
|
+
-1, 截取当前激活窗口
|
215
|
+
0,默认值,截取全部屏幕
|
216
|
+
1,截取第1个屏幕
|
217
|
+
2,截取第2个屏幕
|
218
|
+
...
|
219
|
+
:param to_pil: 是否转换成 PIL 格式
|
220
|
+
:param mark_active_window: 是否标记当前激活窗口,若为字典可设置颜色、厚度等参数
|
221
|
+
:return: np矩阵或PIL图片,取决于to_cv2参数
|
222
|
+
"""
|
223
|
+
assert order < len(self.monitors), '屏幕下标越界'
|
224
|
+
img = self._capture_single_monitor(order) # 调用子函数处理所有屏幕拼接
|
225
|
+
|
226
|
+
# 若需要标记当前激活窗口
|
227
|
+
if mark_active_window:
|
228
|
+
img = self._mark_window_on_screenshot(img, self.window.rectangle(), order,
|
229
|
+
mark_params=mark_active_window)
|
230
|
+
|
231
|
+
if to_pil:
|
232
|
+
img = CvImg.read(img).to_pil_image() # 转成pil矩阵格式
|
233
|
+
|
234
|
+
return img
|
@@ -3,17 +3,8 @@
|
|
3
3
|
# @Author : 陈坤泽
|
4
4
|
# @Email : 877362867@qq.com
|
5
5
|
# @Date : 2020/06/06
|
6
|
-
import sys
|
7
|
-
|
8
|
-
from pyxllib.prog.pupil import check_install_package
|
9
|
-
|
10
|
-
if sys.platform == 'win32':
|
11
|
-
check_install_package('pyautogui')
|
12
|
-
|
13
|
-
check_install_package('keyboard')
|
14
|
-
check_install_package('klembord')
|
15
|
-
check_install_package('mss') # 多屏幕截图
|
16
6
|
|
7
|
+
import sys
|
17
8
|
from collections import defaultdict
|
18
9
|
import json
|
19
10
|
import os
|
@@ -26,6 +17,7 @@ from pandas.api.types import is_list_like
|
|
26
17
|
|
27
18
|
if sys.platform == 'win32':
|
28
19
|
import pyautogui
|
20
|
+
import win32gui
|
29
21
|
|
30
22
|
try:
|
31
23
|
import pyscreeze # NOQA pyautogui安装的时候会自动安装依赖的pyscreeze
|
@@ -42,6 +34,10 @@ from pyxllib.cv.expert import xlcv, xlpil
|
|
42
34
|
from pyxlpr.data.labelme import LabelmeDict
|
43
35
|
|
44
36
|
|
37
|
+
def __20210531():
|
38
|
+
""" 以前设想的一个跟labelme结合的自动化操作类 """
|
39
|
+
|
40
|
+
|
45
41
|
class AutoGuiLabelData:
|
46
42
|
""" AutoGuiLabelData """
|
47
43
|
|
@@ -773,6 +769,9 @@ def grab_monitor(order=0, to_cv2=True):
|
|
773
769
|
1,截取第1个屏幕
|
774
770
|
2,截取第2个屏幕
|
775
771
|
...
|
772
|
+
:param to_cv2:
|
773
|
+
True, 转成cv2格式的图片
|
774
|
+
False, 使用pil格式的图片
|
776
775
|
"""
|
777
776
|
from PIL import Image
|
778
777
|
from pyxllib.xlcv import PilImg
|
@@ -8,8 +8,11 @@ import os
|
|
8
8
|
import shutil
|
9
9
|
from tarfile import TarFile
|
10
10
|
# 这个包里的ZipFile是拷贝后修改过的,不影响标准库zipfile里的功能
|
11
|
-
import pyxllib.file.packlib.zipfile as zipfile
|
12
|
-
from pyxllib.file.packlib.zipfile import ZipFile
|
11
|
+
# import pyxllib.file.packlib.zipfile as zipfile
|
12
|
+
# from pyxllib.file.packlib.zipfile import ZipFile
|
13
|
+
import zipfile
|
14
|
+
from zipfile import ZipFile
|
15
|
+
import tempfile
|
13
16
|
|
14
17
|
from pyxllib.file.specialist import XlPath, reduce_dir_depth
|
15
18
|
from pyxllib.prog.pupil import inject_members
|
@@ -126,6 +129,25 @@ def _unpack_base(packfile, namelist, format=None, extract_dir=None, wrap=0):
|
|
126
129
|
shutil.unpack_archive(packfile, extract_dir, format)
|
127
130
|
|
128
131
|
|
132
|
+
def zip_filter_rule(path):
|
133
|
+
p = XlPath(path)
|
134
|
+
|
135
|
+
# 排除特定目录或文件
|
136
|
+
if set(p.parts) & {'__pycache__', '.git', '.idea', 'dist', 'build', '.pytest_cache', '.venv'}:
|
137
|
+
return 0
|
138
|
+
|
139
|
+
# 排除特定文件扩展名
|
140
|
+
if p.suffix in {'.egg-info', '.lock'}:
|
141
|
+
return 0
|
142
|
+
|
143
|
+
# 精细检查内部文件
|
144
|
+
if p.is_dir():
|
145
|
+
return 1
|
146
|
+
|
147
|
+
# 全部包含其他情况
|
148
|
+
return 2
|
149
|
+
|
150
|
+
|
129
151
|
class XlZipFile(ZipFile):
|
130
152
|
|
131
153
|
def infolist2(self, prefix=None, zipinfo=True):
|
@@ -151,6 +173,94 @@ class XlZipFile(ZipFile):
|
|
151
173
|
def unpack(self, extract_dir=None, format='zip', wrap=0):
|
152
174
|
_unpack_base(self.filename, self.namelist(), format, extract_dir, wrap)
|
153
175
|
|
176
|
+
def write_dir(self, directory, arcname=None, filter_rule=None):
|
177
|
+
"""
|
178
|
+
将指定目录(包含子目录)添加到 zip 文件中,并可自定义在 zip 中的存储路径。
|
179
|
+
|
180
|
+
:param directory: 要压缩的目录路径
|
181
|
+
:param arcname: 在 zip 文件中存储的根目录名,
|
182
|
+
None, 默认跟ZipFile.write的arcname一样,直接取输入的目录名
|
183
|
+
:param filter_rule: 过滤规则函数,用于排除不需要的文件。函数应接受文件路径作为参数,
|
184
|
+
返回0, 1, 或 2,分别表示排除、递归检查、全部包括。
|
185
|
+
"""
|
186
|
+
if arcname is None:
|
187
|
+
arcname = directory
|
188
|
+
|
189
|
+
if filter_rule is True:
|
190
|
+
filter_rule = zip_filter_rule
|
191
|
+
|
192
|
+
for root, dirs, files in os.walk(directory):
|
193
|
+
for file in files:
|
194
|
+
file_path = os.path.join(root, file)
|
195
|
+
|
196
|
+
# 调用过滤函数获取过滤状态
|
197
|
+
if filter_rule:
|
198
|
+
result = filter_rule(file_path)
|
199
|
+
if result == 0: # 明确不要
|
200
|
+
continue
|
201
|
+
elif result == 1: # 需要递归精细检查
|
202
|
+
pass # 继续执行文件写入逻辑
|
203
|
+
elif result == 2: # 全部包含
|
204
|
+
# 计算文件在 zip 文件中的相对路径
|
205
|
+
zip_path = os.path.join(arcname, os.path.relpath(file_path, directory))
|
206
|
+
self.write(file_path, zip_path)
|
207
|
+
continue
|
208
|
+
|
209
|
+
# 默认情况下,递归处理
|
210
|
+
zip_path = os.path.join(arcname, os.path.relpath(file_path, directory))
|
211
|
+
self.write(file_path, zip_path)
|
212
|
+
|
213
|
+
for dir in dirs[:]:
|
214
|
+
dir_path = os.path.join(root, dir)
|
215
|
+
|
216
|
+
if filter_rule:
|
217
|
+
result = filter_rule(dir_path)
|
218
|
+
if result == 0: # 明确不要
|
219
|
+
dirs.remove(dir) # 排除整个目录
|
220
|
+
elif result == 2: # 全部包含
|
221
|
+
# 添加整个目录
|
222
|
+
for root2, _, files2 in os.walk(dir_path):
|
223
|
+
for file2 in files2:
|
224
|
+
file_path = os.path.join(root2, file2)
|
225
|
+
zip_path = os.path.join(arcname, os.path.relpath(file_path, directory))
|
226
|
+
self.write(file_path, zip_path)
|
227
|
+
dirs.remove(dir) # 递归中不再处理此目录
|
228
|
+
|
229
|
+
def write_path(self, path, arcname=None, filter_rule=None):
|
230
|
+
""" 封装的同时支持文件或目录的操作 """
|
231
|
+
if XlPath(path).is_dir():
|
232
|
+
self.write_dir(path, arcname, filter_rule)
|
233
|
+
elif XlPath(path).is_file():
|
234
|
+
self.write(path, arcname)
|
235
|
+
else:
|
236
|
+
raise ValueError
|
237
|
+
|
238
|
+
def xlwrite(self, path, arcname=None, filter_rule=True):
|
239
|
+
self.write_path(path, arcname, filter_rule)
|
240
|
+
|
241
|
+
@classmethod
|
242
|
+
def create(cls, name=None):
|
243
|
+
""" 在临时目录下新建一个目录,然后放一个压缩包文件 """
|
244
|
+
# 如果没有提供 name,则生成一个临时的文件名
|
245
|
+
if name is None:
|
246
|
+
name = tempfile.mktemp(suffix=".zip").split('/')[-1] # 提取生成的文件名
|
247
|
+
|
248
|
+
# 创建临时目录(因为可能有并发操作,每个处理都建立一个目录更安全)
|
249
|
+
temp_dir = tempfile.mkdtemp()
|
250
|
+
temp_zip_path = f"{temp_dir}/{name}"
|
251
|
+
|
252
|
+
# 创建 ZipFile 对象
|
253
|
+
zipf = ZipFile(temp_zip_path, 'w')
|
254
|
+
return zipf
|
255
|
+
|
256
|
+
def fastapi_resp(self):
|
257
|
+
""" 返回供fastapi后端使用的文件接口 """
|
258
|
+
from fastapi.responses import FileResponse
|
259
|
+
|
260
|
+
self.close()
|
261
|
+
return FileResponse(self.filename, media_type='application/zip',
|
262
|
+
filename=XlPath(self.filename).name)
|
263
|
+
|
154
264
|
|
155
265
|
class XlTarFile(TarFile):
|
156
266
|
|
@@ -218,76 +328,3 @@ def compress_to_zip(source_path, target_zip_path=None, wrap=None,
|
|
218
328
|
zipf.write(source_path, arcname)
|
219
329
|
|
220
330
|
return target_zip_path
|
221
|
-
|
222
|
-
|
223
|
-
def smart_compress_zip(root, paths, check_func=None):
|
224
|
-
""" 智能压缩,比compress_to_zip功能会更强些
|
225
|
-
|
226
|
-
:param root: 要有个根目录,才知道paths里添加到压缩包的时候存储到怎样的相对目录下
|
227
|
-
:param paths: 所有待添加到压缩包的文件或目录
|
228
|
-
:param check_func: 规则判断函数,输入文件或目录的路径
|
229
|
-
return
|
230
|
-
0,明确不要
|
231
|
-
1,要使用,但要递归内部文件精细检查
|
232
|
-
2,全部都要
|
233
|
-
"""
|
234
|
-
|
235
|
-
if check_func is None:
|
236
|
-
def check_func(path):
|
237
|
-
p = XlPath(path)
|
238
|
-
|
239
|
-
if set(p.parts) & {'__pycache__', '.git', '.idea', 'dist', 'build', '.pytest_cache'}:
|
240
|
-
return 0
|
241
|
-
|
242
|
-
if p.parts[-1].endswith('.egg-info'):
|
243
|
-
return 0
|
244
|
-
|
245
|
-
return 1
|
246
|
-
|
247
|
-
def add_dir(dir):
|
248
|
-
for subroot, _, names in os.walk(dir):
|
249
|
-
for name in names:
|
250
|
-
file = XlPath(subroot) / name
|
251
|
-
zipf.write(file, file.relpath(root))
|
252
|
-
|
253
|
-
def add_path(path):
|
254
|
-
tag = check_func(path)
|
255
|
-
|
256
|
-
if path.is_file():
|
257
|
-
if tag:
|
258
|
-
zipf.write(path, path.relpath(root))
|
259
|
-
elif path.is_dir():
|
260
|
-
if tag == 2:
|
261
|
-
add_dir(path)
|
262
|
-
elif tag == 1:
|
263
|
-
for subroot, _, names in os.walk(path):
|
264
|
-
tag2 = check_func(subroot)
|
265
|
-
if tag2 == 2:
|
266
|
-
add_dir(subroot)
|
267
|
-
elif tag2 == 1:
|
268
|
-
for name in names:
|
269
|
-
file = XlPath(subroot) / name
|
270
|
-
if check_func(file):
|
271
|
-
zipf.write(file, file.relpath(root))
|
272
|
-
|
273
|
-
# 工作目录会自动切换的,这里取工作目录名即可
|
274
|
-
if not isinstance(paths, list):
|
275
|
-
paths = [paths]
|
276
|
-
|
277
|
-
root = XlPath(root)
|
278
|
-
num = len(paths)
|
279
|
-
outfile = None
|
280
|
-
if num > 1:
|
281
|
-
outfile = root / XlPath(root.name + '.zip')
|
282
|
-
elif num == 1:
|
283
|
-
outfile = root / (XlPath(paths[0]).name + '.zip')
|
284
|
-
else:
|
285
|
-
return
|
286
|
-
zipf = XlZipFile(outfile, 'w', zipfile.ZIP_DEFLATED)
|
287
|
-
|
288
|
-
for subroot in paths:
|
289
|
-
add_path(XlPath(subroot))
|
290
|
-
|
291
|
-
zipf.close()
|
292
|
-
|
293
|
-
return outfile
|
@@ -14,7 +14,7 @@ import time
|
|
14
14
|
from pyxllib.prog.pupil import check_install_package, run_once
|
15
15
|
|
16
16
|
check_install_package('openpyxl')
|
17
|
-
check_install_package('premailer')
|
17
|
+
# check_install_package('premailer')
|
18
18
|
# check_install_package('xlrd2')
|
19
19
|
check_install_package('yattag')
|
20
20
|
check_install_package('jsonpickle')
|
@@ -343,3 +343,49 @@ class BitMaskTool:
|
|
343
343
|
html_content.append(df2.to_html())
|
344
344
|
|
345
345
|
return '\n'.join(html_content)
|
346
|
+
|
347
|
+
|
348
|
+
def loguru_setup_jsonl_logfile(logger, log_dir, rotation_size="10 MB"):
|
349
|
+
"""
|
350
|
+
给loguru的日志器添加导出文件的功能,使用jsonl格式
|
351
|
+
|
352
|
+
:param logger: 日志记录器,一般是from loguru import logger的logger
|
353
|
+
:param log_dir: 存储日志的目录,因为有多个文件,这里要输入的是所在的目录
|
354
|
+
:param rotation_size: 文件多大后分割
|
355
|
+
:return:
|
356
|
+
"""
|
357
|
+
from datetime import datetime
|
358
|
+
|
359
|
+
os.makedirs(log_dir, exist_ok=True) # 自动创建日志目录
|
360
|
+
|
361
|
+
# 日志文件名匹配的正则表达式,格式为 年月日_时分秒.log
|
362
|
+
log_filename_pattern = re.compile(r"(\d{8}_\d{6})\.jsonl")
|
363
|
+
|
364
|
+
# 找到最新的日志文件
|
365
|
+
def find_latest_log_file(log_dir):
|
366
|
+
log_files = []
|
367
|
+
for file in os.listdir(log_dir):
|
368
|
+
if log_filename_pattern.match(file):
|
369
|
+
log_files.append(file)
|
370
|
+
|
371
|
+
if log_files:
|
372
|
+
# 根据时间排序,选择最新的日志文件
|
373
|
+
log_files.sort(reverse=True)
|
374
|
+
return os.path.join(log_dir, log_files[0])
|
375
|
+
return None
|
376
|
+
|
377
|
+
# 检查是否有未写满的日志文件
|
378
|
+
latest_log_file = find_latest_log_file(log_dir)
|
379
|
+
|
380
|
+
if latest_log_file:
|
381
|
+
log_path = latest_log_file
|
382
|
+
else:
|
383
|
+
# 生成新的日志文件名
|
384
|
+
log_filename = datetime.now().strftime("%Y%m%d_%H%M%S") + ".jsonl"
|
385
|
+
log_path = os.path.join(log_dir, log_filename)
|
386
|
+
|
387
|
+
# 配置 logger,写入日志文件,设置旋转条件,使用 JSON 序列化
|
388
|
+
logger.add(log_path, rotation=rotation_size, serialize=True)
|
389
|
+
|
390
|
+
# 输出初始化成功信息
|
391
|
+
logger.info(f"日志系统已初始化,日志文件路径:{log_path}")
|
@@ -29,7 +29,8 @@ def get_xllog(name='xllog', *, log_file=None):
|
|
29
29
|
|
30
30
|
TODO 增加输出到钉钉机器人、邮箱的Handler?
|
31
31
|
"""
|
32
|
-
import logging, coloredlogs
|
32
|
+
# import logging, coloredlogs
|
33
|
+
import logging
|
33
34
|
|
34
35
|
# 1 判断是否已存在,直接返回
|
35
36
|
if ('pyxllib.' + name) in logging.root.manager.loggerDict:
|
@@ -57,10 +58,10 @@ def get_xllog(name='xllog', *, log_file=None):
|
|
57
58
|
file_handler.setLevel(logging.DEBUG)
|
58
59
|
file_handler.setFormatter(logging.Formatter(fmt))
|
59
60
|
xllog.addHandler(file_handler)
|
60
|
-
coloredlogs.install(level='DEBUG', logger=xllog, fmt=fmt)
|
61
|
+
# coloredlogs.install(level='DEBUG', logger=xllog, fmt=fmt)
|
61
62
|
elif name == 'location': # 附带代码所处位置信息
|
62
63
|
loclog = logging.getLogger('pyxllib.location')
|
63
|
-
coloredlogs.install(level='DEBUG', logger=loclog, fmt='%(filename)s/%(lineno)d: %(message)s')
|
64
|
+
# coloredlogs.install(level='DEBUG', logger=loclog, fmt='%(filename)s/%(lineno)d: %(message)s')
|
64
65
|
return logging.getLogger('pyxllib.' + name)
|
65
66
|
|
66
67
|
|