No project description provided
Project description
py-filesearcher
py-filesearcher是一个Python库,用于实现各类文件中特定字符的识别。
特点
支持文档类型包括
- 文本文件: .py, .c, .txt, .md
- OFFICE文件: .docx, .xls, .xlsx
- 压缩文件: .zip
安装
你可以使用 pip 安装 py-filesearcher:
pip install py-filesearcher
使用
import pathlib
from py_filesearcher.indexer import Indexer
indexer = Indexer(
search_dir=pathlib.Path("") / "data",
index_dir=pathlib.Path("index")
)
match_contents = indexer.query_reg("world")
for m in match_contents:
print(f"文件名: [{m.filename}], 匹配内容: [{[x.decode('utf8') for x in m.match_text]}]")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_filesearcher-0.2.0.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_filesearcher-0.2.0.tar.gz.
File metadata
- Download URL: py_filesearcher-0.2.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.8 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c48b536e305a28581074d70c03439e20b1b56afa60aede4fdb0ff1f8f2f77655
|
|
| MD5 |
2d42eb1864dfdf39aeb8348c01f3b270
|
|
| BLAKE2b-256 |
e8ac7fd4a9790625bb7a32f29c3e15652151f8aa2265142d5e5955caeae8e7c1
|
File details
Details for the file py_filesearcher-0.2.0-py3-none-any.whl.
File metadata
- Download URL: py_filesearcher-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.8 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbe1dd0425a42a86c19220be10e15e3b90387d44f37f64cce93b7abd5d910bbe
|
|
| MD5 |
2f78bc476aeebdaf668601fe8bf767a4
|
|
| BLAKE2b-256 |
e56bacb462c461ce7315627214ccbafe7bef029ca2e2bbac4f4d47293c2e3c9b
|