开始使用
Markdown Price Floor Checker — Find Low Prices

Markdown Price Floor Checker — Find Low Prices

Scan Markdown for explicit prices, compare them with your chosen floor, and get line-level findings for below-minimum or mixed-currency amounts. #工程

评分
需要更多评价
订单数
0
如何使用
下载

Markdown Price Floor Checker

Find explicit monetary amounts in Markdown and compare each one with a floor you choose. Reports include line number, currency, amount, and a short source excerpt. Missing prices and mixed currencies are marked for review instead of passing silently. Python 3.10+, standard library only.

Six independent jobs

  • Set minimum (--floor 20): choose a numeric lower bound
  • Choose currency (--currency USD): compare only amounts in the selected currency
  • Batch scan (multiple paths): check several Markdown documents in one run
  • Currency notation ($, US$, €, £, ¥, suffix codes): detect common prefixed and suffixed amounts
  • Plain labeled amount (--include-plain-numbers): include values such as price: 20
  • Machine report (--json): produce JSON findings and warnings

Example

python3 scripts/markdown_price_floor_checker.py --floor 20 --currency USD examples/pricing.md

Actual output:

FAIL: pricing.md | floor USD 20
  line 3: USD 19 [BELOW] - Starter: $19
  line 4: USD 29.50 [MEETS] - Team: US$29.50
  line 5: USD 120 [MEETS] - Annual: $120

The command returns 0 when all detected prices meet the floor, 1 when a price is below the floor or the scan needs review, and 2 for invalid input or unreadable files.

Limits

This is a pattern-based checker, not a full Markdown or financial parser. It does not convert currencies, infer exchange rates, or guarantee that every price expression is detected. A missing price yields REVIEW and a nonzero status. Inspect the line excerpts before changing publication material.

Tests

python3 -m unittest discover -s tests -v

For spreadsheet or pipeline use, add --csv; the report includes path, line, currency, amount, floor, status, and excerpt. --json and --csv are separate output modes.