miranda.archive package#
- miranda.archive.group_by_deciphered_date(files: generator | List[str | Path]) Dict[str, List[Path]] [source]#
Find a common date and groups files based on year and month.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
- Returns:
Dict[str, List[Path]]
- miranda.archive.group_by_length(files: generator | List[str | Path], size: int = 10, sort: bool = False) List[List[Path]] [source]#
Group files by an arbitrary number of file entries.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
size (int)
sort (bool)
- Returns:
List[List[Path]]
- miranda.archive.group_by_size(files: generator | List[str | Path], size: int = 10737418240) List[List[Path]] [source]#
Group files up until a desired size and save it as a grouping within a list.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
size (int)
- Returns:
List[List[Path]]
- miranda.archive.group_by_subdirectories(files: generator | List[str | Path], within: Path | str | None = None) Dict[str, List[Path]] [source]#
This function will group files based on the parent folder that they are located within.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
within (Union[str, Path])
- Returns:
Dict[str, List[Path]]
- miranda.archive.select_by_date_modified(source: Path | str, year: int, month: int, day: int, pattern: str | None = None, datetime: date | None = None) List [source]#
- Parameters:
source
year
month
day
pattern
datetime
Submodules#
miranda.archive._groupings module#
- miranda.archive._groupings.group_by_deciphered_date(files: generator | List[str | Path]) Dict[str, List[Path]] [source]#
Find a common date and groups files based on year and month.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
- Returns:
Dict[str, List[Path]]
- miranda.archive._groupings.group_by_length(files: generator | List[str | Path], size: int = 10, sort: bool = False) List[List[Path]] [source]#
Group files by an arbitrary number of file entries.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
size (int)
sort (bool)
- Returns:
List[List[Path]]
- miranda.archive._groupings.group_by_size(files: generator | List[str | Path], size: int = 10737418240) List[List[Path]] [source]#
Group files up until a desired size and save it as a grouping within a list.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
size (int)
- Returns:
List[List[Path]]
- miranda.archive._groupings.group_by_subdirectories(files: generator | List[str | Path], within: Path | str | None = None) Dict[str, List[Path]] [source]#
This function will group files based on the parent folder that they are located within.
- Parameters:
files (Union[GeneratorType, List[Union[str, Path]]])
within (Union[str, Path])
- Returns:
Dict[str, List[Path]]