ErrorFile


NameErrorFile JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Hellohistory/Errorfile
SummaryThis is a package for handling error files
upload_time2024-02-29 10:33:48
maintainer
docs_urlNone
authorHellohistory
requires_python>=3.6
license
keywords error file
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ErrorFile

`ErrorFile`是一个用于检测和识别各种文件错误的Python包,包括图片、PDF、Excel和Word文件。通过使用不同的检测模式,可以快速或精确地识别文件中的潜在问题。

## 安装

你可以通过pip安装`ErrorFile`:

```bash
pip install ErrorFile
```

## 快速开始

使用`ErrorFile`非常简单。首先,导入`FileInspector`类,然后创建一个实例,并指定要检查的文件路径和(可选的)检查模式。

### 示例

```python
from ErrorFile.Detection.FileInspector import FileInspector


file_path = 'TestFiles/test.pdf'
image_mode = 'precise'  # 或 'fast'
result = FileInspector(file_path, image_mode).inspect()
print(result)
```

## 支持的文件类型

目前,`ErrorFile`支持以下文件类型的检查:

- 图片(JPEG, JPG, PNG, GIF, BMP, WEBP, TIFF, SVG)
- PDF
- Excel(XLSX, XLS)
- Word(DOCX)

## 检测模式

对于图片文件,支持两种检测模式:

- `fast`:快速检测模式,适用于快速概览和检查大量文件。
- `precise`:精确检测模式,适用于深入分析单个文件。

对于PDF、Excel和Word文件,将自动采用详细检测模式。

## API参考

### `FileInspector`

主要的类,用于初始化文件检查过程。

#### 参数

- `file_path`:要检查的文件路径。
- `image_mode`:(可选)图片检查模式,默认为`precise`。

#### 方法

- `inspect()`:执行文件检查,并返回检查结果。

## 贡献

欢迎贡献!如果你有任何建议或改进,请提交Pull Request或创建Issue。

## 许可证

