Expand description
Text utility functions for Aptu.
Provides reusable text formatting utilities for truncation and relative time display. These functions are used by CLI, and will be available to iOS and MCP consumers.
Functions§
- format_
relative_ time - Formats a
DateTime<Utc>as relative time (e.g., “3 days ago”). - infer_
repo_ from_ git - Infers the GitHub repository (owner/repo) from the local git config.
- is_
priority_ label - Check if a label is a priority label (p0-p4 or priority: high/medium/low).
- parse_
and_ format_ relative_ time - Parses an ISO 8601 timestamp and formats it as relative time.
- parse_
git_ remote_ url - Parses a git remote URL to extract owner/repo.
- truncate
- Truncates text to a maximum length with default ellipsis suffix “…”.
- truncate_
with_ suffix - Truncates text to a maximum length with a custom suffix.