Closed mndrix closed 14 years ago
I started hacking on this and realized that I need to refactor first. mostRecentMonthEntries
should be reimplemented in terms of
allMonths :: IO [MonthFile]
where MonthFile
is a new data type roughly like
data MonthFile = MonthFile Period AbsolutePath
where the Period
records the times of the beginning and ending of the month in question and AbsolutePath
is like FilePath
but guaranteed to be absolute (not relative). AbsolutePath
can probably just be implemented roughly like
mkAbsolutePath :: FilePath -> AbsolutePath
mkAbsolutePath p
| isAbsolute p -> AbsolutePath p
| otherwise -> error p ++ " not absolute"
Once the period and path are bundled up inside MonthFile
values, it should be easier to filter out the values that overlap with a particular date range.
Progress is in branch gh-9
Fixed in 0d6774d49dc0e2bec49fd455b8e0f63963da8f75
Trying to run
clk ls -p 'last month'
returns no data becauseclk ls
only queries the most recent month in the timeline. It should really match thePeriod
value against the months and determine which overlap. Then extract matching entries from all entries inside of those months.