tasktitle

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tasktitle is tracker.title: the template a task's title is written through on the tracker, and the strip that takes a leading id back off so f10's own output never shows it twice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean added in v0.58.0

func Clean(title, id string) string

Clean is title without a heading mark or a leading copy of id, whatever the template, so `# FT-12: Add it` from a driver and `Add it` from a host store alike in the ledger.

Types

type Template

type Template string

Template is a declared tracker.title; the zero value changes nothing.

func Parse

func Parse(raw string) (Template, error)

Parse refuses a template without exactly one {title} and a placeholder other than {id}, {n} and {title}.

func (Template) Applied

func (t Template) Applied(title, id, n string) bool

Applied reports whether title is already written through the template, whatever its shape, so a retitle leaves it alone.

func (Template) Render

func (t Template) Render(id, n, title string) string

Render is title written through the template for the task id and its number n. A title holding a placeholder's text is not substituted again.

func (Template) Strip

func (t Template) Strip(title, id, n string) string

Strip takes a leading id and the punctuation after it off title, only when the template opens with {id}, {n} or #{n}: an id inside a title is never a prefix f10 wrote. A title that is the id alone stays whole.

Jump to

Keyboard shortcuts

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