项目
关于
pfp - Python Format Parser - a python-based 010 Editor template interpreter
编程语言与运行时实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文pfp
pfp is a python-based interpreter for 010 template scripts.
See the main documentation on Read the Docs
Contributing
See CONTRIBUTING.md
Installation
Install pfp with
pip install --upgrade pfp
Tl;DR
CLI
pfp -t path/to/template input_file
All available options for the pfp CLI:
usage: pfp [-h] -t TEMPLATE [--show-offsets] [-k] input
Run pfp on input data using a specified 010 Editor template for parsing
positional arguments:
input The input data stream or file to parse. Use '-' for
piped data
optional arguments:
-h, --help show this help message and exit
-t TEMPLATE, --template TEMPLATE
The template to parse with
--show-offsets Show offsets in the parsed data of parsed fields
-k, --keep Keep successfully parsed data on error
Python Library
This should get you started parsing something using 010 templates:
import pfp
dom = pfp.parse(
data_file="~/Desktop/image.png",
template_file="~/Desktop/PNGTemplate.bt"
)
探索相关项目
加载中…