taskwrite

package
v0.71.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 19 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 taskwrite creates and reads tracker tasks for a project: what f10 task create and task read do, for the command and the daemon alike.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, warn io.Writer, t *target.Target, n New) (ref.Ref, string, error)

Create sends the task to the driver's create, else makes it an issue on the host, and returns it with its url. It is never retried, since a failed write is an unknown outcome.

func DocTitle

func DocTitle(id, doc string) string

DocTitle is the title a task's markdown opens with, cleaned of its id.

func Document

func Document(ctx context.Context, t *target.Target, token string, withImages bool) (string, error)

Document is the task token names as f10 task read prints it: a bundle's members joined, and with images set the linked images saved locally, so an agent reads files in place of urls that expire. An empty token is the checkout's task.

func GithubAuth

func GithubAuth(ctx context.Context, t *target.Target) func(*http.Request)

GithubAuth sends the gh token only to GitHub's own hosts over https, where a private repo's attachments sit. It is read once; a failed read leaves the request bare, so its error names the image.

func LinkBodyAfter

func LinkBodyAfter(ctx context.Context, t *target.Target, doc string, warn io.Writer) string

LinkBodyAfter turns the body's `After: <id>` line into a link titled with the base task, when its title and url are known.

func LinkMentions added in v0.68.0

func LinkMentions(ctx context.Context, t *target.Target, body string, warn io.Writer) string

LinkMentions links the first bare mention of each task id in a markdown body that renders links, from the titles f10 already read.

func LinkWith added in v0.68.0

func LinkWith(
	ctx context.Context,
	t *target.Target,
	scan reflink.Scan,
	text string,
	warn io.Writer,
) (string, []reflink.Mention)

LinkWith scans once to find the bare ids and resolves them in one lookup. It scans again to link them, and names each linked id on warn. An id it cannot title stays bare.

func MdLink(id, title, url string) string

MdLink is reflink.MarkdownLink.

func Read

func Read(ctx context.Context, t *target.Target, r ref.Ref) (string, error)

Read is the task's text as f10 renders it, feeding the ledger's task refs so a later ref costs no tracker call.

func RefusedUpFront

func RefusedUpFront(t *target.Target) (tasksource.RefusedSource, bool)

RefusedUpFront is the source that creates nothing in t's project, which answers before anything is read, so capture falls back.

func WithImages

func WithImages(ctx context.Context, doc, dir string, d images.Downloader) string

WithImages ends doc with a footer naming its downloaded images. A dir that cannot be written fails every image, never the read.

Types

type New

type New struct {
	Doc    string
	Props  hostops.Props
	Parent string
}

A New is a task to create: its markdown, `# <title>` first, the properties to set, and the parent it is a subtask of.

Jump to

Keyboard shortcuts

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