{ "info": { "author": "Jarno Yuan", "author_email": "ykq12313@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "##### 1.file\n\n~~~markdown\n1. file_isexist(file=None)\n\t@\u529f\u80fd \u6587\u4ef6\u662f\u5426\u5b58\u5728 \n @\u53c2\u6570 file \u6587\u4ef6\u5168\u8def\u5f84 \n @\u8fd4\u56de True or False or Exception \n\n2. dir_isexist(dir=None) \n\t@\u529f\u80fd \u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728 \n @\u53c2\u6570 dir \u6587\u4ef6\u5939\u5168\u8def\u5f84 \n @\u8fd4\u56de True or False or Exception \n\n3. create_dir(path=None) \n\t@\u529f\u80fd \u521b\u5efa\u8def\u5f84 \n @\u53c2\u6570 path \u8def\u5f84\u5730\u5740 \n @\u8fd4\u56de True or False or Exception \n\n4. create_file(srcfile=None)\n\t@\u529f\u80fd \u521b\u5efa\u6587\u4ef6 \n @\u53c2\u6570 path \u8def\u5f84\u5730\u5740 \n @\u53c2\u6570 file \u6587\u4ef6 \n @\u8fd4\u56de True or Exception \n\n5. copy_file(src_file=None, dst_file=None)\n\t@\u529f\u80fd \u590d\u5236\u6587\u4ef6 \n @\u53c2\u6570 src_file \u6e90\u6587\u4ef6\u5168\u8def\u5f84 \n @\u53c2\u6570 dst_file \u76ee\u6807\u6587\u4ef6\u5168\u8def\u5f84 \n @\u8fd4\u56de True or Exception \n\n6. move_file(src_file=None, dst_path=None)\n\t@\u529f\u80fd \u79fb\u52a8\u6587\u4ef6 \n @\u53c2\u6570 src_file \u6e90\u6587\u4ef6\u5168\u8def\u5f84 \n @\u53c2\u6570 dst_path \u76ee\u6807\u6587\u4ef6\u5168\u8def\u5f84 \n @\u8fd4\u56de True or Exception \n\n7. move_folder(src_path=None, dst_path=None)\n\t@\u529f\u80fd \u79fb\u52a8\u6587\u4ef6\u5939 \n @\u53c2\u6570 src_path \u6e90\u8def\u5f84 \n @\u53c2\u6570 dst_path \u76ee\u6807\u8def\u5f84 \n @\u8fd4\u56de True or Exception \n\n8. del_file(file=None)\n\t@\u529f\u80fd \u5220\u9664\u6587\u4ef6 \n @\u53c2\u6570 file \u6587\u4ef6\u5168\u8def\u5f84 \n @\u8fd4\u56de True or Exception \n\n9. del_dir(dir=None) \n\t@\u529f\u80fd \u5220\u9664\u6587\u4ef6\u5939 \n @\u53c2\u6570 dir \u6587\u4ef6\u5939\u5168\u8def\u5f84 \n @\u8fd4\u56de True or Exception \n\n10. replaceSpecialChar(content) \n\t@\u529f\u80fd \u5220\u9664\u8f93\u5165\u5185\u5bb9\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\uff0c\u4e3b\u8981\u4e3a\u56de\u8f66\u7b26 \n @\u53c2\u6570 content \u9700\u8981\u5904\u7406\u7684\u5185\u5bb9\uff0c\u53ef\u4ee5\u4e3alist\u6216\u8005\u4e3a\u5b57\u7b26\u4e32 \n @\u8fd4\u56de \u8fd4\u56de\u53bb\u9664\u7279\u6b8a\u5b57\u7b26\u540e\u7684\u5b57\u7b26\u4e32\uff0c\u5e76\u5728list\u6bcf\u4e2a\u5143\u7d20\u540e\u8fb9\u6dfb\u52a0**\u4f5c\u4e3a\u5206\u9694 \n\n11. getFileContent(file=None)\n\t@\u529f\u80fd \u8bfb\u53d6\u6587\u4ef6\u7684\u5185\u5bb9 \n @\u53c2\u6570 file \u6587\u4ef6\u540d \n @\u8fd4\u56de \u8bfb\u53d6\u6210\u529f\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9\uff0c\u5931\u8d25\u8fd4\u56de\u7a7a\u5b57\u7b26\u4e32 \n\n12. typeList()\n\t@\u529f\u80fd \u5f97\u5230\u6587\u4ef6\u7c7b\u578b\u53ca\u5bf9\u5e94\u8868 \n @\u8fd4\u56de \u6587\u4ef6\u7c7b\u578b\u53ca\u5176\u5bf9\u5e94\u8868 \n\n13. bytes2hex(bytes)\n\t@\u529f\u80fd \u5b57\u8282\u7801\u8f6c16\u8fdb\u5236\u5b57\u7b26\u4e32 \n @\u53c2\u6570 bytes \u5b57\u8282\u7801 \n @\u8fd4\u56de \u8fd4\u56de16\u8fdb\u5236\u5b57\u7b26\u4e32 \n\n14. filetype(filename)\n\t@\u529f\u80fd \u83b7\u53d6\u6587\u4ef6\u7684\u6587\u4ef6\u7c7b\u578b \n @\u53c2\u6570 filename \u6587\u4ef6\u540d \n @\u8fd4\u56de \u8fd4\u56de\u8be5\u6587\u4ef6\u7684\u6587\u4ef6\u7c7b\u578b\uff0c\u5982\u679c\u6ca1\u6709\u5339\u914d\u5219\u8fd4\u56deunknown \n\n15. getOneLayerFile(path=\"\")\n\t@\u529f\u80fd \u5f97\u5230\u76ee\u5f55\u4e0b\u4e00\u5c42\u7684\u6587\u4ef6\u5217\u8868 \n @\u53c2\u6570 path \u5168\u8def\u5f84 \n @\u8fd4\u56de \u6587\u4ef6\u5217\u8868 \n\n16. getallfile(path=\"\")\n\t@\u529f\u80fd \u5f97\u5230\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u5217\u8868\uff0c\u4e0d\u5305\u542b\u6587\u4ef6\u5939 \n @\u53c2\u6570 path \u5168\u8def\u5f84 \n @\u8fd4\u56de \u6587\u4ef6\u5217\u8868 \n\n17. getallDirectories(path=\"\")\n\t@\u529f\u80fd \u5f97\u5230\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u5939\u5217\u8868\uff0c\u6df1\u5ea6\u53ea\u6709\u4e00\u5c42 \n @\u53c2\u6570 path \u5168\u8def\u5f84 \n @\u8fd4\u56de \u6587\u4ef6\u5217\u8868 \n~~~\n\n##### 2.log\n\n~~~markdown\n1. \u7528\u6cd5 \n from fileoperate.log import ILog\n logger = ILog(__file__) # \u8868\u793a\u5f53\u524d\u6587\u4ef6\u5730\u5740\n \u53d1\u9001\u65e5\u5fd7 \u5199\u5165\u7edf\u4e00\u7684\u65e5\u5fd7\u4e2d\n\n2. info(self, msg)\n\t@\u529f\u80fd \u8f93\u51fainfo\u7c7b\u578b\u7684\u65e5\u5fd7 \n @\u53c2\u6570 msg \u9700\u8981\u8f93\u51fa\u7684\u4fe1\u606f\n\n3. warning(self, msg)\n\t@\u529f\u80fd \u8f93\u51fawarning\u7c7b\u578b\u7684\u65e5\u5fd7 \n @\u53c2\u6570 msg \u9700\u8981\u8f93\u51fa\u7684\u4fe1\u606f \n\n4. error(self, msg)\n\t@\u529f\u80fd \u8f93\u51faerror\u7c7b\u578b\u7684\u65e5\u5fd7 \n @\u53c2\u6570 msg \u9700\u8981\u8f93\u51fa\u7684\u4fe1\u606f \n\n5. debug(self, msg)\n\t@\u529f\u80fd \u8f93\u51fadebug\u7c7b\u578b\u7684\u65e5\u5fd7 \n @\u53c2\u6570 msg \u9700\u8981\u8f93\u51fa\u7684\u4fe1\u606f \n\n6. INFO(self, msg)\n\t@\u529f\u80fd \u8f93\u51fainfo\u7c7b\u578b\u7684\u65e5\u5fd7 \n @\u53c2\u6570 msg \u9700\u8981\u8f93\u51fa\u7684\u4fe1\u606f \n\n7. exception(self, msg)\n\t@\u529f\u80fd \u8f93\u51faexception\u7c7b\u578b\u7684\u65e5\u5fd7 \n @\u53c2\u6570 msg \u9700\u8981\u8f93\u51fa\u7684\u4fe1\u606f\n\n8. getLogFileName(self)\n\t@\u529f\u80fd \u83b7\u53d6\u65e5\u5fd7\u6587\u4ef6\u540d\n~~~\n\n##### 3.pdf\n\n~~~markdown\n1. \u529f\u80fd\uff1a\u89e3\u6790pdf \u6587\u672c\uff0c\u4fdd\u5b58\u5230txt\u6587\u4ef6\u4e2d\n2. parse(path)\n\t@\u529f\u80fd \u83b7\u53d6pdf\u6587\u4ef6\u7684\u6587\u4ef6\u5185\u5bb9 \n @\u53c2\u6570 path \u6587\u4ef6\u540d \n @\u8fd4\u56de \u8fd4\u56de\u8be5\u6587\u4ef6\u7684\u6587\u4ef6\u5185\u5bb9\uff0c\u5185\u5bb9\u4ee5list\u5f62\u5f0f\u5b58\u5728\uff0c\u6bcf\u4e00\u884c\u4e3alist\u7684\u4e00\u4e2a\u5143\u7d20 \n\n~~~\n\n##### 4.word\n\n~~~markdown\n1. fileTypeCheck(fPath)\n\t@\u529f\u80fd \u68c0\u67e5\u8be5\u6587\u4ef6\u662f\u4e0d\u662fdocx/doc/wps/txt\u6587\u4ef6\u7684\u5176\u4e2d\u4e00\u79cd \n @\u53c2\u6570 fpath \u6587\u4ef6\u540d \n @\u8fd4\u56de \u5982\u679c\u662fdocx/doc/wps/txt\u7684\u4e00\u79cd\uff0c\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse \n\n2. parse(path)\n\t@\u529f\u80fd \u83b7\u53d6docx/doc/wps/txt\u6587\u4ef6\u7684\u6587\u4ef6\u5185\u5bb9 \n @\u53c2\u6570 path \u6587\u4ef6\u540d \n @\u8fd4\u56de \u8fd4\u56de\u8be5\u6587\u4ef6\u7684\u6587\u4ef6\u5185\u5bb9\uff0c\u5185\u5bb9\u4ee5list\u5f62\u5f0f\u5b58\u5728\uff0c\u6bcf\u4e00\u884c\u4e3alist\u7684\u4e00\u4e2a\u5143\u7d20 \n~~~\n\n##### 5.xlsx\n\n~~~markdown\n1. creatExcel(file,sheetName)\n \t@\u529f\u80fd \u521b\u5efa\u4e00\u4e2aexcel\u6587\u4ef6 \n @\u53c2\u6570 file \u6587\u4ef6\u540d\uff0c sheetName sheet\u9875\u540d \n @\u8fd4\u56de \u5982\u679c\u6210\u529f\u8fd4\u56deTrue\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38 \n\n2. loadWorkBook(file)\n\t@\u529f\u80fd \u52a0\u8f7dexcel\u6587\u4ef6 \n @\u53c2\u6570 file excel\u5168\u8def\u5f84 \n @\u8fd4\u56de Exception \n\n3. getSheet(wb, sheetName)\n\t@\u529f\u80fd \u83b7\u53d6sheet\u9875 \n @\u53c2\u6570 wb \u5de5\u4f5c\u7c3f \n @\u53c2\u6570 sheetName sheet\u9875\u540d\u79f0 \n @\u8fd4\u56de Exception \n\n4. getMaxRow(sheet)\n\t@\u529f\u80fd \u83b7\u53d6\u5f53\u524dsheet\u9875\u6700\u5927\u884c \n @\u53c2\u6570 sheet sheet\u9875 \n @\u8fd4\u56de Exception \n\n5. getCellData(sheet, row, column)\n\t@\u529f\u80fd \u83b7\u53d6\u5355\u5143\u683c\u6570\u636e \n @\u53c2\u6570 sheet sheet\u9875 \n @\u53c2\u6570 row \u884c\u53f7 \n @\u53c2\u6570 column \u5217\u53f7 \n @\u8fd4\u56de Exception \n\n6. setCellData(sheet, row, column, value)\n\t@\u529f\u80fd \u8bbe\u7f6e\u5355\u5143\u683c\u503c \n @\u53c2\u6570 sheet sheet\u9875 \n @\u53c2\u6570 row \u884c\u53f7 \n @\u53c2\u6570 column \u5217\u53f7 \n @\u53c2\u6570 value \u503c \n @\u8fd4\u56de Exception \n\n7. mergeCells(sheet, start_row, start_column, end_row, end_column)\n\t@\u529f\u80fd \u62c6\u5206\u5355\u5143\u683c \n @\u53c2\u6570 sheet sheet\u9875 \n @\u53c2\u6570 start_row \u5f00\u59cb\u884c\u53f7 \n @\u53c2\u6570 start_column \u5f00\u59cb\u5217\u53f7 \n @\u53c2\u6570 end_row \u7ed3\u675f\u884c\u53f7 \n @\u53c2\u6570 end_column \u7ed3\u675f\u5217\u53f7 \n @\u8fd4\u56de Exception \n\n8. cellAlignment(sheet, row, column, horizontal=None, vertical=None, border_style=None, border_color=None,\n font_size=None, font_color=None, fill_color=None, fill_type=None, wrapText=None) \n \t@\u529f\u80fd \u8bbe\u7f6e\u5355\u5143\u683c\u6837\u5f0f \n @\u53c2\u6570 sheet sheet\u9875 \n @\u53c2\u6570 row \u884c\u53f7 \n @\u53c2\u6570 column \u5217\u53f7 \n @\u53c2\u6570 horizontal \u6c34\u5e73\u65b9\u5411 horizontal_alignments\u53d6\u503c\u8bf4\u660e:('general','left','center','right','fill','justify','centerContinuous','distributed') \n @\u53c2\u6570 vertical \u5782\u76f4\u65b9\u5411 vertical_aligments\u53d6\u503c\u8bf4\u660e:('top', 'center', 'bottom', 'justify','distributed') \n @\u53c2\u6570 border_style \u5355\u5143\u683c\u6837\u5f0f border_style\u53d6\u503c\u8bf4\u660e:('dashDot','dashDotDot', 'dashed','dotted','double','hair', 'medium', 'mediumDashDot', 'mediumDashDotDot','mediumDashed', 'slantDashDot', 'thick', 'thin') \n @\u53c2\u6570 border_color \u5355\u5143\u683c\u989c\u8272\n @\u53c2\u6570 font_size \u5b57\u4f53\u5927\u5c0f \n @\u53c2\u6570 font_color \u5b57\u4f53\u989c\u8272 \n @\u53c2\u6570 fill_color \u586b\u5145\u989c\u8272 \n @\u53c2\u6570 fill_type \u586b\u5145\u7c7b\u578b fill_type\u53d6\u503c\u8bf4\u660e:'gray0625', 'lightHorizontal', 'lightVertical', 'gray125', 'darkVertical', 'darkGray', 'darkDown', 'darkTrellis', 'lightTrellis', 'lightDown', 'darkGrid', 'lightUp', 'lightGrid', 'mediumGray', 'solid', 'darkUp', 'darkHorizontal', 'lightGray' \n @\u8fd4\u56de Exception \n \u4f8b\u5b50\uff1acellAlignment(sheet1,i,j,horizontal='center',vertical='center',border_style='medium',border_color='E53528',font_size=\"22\",font_color='0864B1',fill_color='F4CF15',fill_type='solid')\n\n9. saveExcel(wb, file)\n\t@\u529f\u80fd \u4fdd\u5b58excel \n @\u53c2\u6570 wb \u5de5\u4f5c\u7c3f \n @\u53c2\u6570 file excel\u5168\u8def\u5f84 \n @\u8fd4\u56de Exception \n\n10. closeExcel(wb, file)\n\t@\u529f\u80fd \u5173\u95edexcel \n @\u53c2\u6570 wb \u5de5\u4f5c\u7c3f \n @\u53c2\u6570 file excel\u5168\u8def\u5f84 \n @\u8fd4\u56de Exception \n~~~\n\n##### 6.jsonOperator\n\n~~~markdown\n1. write(fileName, data)\n2. read(fileName)\n3. getValue(fileName,key)\n~~~\n\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yuanke7/fileoperate_package", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "fileoperate", "package_url": "https://pypi.org/project/fileoperate/", "platform": "", "project_url": "https://pypi.org/project/fileoperate/", "project_urls": { "Homepage": "https://github.com/yuanke7/fileoperate_package" }, "release_url": "https://pypi.org/project/fileoperate/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "A module to operate many kinds of files.", "version": "1.0.2" }, "last_serial": 5923267, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "71b57b3b035ac98b6e5ecbb712a113d5", "sha256": "95b579eeadc5b32d588a23e89f9ee070e79672d45729ef9654a5d8c67c05a41d" }, "downloads": -1, "filename": "fileoperate-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "71b57b3b035ac98b6e5ecbb712a113d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13433, "upload_time": "2019-10-03T07:37:50", "url": "https://files.pythonhosted.org/packages/c9/13/b571b33cf4de68b7d37f614fc70eccb975678fff4ce58007c065d06b43bf/fileoperate-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdcd2087d05118d06227c98d0032749b", "sha256": "3585dccbfe2f56c7831374e4ff268a46a8d259cdd617c8bd2e28110d38e93c9f" }, "downloads": -1, "filename": "fileoperate-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fdcd2087d05118d06227c98d0032749b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11692, "upload_time": "2019-10-03T07:37:53", "url": "https://files.pythonhosted.org/packages/32/d6/e31f99e511e1a8b947c43679f7768dd00e4066560514caadc1d659da0d85/fileoperate-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e3b2645b0e2ade3d1e764ab4455731cc", "sha256": "e82f67554982eebf31e9a0f5c3f6afe3d63f5b1c594c9ae3a22b435d8c226a3c" }, "downloads": -1, "filename": "fileoperate-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e3b2645b0e2ade3d1e764ab4455731cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4288, "upload_time": "2019-10-03T08:50:51", "url": "https://files.pythonhosted.org/packages/71/b3/e188832f73af3a7203f44691ca99ab93ea5c852f8b64940865db909d9414/fileoperate-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c09274511e3ae6217da9826385400db4", "sha256": "7ec88acf7947711bedfee92ec191d15a61b9ed720166925fe33c8210c88ca0da" }, "downloads": -1, "filename": "fileoperate-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c09274511e3ae6217da9826385400db4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4072, "upload_time": "2019-10-03T08:50:53", "url": "https://files.pythonhosted.org/packages/63/76/4b7e4775930561c6d53758f936ec08d1836dd6a57620dbaa54d7cdbba613/fileoperate-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "d32dcf7a871986c5988ceed6304ef876", "sha256": "10eb1f49df39e77161401fdbaafb8b6c582d0a5e55293f160d3beb5a5c43f345" }, "downloads": -1, "filename": "fileoperate-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d32dcf7a871986c5988ceed6304ef876", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4288, "upload_time": "2019-10-03T12:50:12", "url": "https://files.pythonhosted.org/packages/d5/74/886b720262c471c53713fba4a9ed0d3d88343d2355ef374a0579a8090340/fileoperate-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4ff5ba6d3812c53c95f46a60076afee", "sha256": "7855894d2e2d0763a9c3202e1746f6d88f59d2298459fdeab87ac452208f58a1" }, "downloads": -1, "filename": "fileoperate-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c4ff5ba6d3812c53c95f46a60076afee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4075, "upload_time": "2019-10-03T12:50:14", "url": "https://files.pythonhosted.org/packages/e0/db/a1bd2df054d1c5d7e8ce5f144c2b72960c24231163d334d537256d06a9a9/fileoperate-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d32dcf7a871986c5988ceed6304ef876", "sha256": "10eb1f49df39e77161401fdbaafb8b6c582d0a5e55293f160d3beb5a5c43f345" }, "downloads": -1, "filename": "fileoperate-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d32dcf7a871986c5988ceed6304ef876", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4288, "upload_time": "2019-10-03T12:50:12", "url": "https://files.pythonhosted.org/packages/d5/74/886b720262c471c53713fba4a9ed0d3d88343d2355ef374a0579a8090340/fileoperate-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4ff5ba6d3812c53c95f46a60076afee", "sha256": "7855894d2e2d0763a9c3202e1746f6d88f59d2298459fdeab87ac452208f58a1" }, "downloads": -1, "filename": "fileoperate-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c4ff5ba6d3812c53c95f46a60076afee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4075, "upload_time": "2019-10-03T12:50:14", "url": "https://files.pythonhosted.org/packages/e0/db/a1bd2df054d1c5d7e8ce5f144c2b72960c24231163d334d537256d06a9a9/fileoperate-1.0.2.tar.gz" } ] }