archive

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package archive provides terminal output functions for the archive command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DryRun

func DryRun(
	cmd *cobra.Command,
	archivableCount, pendingCount int, preview, separator string,
)

DryRun prints the dry-run preview for task archiving.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • archivableCount: number of tasks that would be archived.
  • pendingCount: number of pending tasks remaining.
  • preview: the archived content preview string.
  • separator: the separator string for framing the preview.

func NoCompleted

func NoCompleted(cmd *cobra.Command)

NoCompleted prints a message when there are no completed tasks to archive.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func SkipIncomplete

func SkipIncomplete(cmd *cobra.Command, skippedCount int)

SkipIncomplete prints a summary when no tasks could be archived due to incomplete children.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • skippedCount: number of skipped task blocks.

func Skipping

func Skipping(cmd *cobra.Command, taskText string)

Skipping prints a notice that a task block was skipped due to incomplete children.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • taskText: the parent task description.

func SnapshotContent

func SnapshotContent(name, created, separator, nl, body string) string

SnapshotContent builds the snapshot file content with header and body.

Parameters:

  • name: snapshot name.
  • created: RFC3339 formatted creation timestamp.
  • separator: the separator string.
  • nl: newline string.
  • body: the original TASKS.md content.

Returns:

  • string: formatted snapshot content.

func SnapshotSaved

func SnapshotSaved(cmd *cobra.Command, snapshotPath string)

SnapshotSaved prints the result of a successful task snapshot.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • snapshotPath: path to the created snapshot file.

func Success

func Success(
	cmd *cobra.Command,
	archivedCount int, archiveFilePath string, pendingCount int,
)

Success prints the result of a successful task archive operation.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • archivedCount: number of tasks archived.
  • archiveFilePath: path to the created archive file.
  • pendingCount: the number of pending tasks remaining.

Types

This section is empty.

Jump to

Keyboard shortcuts

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