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: 1 Imported by: 0

Documentation

Overview

Package archive defines constants for task archival, backups, and snapshot formatting.

Index

Constants

View Source
const (
	// ArchiveScopeTasks is the scope identifier for task archives.
	ArchiveScopeTasks = "tasks"
	// DefaultSnapshotName is the default name when no snapshot name is provided.
	DefaultSnapshotName = "snapshot"
	// SnapshotFilenameFormat is the filename template for task snapshots.
	// Args: name, formatted timestamp.
	SnapshotFilenameFormat = "tasks-%s-%s" + file.ExtMarkdown
	// SnapshotTimeFormat is the compact timestamp layout for snapshot filenames.
	SnapshotTimeFormat = "2006-01-02-1504"
)

Task archive/snapshot constants.

View Source
const (
	// BackupDefaultSubdir is the default subdirectory on the SMB share.
	BackupDefaultSubdir = "ctx-sessions"
	// BackupMarkerFile is the state file touched on a successful project backup.
	BackupMarkerFile = "ctx-last-backup"
	// BackupScopeProject backs up only the project context.
	BackupScopeProject = "project"
	// BackupScopeGlobal backs up only global Claude data.
	BackupScopeGlobal = "global"
	// BackupScopeAll backs up both project and global.
	BackupScopeAll = "all"
	// BackupTplProjectArchive is the filename template for project archives.
	// Argument: timestamp.
	BackupTplProjectArchive = "ctx-backup-%s.tar.gz"
	// BackupTplGlobalArchive is the filename template for global archives.
	// Argument: timestamp.
	BackupTplGlobalArchive = "claude-global-backup-%s.tar.gz"
	// BackupTimestampFormat is the compact timestamp layout for backup filenames.
	BackupTimestampFormat = "20060102-150405"
	// BackupExcludeTodos is the directory name excluded from global backups.
	BackupExcludeTodos = "todos"
	// BackupMarkerDir is the XDG state directory for the backup marker.
	BackupMarkerDir = ".local/state"
	// BackupMaxAgeDays is the threshold in days before a backup is considered stale.
	BackupMaxAgeDays = 2
	// BackupThrottleID is the state file name for daily throttle of backup age checks.
	BackupThrottleID = "backup-reminded"
	// Bashrc is the user's bash configuration file.
	Bashrc = ".bashrc"
)

Backup configuration.

View Source
const (
	// TplArchiveFilename is the format for dated archive filenames.
	// Args: prefix, date.
	TplArchiveFilename = "%s-%s" + file.ExtMarkdown
	// ArchiveDateSep is the separator between heading and date in archive headers.
	ArchiveDateSep = " - "
)
View Source
const (
	// SubTaskMinIndent is the minimum indent length (in spaces) for a line
	// to be considered a subtask rather than a top-level task.
	SubTaskMinIndent = 2
)

Task parsing constants.

View Source
const (
	// VarWarnings is the template variable for backup warning messages.
	VarWarnings = "Warnings"
)

Template variable keys for backup hooks.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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