跳到正文
DEV Community· Robin Beraud-Sudreau·· 5 小時前AI 評分42

別再手動計算物業提示電郵的每平方米價格

Stop doing price-per-m math by hand on property alert emails

AI 導讀

Hermes 技能 listing-alert-triage 可讀取物業提示電郵,估算城市並計算每平方米價格,再按用戶提供的城市參考價把樓盤分為 GEM、watch 或 pass。它以單一 Python 檔案及標準程式庫運作,毋須 API key 或網絡連線,亦可按面積和最高價格篩選,並輸出文字、JSON 或 CSV。抽取方式屬啟發式,測試只使用合成資料,結果應對照原始電郵核查。

正文

Robin Beraud-Sudreau

If you follow property alerts, you know the routine: ten emails, each with a price and a surface, and you divide in your head to see whether anything is actually cheap for the area. It is boring, error-prone, and the one good listing is usually buried.

I wrote a small Hermes skill, listing-alert-triage, that does this step for you. It is one Python file using only the standard library. No API key, no network.

It reads plain text, HTML or .eml exports, finds an amount followed by €/EUR and a number followed by m²/m2, guesses the city (Lyon 69003, 33000 Bordeaux, à Lille), and computes the price per m². You provide your own reference price per m² for each city, and it ranks listings as GEM, watch or pass. Anything absurdly cheap gets a ? because that is more often a typo or a scam than a bargain. You can also exclude by min/max surface or max price, and output text, JSON or CSV.

python3 scripts/triage.py alerts/*.eml \
  --ref Nantes=3900 --ref Rennes=3400 --max-price 400000
[watch   ] Nantes  168 000 EUR  48 m2  3 500 EUR/m2  ref 3900.0  ratio 0.90x

Honest limits: extraction is heuristic, so check the first run against the original email. It does not value anything, and it only knows euros and square metres. I tested it on synthetic fixtures only.

The skill is MIT licensed in the hermes-skills library.


Skill (MIT): https://github.com/RobinBeraud/hermes-skills/tree/main/automation/listing-alert-triage
All skills: https://github.com/RobinBeraud/hermes-skills

This post was written with AI assistance and reviewed through automated checks.

來源:DEV Community · dev.to