Documentation
¶
Index ¶
- func IsURL(input string) bool
- func ValidateFilename(name string) error
- type CVResult
- type FetchResult
- type FetchType
- type Fetcher
- func (f *Fetcher) ExtractJobPosting(html string, parsedURL *url.URL) (content, company, position string)
- func (f *Fetcher) Fetch(rawURL string, outputName string) (*FetchResult, error)
- func (f *Fetcher) FetchCV(input string) (*CVResult, error)
- func (f *Fetcher) FormatOutput(content, sourceURL, company, position string) string
- func (f *Fetcher) GenerateFilename(company, position string, parsedURL *url.URL) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFilename ¶
ValidateFilename checks if a generated filename is acceptable Returns an error if the filename looks like an ID or is otherwise unsuitable
Types ¶
type CVResult ¶
type CVResult struct {
URL string `json:"url"`
OutputPath string `json:"output_path"`
Name string `json:"name,omitempty"`
Label string `json:"label,omitempty"`
Size int `json:"content_size"`
}
CVResult contains the result of a CV fetch operation
type FetchResult ¶
type FetchResult struct {
URL string `json:"url"`
OutputPath string `json:"output_path"`
Company string `json:"company"`
Position string `json:"position"`
ContentSize int `json:"content_size"`
}
FetchResult contains the result of a fetch operation
type FetchType ¶
type FetchType int
FetchType indicates what kind of content to fetch
func DetectFetchType ¶
DetectFetchType determines whether the input should be fetched as a CV or job posting. Rules: - Bare domain (no path after domain) → CV fetch - Explicit /cv.json path → CV fetch - Everything else → Job posting fetch
type Fetcher ¶
Fetcher handles fetching and saving job postings from URLs
func NewFetcher ¶
NewFetcher creates a new Fetcher instance
func (*Fetcher) ExtractJobPosting ¶
func (f *Fetcher) ExtractJobPosting(html string, parsedURL *url.URL) (content, company, position string)
ExtractJobPosting extracts job posting content from HTML based on the job board
func (*Fetcher) Fetch ¶
func (f *Fetcher) Fetch(rawURL string, outputName string) (*FetchResult, error)
Fetch downloads a job posting from a URL and saves it to the output directory
func (*Fetcher) FetchCV ¶
FetchCV downloads a CV (JSON Resume) from a domain and saves it to local/cv.json The input can be: - A bare domain: "cello.design" → fetches https://cello.design/cv.json - A full URL: "https://example.com/cv.json" → fetches as-is
func (*Fetcher) FormatOutput ¶
FormatOutput creates the final markdown output with metadata