`ErrorFile`根据Apache-2.0许可证发布。有关详细信息,请查看LICENSE文件。

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Hellohistory/Errorfile",
    "name": "ErrorFile",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "error file",
    "author": "Hellohistory",
    "author_email": "etojsyc521@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/77/aa/4318b1c52aa0bf3b338df9a28a5460a916268ee4e88f483f46e9c02dbe6a/ErrorFile-0.0.1.tar.gz",
    "platform": null,
    "description": "# ErrorFile\r\n\r\n`ErrorFile`\u662f\u4e00\u4e2a\u7528\u4e8e\u68c0\u6d4b\u548c\u8bc6\u522b\u5404\u79cd\u6587\u4ef6\u9519\u8bef\u7684Python\u5305\uff0c\u5305\u62ec\u56fe\u7247\u3001PDF\u3001Excel\u548cWord\u6587\u4ef6\u3002\u901a\u8fc7\u4f7f\u7528\u4e0d\u540c\u7684\u68c0\u6d4b\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5feb\u901f\u6216\u7cbe\u786e\u5730\u8bc6\u522b\u6587\u4ef6\u4e2d\u7684\u6f5c\u5728\u95ee\u9898\u3002\r\n\r\n## \u5b89\u88c5\r\n\r\n\u4f60\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5`ErrorFile`\uff1a\r\n\r\n```bash\r\npip install ErrorFile\r\n```\r\n\r\n## \u5feb\u901f\u5f00\u59cb\r\n\r\n\u4f7f\u7528`ErrorFile`\u975e\u5e38\u7b80\u5355\u3002\u9996\u5148\uff0c\u5bfc\u5165`FileInspector`\u7c7b\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u5e76\u6307\u5b9a\u8981\u68c0\u67e5\u7684\u6587\u4ef6\u8def\u5f84\u548c\uff08\u53ef\u9009\u7684\uff09\u68c0\u67e5\u6a21\u5f0f\u3002\r\n\r\n### \u793a\u4f8b\r\n\r\n```python\r\nfrom ErrorFile.Detection.FileInspector import FileInspector\r\n\r\n\r\nfile_path = 'TestFiles/test.pdf'\r\nimage_mode = 'precise'  # \u6216 'fast'\r\nresult = FileInspector(file_path, image_mode).inspect()\r\nprint(result)\r\n```\r\n\r\n## \u652f\u6301\u7684\u6587\u4ef6\u7c7b\u578b\r\n\r\n\u76ee\u524d\uff0c`ErrorFile`\u652f\u6301\u4ee5\u4e0b\u6587\u4ef6\u7c7b\u578b\u7684\u68c0\u67e5\uff1a\r\n\r\n- \u56fe\u7247\uff08JPEG, JPG, PNG, GIF, BMP, WEBP, TIFF, SVG\uff09\r\n- PDF\r\n- Excel\uff08XLSX, XLS\uff09\r\n- Word\uff08DOCX\uff09\r\n\r\n## \u68c0\u6d4b\u6a21\u5f0f\r\n\r\n\u5bf9\u4e8e\u56fe\u7247\u6587\u4ef6\uff0c\u652f\u6301\u4e24\u79cd\u68c0\u6d4b\u6a21\u5f0f\uff1a\r\n\r\n- `fast`\uff1a\u5feb\u901f\u68c0\u6d4b\u6a21\u5f0f\uff0c\u9002\u7528\u4e8e\u5feb\u901f\u6982\u89c8\u548c\u68c0\u67e5\u5927\u91cf\u6587\u4ef6\u3002\r\n- `precise`\uff1a\u7cbe\u786e\u68c0\u6d4b\u6a21\u5f0f\uff0c\u9002\u7528\u4e8e\u6df1\u5165\u5206\u6790\u5355\u4e2a\u6587\u4ef6\u3002\r\n\r\n\u5bf9\u4e8ePDF\u3001Excel\u548cWord\u6587\u4ef6\uff0c\u5c06\u81ea\u52a8\u91c7\u7528\u8be6\u7ec6\u68c0\u6d4b\u6a21\u5f0f\u3002\r\n\r\n## API\u53c2\u8003\r\n\r\n### `FileInspector`\r\n\r\n\u4e3b\u8981\u7684\u7c7b\uff0c\u7528\u4e8e\u521d\u59cb\u5316\u6587\u4ef6\u68c0\u67e5\u8fc7\u7a0b\u3002\r\n\r\n#### \u53c2\u6570\r\n\r\n- `file_path`\uff1a\u8981\u68c0\u67e5\u7684\u6587\u4ef6\u8def\u5f84\u3002\r\n- `image_mode`\uff1a\uff08\u53ef\u9009\uff09\u56fe\u7247\u68c0\u67e5\u6a21\u5f0f\uff0c\u9ed8\u8ba4\u4e3a`precise`\u3002\r\n\r\n#### \u65b9\u6cd5\r\n\r\n- `inspect()`\uff1a\u6267\u884c\u6587\u4ef6\u68c0\u67e5\uff0c\u5e76\u8fd4\u56de\u68c0\u67e5\u7ed3\u679c\u3002\r\n\r\n## \u8d21\u732e\r\n\r\n\u6b22\u8fce\u8d21\u732e\uff01\u5982\u679c\u4f60\u6709\u4efb\u4f55\u5efa\u8bae\u6216\u6539\u8fdb\uff0c\u8bf7\u63d0\u4ea4Pull Request\u6216\u521b\u5efaIssue\u3002\r\n\r\n## \u8bb8\u53ef\u8bc1\r\n\r\n`ErrorFile`\u6839\u636eApache-2.0\u8bb8\u53ef\u8bc1\u53d1\u5e03\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u67e5\u770bLICENSE\u6587\u4ef6\u3002\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This is a package for handling error files",
    "version": "0.0.1",
    "project_urls": {
        "Bug Reports": "https://github.com/Hellohistory/Errorfile/issues",
        "Homepage": "https://github.com/Hellohistory/Errorfile",
        "Source": "https://github.com/Hellohistory/Errorfile"
    },
    "split_keywords": [
        "error",
        "file"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6217c9ad4511017084c69272bf1c5c121f59ecee75de094c13ab6f7346faa6eb",
                "md5": "7656f1a2aa4efafde009ac79ca249322",
                "sha256": "85eafaf7c4c32dfb8aa3ebf3417420726778c3b5ad94d841af0eda12a62bd398"
            },
            "downloads": -1,
            "filename": "ErrorFile-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7656f1a2aa4efafde009ac79ca249322",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7346,
            "upload_time": "2024-02-29T10:33:47",
            "upload_time_iso_8601": "2024-02-29T10:33:47.478061Z",
            "url": "https://files.pythonhosted.org/packages/62/17/c9ad4511017084c69272bf1c5c121f59ecee75de094c13ab6f7346faa6eb/ErrorFile-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77aa4318b1c52aa0bf3b338df9a28a5460a916268ee4e88f483f46e9c02dbe6a",
                "md5": "b94594a1e893eb8ef81ad4cb4a4079e3",
                "sha256": "34ff7a8c58085dd5141cae87f07677229d5297341e1e6f9e028d665e96cad9f6"
            },
            "downloads": -1,
            "filename": "ErrorFile-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b94594a1e893eb8ef81ad4cb4a4079e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5221,
            "upload_time": "2024-02-29T10:33:48",
            "upload_time_iso_8601": "2024-02-29T10:33:48.862680Z",
            "url": "https://files.pythonhosted.org/packages/77/aa/4318b1c52aa0bf3b338df9a28a5460a916268ee4e88f483f46e9c02dbe6a/ErrorFile-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 10:33:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hellohistory",
    "github_project": "Errorfile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "errorfile"
}
        
Elapsed time: 0.50274s