配置文件参考
本页列出 Sweepy 配置文件支持的全部设置。编辑配置文件时请保持打开。需要分步引导时,参见设置 Sweepy。
配置文件的位置
Sweepy 从 Sweepy 目录内的 profiles/ 文件夹读取配置文件。每个配置文件使用 YAML,这是一种以缩进和冒号组织数据的纯文本格式。可用记事本、VS Code 或你已有的任意文本编辑器打开。
从 config.sample.yaml 或 profiles/paralegal_nyc.yaml 等预设开始。复制模板、重命名并编辑取值:
copy config.sample.yaml profiles\my_search.yaml
notepad profiles\my_search.yaml
然后让扫描使用该文件:
sweepy --profile profiles/my_search.yaml
配置文件保存你的全部配置。你可以创建任意数量的配置文件:每个城市或职位类别一个。Sweepy 把扫描状态保存在配置文件之外,即发现缓存、历史数据库以及 logs/ 和 results/ 文件夹。
只用空格缩进,绝不用制表符。YAML 不接受制表符,一个多余的制表符就会让整个配置文件无法读取。
完整配置示例
下例是 Alex 的完整配置文件。以 # 开头的行是注释,Sweepy 会忽略:
# ─────────────────────────────────────────────────
# Sweepy — Alex's Paralegal Profile (New York City)
# ─────────────────────────────────────────────────
# Your name. It appears in the PDF report header.
name: "Alex Rivera"
# Set true to write rotating debug logs under logs/.
debug: false
# ─── Job search ───────────────────────────────────
search:
# Every title Sweepy searches at the same time.
titles:
- "Paralegal"
- "Legal Assistant"
- "Litigation Support Specialist"
- "Legal Secretary"
# Your target market.
location: "New York, NY"
# true keeps remote roles only. false keeps remote, hybrid, and on-site roles.
remote_only: false
# false removes hybrid roles from every report.
include_hybrid: true
# Annual salary floor. Use 0 to skip salary filtering.
min_salary: 65000
# true reads pay from the posting text when a board omits structured pay.
salary_from_description: true
# ─── Resume ───────────────────────────────────────
resume:
# Path to a PDF or DOCX resume. Forward slashes work on Windows.
path: "Alex_Rivera_Resume.pdf"
# Terms that carry the most weight when Sweepy scores a posting.
must_have_skills:
- "Westlaw"
- "LexisNexis"
- "e-discovery"
- "Contract Review"
- "Legal Research"
# 1.0 is standard. Raise it to reward exact skill matches.
keywords_weight: 1.5
# Interchangeable terms. Sweepy matches every member of a group either way.
synonyms:
- ["e-discovery", "ediscovery", "electronic discovery"]
- ["legal research", "case law research"]
- ["docketing", "case calendaring"]
- ["legal assistant", "legal secretary"]
- ["contract review", "contract analysis", "agreement review"]
# Optional: one resume per role family. Sweepy picks the best fit for each posting.
tracks:
- name: "Paralegal Resume"
path: "C:/Users/Alex/Documents/Alex_Rivera_Paralegal.pdf"
color: "#1D4ED8"
route_keywords: ["paralegal", "litigation", "e-discovery"]
- name: "Legal Assistant Resume"
path: "C:/Users/Alex/Documents/Alex_Rivera_Legal_Assistant.pdf"
color: "#7E22CE"
route_keywords: ["legal assistant", "legal secretary", "scheduling"]
# ─── Platforms ────────────────────────────────────
platforms:
greenhouse: true
ashby: true
lever: true
workable: true
aggregators: false
# Extra ATS domains. Sweepy labels matching postings with this name.
custom:
- name: "SmartRecruiters"
domain: "smartrecruiters.com"
enabled: true
- name: "Breezy HR"
domain: "breezy.hr"
enabled: true
# ─── Sources ──────────────────────────────────────
sources:
jobspy:
linkedin: true
indeed: true
glassdoor: true
zip_recruiter: true
# Leave a list empty to fall back to the seed lists in data/sources/.
ashby:
orgs:
- "crosby"
- "normlaw"
- "hargrove-firm"
- "lawhive"
workable:
slugs:
- "shegerianand-associates-1"
- "harper-james"
- "legalvision"
builtinnyc:
enabled: true
categories:
- "jobs/legal"
- "jobs/legal/search/paralegal"
# ─── Cache and history ────────────────────────────
cache:
enabled: true
ttl_seconds: 3600 # reuse discovery results for an hour
history:
enabled: true
retention_days: 4 # hide a reported posting for four days
match: "url+role" # "url" matches only an identical posting address
path: null # null uses ~/.sweepy/history.db
orchestrator:
timeout_per_source_seconds: 180
circuit_breaker:
failure_threshold: 5
cooldown_seconds: 30
# ─── Report layout ────────────────────────────────
report:
style: "cards" # "cards" (default) or "legacy"
cards_per_page: 6 # cards on each PDF page
max_cards: 24 # 0 or less shows every match
destinations: [] # extra folders for a copy of the PDF
assessment: "agent" # "keyword" accepts reports without agent judgments
# ─── Exports ──────────────────────────────────────
export:
format: "pdf,csv,json" # add "png" for page images
output_dir: "results"
tracking: true # job-tracking columns in the CSV
description_chars: 1000 # posting excerpt length in the CSV and JSON
全部设置
你遗漏的任何设置,Sweepy 都回退到下列默认值。要返回有用的匹配结果,Sweepy 仍需要 search.titles、search.location 和 resume.path。
| 区段 | 键 | 必需 | 默认值 | 说明 |
|---|---|---|---|---|
| 顶层 | name | 否 | "Job Seeker" | 你的姓名。显示在 PDF 报告页眉中。 |
| 顶层 | debug | 否 | false | 设为 true 可在 logs/ 中写入轮转调试日志。 |
search | titles | 是 | [] | 你的目标职位名称。Sweepy 同时搜索所有名称。 |
search | location | 是 | "" | 你的目标市场,写作 "City, State"。 |
search | remote_only | 否 | false | 设为 true 时只保留远程职位。 |
search | include_hybrid | 否 | true | 设为 false 时剔除混合办公职位。 |
search | min_salary | 否 | 0 | 年薪下限。0 表示不筛选。 |
search | salary_from_description | 否 | true | 招聘网站未发布结构化薪资时,从职位文本读取薪资区间。设为 false 时只用结构化字段。 |
resume | path | 是 | "" | 简历 PDF 或 Word(DOCX)文件的路径。 |
resume | must_have_skills | 否 | [] | 获得最高评分权重的词条。 |
resume | keywords_weight | 否 | 1.0 | 技能匹配的乘数。取值越高越强调重合度。 |
resume | synonyms | 否 | [] | 可互换词条的分组。参见简历同义词。 |
resume | tracks | 否 | [] | 每个职位类别一份简历。参见简历轨道。 |
resume.tracks[] | name | 是 | n/a | 显示在报告卡片和轨道徽标上的标签。 |
resume.tracks[] | path | 是 | n/a | 该轨道简历 PDF 或 DOCX 文件的路径。 |
resume.tracks[] | color | 否 | #1D4ED8 | 徽标颜色,可用十六进制代码或 navy 之类的颜色名称。 |
resume.tracks[] | route_keywords | 否 | [] | 把职位分配到该轨道的关键词。 |
platforms | greenhouse | 否 | true | 运行 Greenhouse 搜索。 |
platforms | ashby | 否 | true | 运行 Ashby 搜索。 |
platforms | lever | 否 | true | 运行 Lever 搜索。 |
platforms | workable | 否 | true | 运行 Workable 搜索。 |
platforms | aggregators | 否 | false | 运行 Remotive 和 Adzuna 等免费聚合职位源。 |
platforms | custom | 否 | [] | 额外的申请人跟踪系统(ATS)域名。每个条目包含 name、domain 和 enabled。 |
sources | jobspy.linkedin | 否 | true | 通过 python-jobspy 查询 LinkedIn。 |
sources | jobspy.indeed | 否 | true | 通过 python-jobspy 查询 Indeed。 |
sources | jobspy.glassdoor | 否 | true | 通过 python-jobspy 查询 Glassdoor。 |
sources | jobspy.zip_recruiter | 否 | true | 通过 python-jobspy 查询 ZipRecruiter。 |
sources | greenhouse.enabled | 否 | true | 开启或关闭 Greenhouse 源。 |
sources | greenhouse.boards | 否 | [] | Greenhouse 招聘网站标识。留空时回退到 data/sources/greenhouse_boards.txt。 |
sources | ashby.enabled | 否 | true | 开启或关闭 Ashby 源。 |
sources | ashby.orgs | 否 | [] | Ashby 组织标识。留空时回退到 data/sources/ashby_orgs.txt。 |
sources | lever.enabled | 否 | true | 开启或关闭 Lever 源。 |
sources | lever.companies | 否 | [] | Lever 公司标识。留空时回退到 data/sources/lever_companies.txt。 |
sources | workable.enabled | 否 | true | 开启或关闭 Workable 源。 |
sources | workable.slugs | 否 | [] | Workable 账户标识。留空时回退到 data/sources/workable_slugs.txt。 |
sources | builtinnyc.enabled | 否 | true | 开启或关闭 Built In NYC 源。 |
sources | builtinnyc.categories | 否 | [] | Built In NYC 分类路径,例如 jobs/legal。留空时回退到 data/sources/builtin_categories.txt。 |
sources | builtinnyc.detail_pages | 否 | false | 从详情页读取每个职位的全文。Built In 在若干次请求后会拦截这些页面,因此 Sweepy 逐页抓取,遇到第一次拦截即停止。列表页仍提供公司、地点和薪资。 |
sources | enabled | 否 | ["jobspy", "ats"] | 要运行的引擎。安装 hirehunt、openroles、jobdrop 或 apify 后逐个添加。参见职位源与平台。 |
sources | jobspy.sites | 否 | ["linkedin", "indeed", "glassdoor", "zip_recruiter"] | 以列表形式给出的 JobSpy 招聘网站。优先级高于 jobspy.linkedin 这类布尔开关。 |
sources | jobspy.fetch_descriptions | 否 | true | 抓取职位全文用于评分。设为 false 可加快扫描,但分数质量下降。 |
sources | jobspy.proxies | 否 | [] | 代理目标,写作 user:pass@host:port。代理凭据只保存在你的机器上。 |
sources | jobspy.user_agent | 否 | null | JobSpy 请求使用的 user agent。省略时使用内置的 Chrome 值。 |
cache | enabled | 否 | true | 在多次扫描之间复用发现结果。 |
cache | ttl_seconds | 否 | 3600 | Sweepy 复用缓存结果的秒数。 |
cache | path | 否 | null | 缓存数据库位置。null 使用 ~/.sweepy/cache.db,环境变量 SWEEPY_CACHE_PATH 可覆盖两者。 |
history | enabled | 否 | true | 隐藏此前扫描已报告的职位。 |
history | retention_days | 否 | 4 | Sweepy 隐藏已报告职位、使其可再次出现前的天数。 |
history | match | 否 | "url+role" | url 仅匹配完全相同的职位地址。url+role 还会匹配其他网站上的相同职位名称、公司和地点。 |
history | path | 否 | null | 历史数据库位置。null 使用 ~/.sweepy/history.db,环境变量 SWEEPY_HISTORY_PATH 可覆盖两者。 |
orchestrator | timeout_per_source_seconds | 否 | 180 | 单个来源在被 Sweepy 停止前可运行的秒数。 |
orchestrator | circuit_breaker.failure_threshold | 否 | 5 | 连续失败多少次后 Sweepy 跳过该来源。 |
orchestrator | circuit_breaker.cooldown_seconds | 否 | 30 | Sweepy 重试被跳过来源前等待的秒数。 |
report | style | 否 | "cards" | 报告版式:cards 或 legacy。 |
report | cards_per_page | 否 | 6 | 每页 PDF 放置的卡片数。 |
report | max_cards | 否 | 24 | 卡片数量上限。0 或更少表示显示全部匹配。 |
report | destinations | 否 | [] | 额外接收 PDF 和 PNG 文件副本的文件夹。 |
report | assessment | 否 | "agent" | agent 在任何卡片仅有关键词重合度时阻止生成报告。keyword 允许在没有代理评估的情况下生成报告。 |
export | format | 否 | "pdf,csv" | pdf、csv、json 和 png 的任意组合,以逗号分隔。 |
export | output_dir | 否 | "results" | 报告文件所在文件夹。缺失时 Sweepy 会创建。 |
export | tracking | 否 | true | 在 CSV 中加入求职跟踪列:date_applied、status、interview_stage、offer_amount、offer_date、follow_up_date、contact 和 notes。同一配置文件的后续扫描会沿用你填写的值。设为 false 则只保留原始数据。 |
export | description_chars | 否 | 1000 | CSV 和 JSON 中保存的职位文本字符数。Sweepy 在句子边界处截断。0 表示保存完整职位。 |
简历轨道
轨道是一份带名称的简历。当你瞄准两类不同职位并希望每个职位都用对应简历评分时,请使用轨道。
resume:
tracks:
- name: "Paralegal Resume"
path: "C:/Users/Alex/Documents/Alex_Rivera_Paralegal.pdf"
color: "#1D4ED8"
route_keywords: ["paralegal", "litigation", "e-discovery"]
- name: "Legal Assistant Resume"
path: "C:/Users/Alex/Documents/Alex_Rivera_Legal_Assistant.pdf"
color: "#7E22CE"
route_keywords: ["legal assistant", "legal secretary", "scheduling"]
每个条目包含四个字段:
name为轨道命名。报告卡片会显示该标签,因此请用一两个词。path指向该轨道的简历 PDF 或 DOCX 文件。color设置徽标颜色。可使用#1D4ED8之类的十六进制代码,或navy之类的颜色名称。route_keywords决定 Sweepy 把哪些职位分配给该轨道。
Sweepy 按关键词重合度为每个职位分配轨道。它统计职位标题和描述与各轨道 route_keywords 之间的整词匹配数。Sweepy 把职位分配给匹配数最高的轨道。两条轨道并列时,使用你列表中的第一条。
route_keywords 只负责把职位送到某份简历,从不改变匹配度。请添加每类职位在招聘信息中实际使用的短语。
省略 tracks 时,Sweepy 把 resume.path 作为一条隐式轨道。
简历同义词
resume.synonyms 保存含义相同的词组。Sweepy 把组内每个词视为等价。匹配便可双向生效。更全面的格式检查清单参见添加行业专用词条。
resume:
synonyms:
- ["e-discovery", "ediscovery", "electronic discovery"]
- ["legal research", "case law research"]
- ["docketing", "case calendaring"]
- ["legal assistant", "legal secretary"]
- ["contract review", "contract analysis", "agreement review"]
一组至少需要两个词条,否则 Sweepy 会忽略。匹配不区分大小写,并能处理规则的单复数形式。引擎仍按完整短语匹配,因此若希望 legal research 和 legal researcher 都计入,请将它们列为独立词条。
Alex 在简历中写 e-discovery。写 electronic discovery 的职位现在也能匹配,因为两个词条属于同一组。
同一处漏配出现两次时,就新增一组。把职位的原样措辞与你自己的词条放入同一组。
常见格式错误
多数无法读取的配置文件都源于两个常见错误。
Windows 路径需使用正斜杠或双反斜杠。 YAML 把单个反斜杠视为转义字符。C:\Users\Alex 这样的路径会使文件报错。
resume:
path: "C:/Users/Alex/Documents/Alex_Rivera_Resume.pdf" # ✅ works
# path: "C:\\Users\\Alex\\Documents\\Alex_Rivera_Resume.pdf" # ✅ also works
# path: "C:\Users\Alex\Documents\Alex_Rivera_Resume.pdf" # ❌ breaks YAML
路径中一个多余的反斜杠就会让 Sweepy 无法读取配置文件。设置向导会替你写成正斜杠,手动编辑时请沿用这种写法。
注释以 # 开头。 Sweepy 忽略该行 # 之后的所有内容。可用注释说明某个取值的用途,示例配置文件即如此。
缩进决定结构。 每层缩进两个空格。文件中出现一个制表符就会破坏 YAML。