feat: new notes start with status new for tracking applications
This commit is contained in:
+1
-1
@@ -252,7 +252,7 @@ func TestRenderNote(t *testing.T) {
|
||||
}
|
||||
note := renderNote(pkg, "https://x.test/job", time.Date(2026, 11, 24, 10, 0, 0, 0, time.UTC))
|
||||
for _, want := range []string{
|
||||
"moc: \"[[00-Job Hunt]]\"\ncreated: 2026-11-24\ncompany: \"Acme\"\nrole: \"Backend Engineer\"\nfit: 82\nverdict: \"apply\"\nlocation: \"Utrecht\"\nposting: \"https://x.test/job\"\n---", "# Acme - Backend Engineer", "- [ ] Review and decide: **apply**, fit 82/100",
|
||||
"moc: \"[[00-Job Hunt]]\"\ncreated: 2026-11-24\ncompany: \"Acme\"\nrole: \"Backend Engineer\"\nfit: 82\nverdict: \"apply\"\nlocation: \"Utrecht\"\nposting: \"https://x.test/job\"\nstatus: \"new\"\n---", "# Acme - Backend Engineer", "- [ ] Review and decide: **apply**, fit 82/100",
|
||||
"- **Posting:** https://x.test/job", "## Strengths\n- Go at Ghaaf", "## Gaps\n- No Dutch",
|
||||
"## Cover letter draft\nDear hiring team,", "## Related\n- [[00-Job Hunt|Job Hunt]]\n- [[CV]]",
|
||||
} {
|
||||
|
||||
@@ -53,11 +53,12 @@ func yamlString(s string) string {
|
||||
|
||||
// renderNote writes the package as a vault note: frontmatter, plain title, a
|
||||
// Related section at the end. The properties after `created` are the columns
|
||||
// of the vault's "Job Hunt" base (the table of all postings).
|
||||
// of the vault's "Job Hunt" base (the table of all postings). `status` starts
|
||||
// as "new"; the user changes it by hand (applied, interview, ...).
|
||||
func renderNote(pkg *Package, url string, now time.Time) string {
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, "---\nmoc: \"[[00-Job Hunt]]\"\ncreated: %s\n", now.Format("2006-01-02"))
|
||||
fmt.Fprintf(&b, "company: %s\nrole: %s\nfit: %d\nverdict: %s\nlocation: %s\nposting: %s\n---\n\n",
|
||||
fmt.Fprintf(&b, "company: %s\nrole: %s\nfit: %d\nverdict: %s\nlocation: %s\nposting: %s\nstatus: \"new\"\n---\n\n",
|
||||
yamlString(pkg.Company), yamlString(pkg.Title), pkg.FitScore, yamlString(strings.ToLower(pkg.Verdict)),
|
||||
yamlString(pkg.Location), yamlString(url))
|
||||
fmt.Fprintf(&b, "# %s\n\n", noteName(pkg))
|
||||
|
||||
Reference in New Issue
Block a user