pi-parse-china-standard
Pi extension for downloading Chinese national standards and parsing them with MinerU
Package details
Install pi-parse-china-standard from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-parse-china-standard- Package
pi-parse-china-standard- Version
0.1.0- Published
- Jul 15, 2026
- Downloads
- 137/mo · 137/wk
- Author
- lechangbin
- License
- UNLICENSED
- Types
- extension, skill
- Size
- 54.4 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-parse-china-standard
Pi extension that downloads an official Chinese national-standard PDF from the SAMR open-standard site, parses it with MinerU, and returns the generated Markdown path to the agent.
Install
pi install npm:pi-parse-china-standard@0.1.0
The package includes @playwright/cli. Python 3 must be available as python on Windows or python3 on other platforms.
Configure MinerU
Copy config/mineru.example.json to either:
<workspace>/.pi/china-standard/mineru.json- another path selected by
MINERU_CONFIG
Keep credentials in an environment variable:
{
"mode": "cloud",
"submit_endpoint": "https://mineru.net/api/v4/file-urls/batch",
"result_endpoint_template": "https://mineru.net/api/v4/extract-results/batch/{batch_id}",
"token": "env:MINERU_TOKEN",
"request_timeout_seconds": 60,
"parse_timeout_seconds": 1800,
"poll_interval_seconds": 5
}
Tool
The package registers china_standard_parse with one argument:
{
"standard_number": "GB/T 35697-2026"
}
The agent receives only the absolute path to full.md. The original PDF, Markdown, JSON, DOCX, HTML, LaTeX, images, MinerU ZIP, and cache manifest remain together under:
<workspace>/china-standard-output/<normalized-standard-number>/
Local cache
The workflow is lazy and local-only:
- Reuse
source.pdfonly when its PDF signature, standard number, and SHA-256 matchcache-manifest.json. - Reuse parsed files only when the source SHA-256, parsing-profile SHA-256, and every recorded output file match the manifest.
- If only parsing is stale or incomplete, reuse
source.pdfand call MinerU again. - If the PDF cache is invalid, download a verified replacement before changing the cached source.
Database-backed caching is intentionally deferred to docs/future-plan.md.