&nMiBXdZddlZddlmZddlmZmZmZmZddl m Z m Z GddZ y) z8Aggregator module for combining multiple markdown files.N)Path)CallableOptionalDictList)InvalidDirectoryErrorFileOperationErrorc jeZdZdZdZdZ d dededeee egdfde ee ffd Z d e dee fd Zy) Aggregatorz:Combines multiple .md files into a single aggregated file.z--- FILE: {} ---cy)zInitialize the Aggregator.N)selfs \}}}|D]3}|jdst||z }|j |5@t |S)z Recursively find all .md files in the source directory. Args: source_path: Path to search Returns: Sorted list of Path objects for .md files z.md)oswalkr2rappendsorted)rr3r4rootdirsfilesfile full_paths rr#zAggregator._find_md_filesrsj!#!5 / D$ /==' $T T 1IOOI. / /hr)N)__name__ __module__ __qualname____doc__r.rr*rrr,ranyr?rrr#rrrr r sD) CG ^N^N^N$Hc3Z-=$>? ^N c3h ^N@ $ 4: rr ) rMrApathlibrtypingrrrr exceptionsr r r rrrrRs#> 11A| | r