feat: add remote jobs filter for JobSpy (#70)
* feat(types): add jobspyIsRemote to TypeScript type definitions - Add jobspyIsRemote boolean fields to AppSettings interface - Follow three-field pattern: value, default, override - Update test fixture with default values (false) * feat(validation): add jobspyIsRemote validation schema Add Zod validation schema for jobspyIsRemote boolean setting to ensure type safety in the settings API endpoint. * feat(db): add jobspyIsRemote to database repository setting keys * feat(api): add jobspyIsRemote storage to settings API route * feat(service): add jobspyIsRemote to settings service with environment variable support * feat(jobspy): add isRemote parameter to JobSpy service interface * feat(pipeline): pass isRemote setting to JobSpy service * feat(python): add is_remote parameter to JobSpy scraper script * feat(ui): add Remote Jobs checkbox to JobSpy settings * feat(ui): add Remote badge to job display - Display Remote badge when job.isRemote === true - Position badge next to Source badge in JobHeader - Use Badge component with outline variant - Badge does not display when isRemote is false or null * docs(env): add JOBSPY_IS_REMOTE environment variable documentation - Added JobSpy section to .env.example with JOBSPY_IS_REMOTE variable - Documents remote-only job filtering option with default value of 0 (disabled) - Follows existing .env.example format with clear section headers and descriptions * test(remote-jobs): verify end-to-end functionality with comprehensive feedback loops
This commit is contained in:
@@ -39,9 +39,12 @@ def main() -> int:
|
||||
hours_old = _env_int("JOBSPY_HOURS_OLD", 72)
|
||||
country_indeed = _env_str("JOBSPY_COUNTRY_INDEED", "UK")
|
||||
linkedin_fetch_description = _env_bool("JOBSPY_LINKEDIN_FETCH_DESCRIPTION", True)
|
||||
is_remote = _env_bool("JOBSPY_IS_REMOTE", False)
|
||||
|
||||
output_csv = Path(_env_str("JOBSPY_OUTPUT_CSV", "jobs.csv"))
|
||||
output_json = Path(_env_str("JOBSPY_OUTPUT_JSON", str(output_csv.with_suffix(".json"))))
|
||||
output_json = Path(
|
||||
_env_str("JOBSPY_OUTPUT_JSON", str(output_csv.with_suffix(".json")))
|
||||
)
|
||||
|
||||
output_csv.parent.mkdir(parents=True, exist_ok=True)
|
||||
output_json.parent.mkdir(parents=True, exist_ok=True)
|
||||
@@ -55,6 +58,7 @@ def main() -> int:
|
||||
hours_old=hours_old,
|
||||
country_indeed=country_indeed,
|
||||
linkedin_fetch_description=linkedin_fetch_description,
|
||||
is_remote=is_remote,
|
||||
)
|
||||
|
||||
print(f"Found {len(jobs)} jobs")
|
||||
@@ -75,4 +79,3 @@ def main() -> int:
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user