How poetaman/arttime works
Project type and purpose
• ArtTime is an open-source, terminal-based time manager & text-art display tool written in Zsh.
• It bundles two executables (arttime, artprint), a library of text-art assets, shell scripts, man pages, and zsh completion functions.
• It interacts with the OS for notifications, sounds, and reads/writes to the filesystem.
Main components
a. Executables
• bin/arttime (main CLI application)
• bin/artprint (standalone artprinting helper)
b. Core Logic
• share/arttime/src/arttime.zsh (Zsh script implementing timers, art selection, input modes)
c. Assets & Data
• share/arttime/textart/… (500+ ASCII/ANSI art files)
• share/arttime/keypoems/… (preconfigured timer patterns & messages)
• History store (user’s ~/.local/share/arttime/history)
d. Documentation
• Man pages (share/man/man1/*.gz, share/arttime/doc/*.txt/.ans)
• README, wiki links
e. Shell Integrations
• Zsh completion functions (share/zsh/functions/_arttime, _artprint)
f. Installer
• install.sh (installs scripts, assets into ~/.local)
g. OS Services
• Desktop notifications (e.g., osascript on macOS, notify-send on Linux)
• Sound playback (PulseAudio/PipeWire native or ogg123 fallback)
h. External feeder programs
• Any external process, pipe, or file feeding keystrokes into ArtTime
Relationships and interactions
• User → (invokes) → arttime / artprint via terminal emulator
• arttime.zsh:
• Reads assets from filesystem (textart, keypoems)
• Reads/writes history files
• Handles interactive input and keybindings (via Zsh’s line editor)
• Triggers OS notifications & sound services
• Interfaces with optional tools (e.g., fzf for art selection)
• Accepts piped/redirected input from external feeders
• Shell:
• Executes zsh scripts, provides completion via functions
• OS Services:
• Notification daemon ← arttime
• Sound server ← arttime
• Installer:
• Places executables in ~/.local/bin
• Copies assets to ~/.local/share/arttime
• Registers completions in share/zsh/functions
Architectural patterns & design principles
• Unix philosophy: small, composable scripts + external utilities
• File-based asset repository (no database)
• Shell-centric modularity (core logic separate from assets)
• Plugin-style extensibility: new art or timer patterns simply become files in the asset directories
• Cross-platform abstraction over notifications & sounds
Technologies & frameworks
• Primary language: Zsh
• Shell utilities: curl, wget, fzf (optional), notify-send / osascript, ogg123
• Asset formats: plain text, ANSI, PETSCII, Unicode
• Installation: POSIX filesystem, symlinks (/etc/localtime), standard user directories (~/.local/bin, ~/.local/share)
• Packaging: .deb, Homebrew, macOS installer script, Docker container
Essential elements
• Component labels (e.g., “ArtTime CLI”, “Text-Art Asset Store”)
• Input flow (user & feeder → CLI)
• Data flow (CLI ↔ FS)
• Service calls (CLI → Notification daemon, CLI → Sound server)