scaffold
This commit is contained in:
55
jobsource/main.py
Normal file
55
jobsource/main.py
Normal file
@@ -0,0 +1,55 @@
|
||||
"""CLI entry point: `python -m jobsource.main`.
|
||||
|
||||
Scaffold stub. Argument parsing is wired so `--help` works; the actual batch
|
||||
run lands in a later step (see jobsource/pipeline.py). Imports only stdlib so
|
||||
`--help` works before the heavier dependencies are installed.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
def build_parser() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="python -m jobsource.main",
|
||||
description=(
|
||||
"AI Job Source Agent -- emit company_name, career_page_url, "
|
||||
"open_position_url for recently posted LinkedIn jobs."
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--batch-size",
|
||||
type=int,
|
||||
default=None,
|
||||
help="Number of new jobs to process this run (default from config).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--search",
|
||||
action="append",
|
||||
metavar="TERM",
|
||||
help="Search term; repeatable. Overrides config search terms.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--location",
|
||||
default=None,
|
||||
help="Job location filter (default from config).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--hours-old",
|
||||
type=int,
|
||||
default=None,
|
||||
help="Only jobs posted within this many hours (default from config).",
|
||||
)
|
||||
return parser
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
args = build_parser().parse_args(argv)
|
||||
print("jobsource: scaffold stub -- pipeline not implemented yet.", file=sys.stderr)
|
||||
print(f"parsed args: {vars(args)}", file=sys.stderr)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user