sources

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package sources imports jobs from configured public job sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSeed

func DefaultSeed() []source.Source

DefaultSeed returns the curated set of public job boards JobForge ships with. Every entry uses an officially-documented public API endpoint — no scraping, no auth, no ToS exposure. Users can add their own with `jobforge sources add`, or extend this list and rebuild.

The list is intentionally short. Better to ship 20 high-signal boards the user actually wants than 200 dead slugs. Each URL is constructed from the official ATS pattern:

Greenhouse: https://boards-api.greenhouse.io/v1/boards/<slug>/jobs
Lever:      https://api.lever.co/v0/postings/<slug>?mode=json
Ashby:      https://api.ashbyhq.com/posting-api/job-board/<slug>

If a slug 404s at import time, the user sees a clear error and can drop the source with `/sources rm`.

func ScrapeSourcesFromProfile added in v0.7.0

func ScrapeSourcesFromProfile(p profile.Profile) []source.Source

ScrapeSourcesFromProfile builds LinkedIn, Indeed, and Glassdoor search sources from the user's profile (roles, location, remote preference). Job URLs are discovered when the user runs jobs import/sync — no manual per-job URL entry required.

Types

type Client

type Client struct {
	HTTPClient *http.Client
	Scraper    scraper.Config // zero = env + auto engine at import time
}

Client fetches and parses public job listings.

func NewClient

func NewClient() Client

NewClient returns a client with a polite timeout.

func (Client) Import

func (c Client) Import(ctx context.Context, src source.Source) (ImportResult, error)

Import fetches listings from src and returns normalized jobs. It never persists jobs; callers own dedupe and storage.

type ImportResult

type ImportResult struct {
	Discovered int
	Jobs       []job.Job
}

ImportResult summarizes one source import.

Directories

Path Synopsis
Package scraper drives headless Chrome (via chromedp) to pull job listings from sites that don't expose an official API.
Package scraper drives headless Chrome (via chromedp) to pull job listings from sites that don't expose an official API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL