readme.md 1.2 KB

I tend to name most of my files with a datestamp. I want a commandline tool that lists files by date in the filename. Something like:

> calfind
2021-03-25
~/notes_2021-03-25.txt
~/data/test-data_20210325TXXXXXX.dat
2021-03-24
~/notes_2021-03-24.txt
~/data-from-david_2021-03-25.xls
2021-03-23
~/notes_2021-03-23.txt
~/app/crash_20210325T071158.log

Then will allow me to select the file(s) I want and maybe pipe to other programs.

Notice how multiple files with the same name format, but different timestamps from the same date are merged together (only when there are >3 instances). Maybe prefix with "()"?

Note I only worry about ISO 8601 style datestamps.

The dates themselves and any common parent directories are listed as well. If those are selected, then all items under them are

Architecture

  • Language: PowerShell
  • Filename provider: Everything file indexer (powershell module)
  • Interaction/Selection: peco

Notes

  • Option: Use poco to select date(s)?
  • Option: Use fuzzy string comparison to merge filenames that are close enough
  • Edge-case: a directory that contains matches for a date, but is also a match for the date. Do you return the directory path, or the list of matches under it?