Skip to content

feat: add archive script for voice memos#27

Merged
dergigi merged 2 commits intomasterfrom
archive
Jan 2, 2026
Merged

feat: add archive script for voice memos#27
dergigi merged 2 commits intomasterfrom
archive

Conversation

@dergigi
Copy link
Owner

@dergigi dergigi commented Jan 2, 2026

Adds archive.sh to move processed voice memos from previous months into organized archive/YYYY-MM/ folders. This keeps the main VoiceMemos directory clean and prevents the watch script from iterating over hundreds of old files on startup.

  • Discovers related files dynamically by filename pattern (no hardcoded directory list)
  • Supports -n (dry-run) and -v (verbose) flags
  • Parses recording date from filename rather than file modification time

- Archives processed voice memos from previous months to archive/YYYY-MM/
- Discovers related files dynamically by basename (no hardcoded list)
- Supports -n (dry-run) and -v (verbose) flags
- Skips current month and unprocessed files
- Handles symlinked VoiceMemos directory
- Designed to run via cron on 1st of each month
Filenames contain the actual recording date (YYYYMMDD_HHMMSS.m4a),
which is more reliable than mtime that can change during file sync/copy.
@dergigi dergigi self-assigned this Jan 2, 2026
@dergigi dergigi merged commit c4c9be4 into master Jan 2, 2026
2 checks passed
@dergigi dergigi deleted the archive branch January 2, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant