fiscal-hub

Chinese fiscal, tax and accounting policy/rule document library. Data is fetched from official government websites, converted to Markdown and versioned with git.

中文说明

Layout

  • registry.json — registry of libraries in this repo
  • tax/ — 税务法规库 (State Taxation Administration policy library)
    • metadata/ — metadata.jsonl / metadata.csv (canonical, 20 fields)
    • laws/<category>/ — one Markdown file per document + per-category index
    • assets/ — images extracted from documents
    • INDEX.md — human-readable index
  • cas/ — 企业会计准则库 (China Accounting Standards Committee)
    • same layout as tax/ (10-field schema; the site exposes no more)
  • scripts/ — production tools (crawler, doc2md, build_index)
  • raw/ — raw crawler output (gitignored, never committed)

Pipeline

# run from the repo root
python -m scripts.crawler --source tax --output raw/tax          # full crawl
python -m scripts.crawler --source tax --sync --output raw/tax   # incremental
python -m scripts.doc2md --raw raw/tax --lib tax                 # doc -> md
python -m scripts.build_index --lib tax                          # rebuild indexes

python -m scripts.crawler --source cas --output raw/cas          # full crawl
python -m scripts.crawler --source cas --sync --output raw/cas   # incremental
python -m scripts.doc2md --raw raw/cas --lib cas                 # html -> md
python -m scripts.build_index --lib cas                          # rebuild indexes

Per-source differences (list fetching, metadata schema, body extraction) live in scripts/crawler/sources/ adapters; the pipeline itself is shared.

Note: the cas list pages expose only titles, so --sync detects added / removed / renamed documents but not body revisions under an unchanged title; re-run with --resync-all periodically to re-pull and re-verify every body.

Data source & disclaimer

All content is republished from official government websites (see registry.json for sources) for reference only. The official websites prevail in case of any discrepancy.

S
Description
No description provided
Readme
18 MiB
Languages
Python 100%