yapping-filorithm 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- filorithm/__init__.py +0 -0
- filorithm/families.py +65 -0
- filorithm/files.py +149 -0
- filorithm/folders.py +118 -0
- filorithm/storage.py +80 -0
- yapping_filorithm-0.1.0.dist-info/METADATA +459 -0
- yapping_filorithm-0.1.0.dist-info/RECORD +10 -0
- yapping_filorithm-0.1.0.dist-info/WHEEL +5 -0
- yapping_filorithm-0.1.0.dist-info/licenses/LICENSE +21 -0
- yapping_filorithm-0.1.0.dist-info/top_level.txt +1 -0
filorithm/__init__.py
ADDED
|
File without changes
|
filorithm/families.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
ARCHIVES = (
|
|
2
|
+
"7z", "bz2", "gz", "iso", "rar", "tar", "tgz", "xz", "zip"
|
|
3
|
+
)
|
|
4
|
+
|
|
5
|
+
AUDIO = (
|
|
6
|
+
"aac", "aiff", "flac", "m4a", "mp3", "ogg", "wav", "wma"
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
CODE_ASSEMBLY = (
|
|
10
|
+
"a51", "asm", "inc", "nas", "nasm", "s"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
CODE_COMPILED = (
|
|
14
|
+
"c", "cc", "cpp", "cs", "cxx", "f", "f03", "f90", "f95", "go",
|
|
15
|
+
"h", "hpp", "java", "kt", "m", "mm", "pas", "rs", "swift"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
CODE_INTERPRETED = (
|
|
19
|
+
"cjs", "dart", "js", "lua", "mjs", "php", "phtml", "pl", "pm",
|
|
20
|
+
"py", "pyw", "r", "rb", "rbw", "rmd", "ts"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
DATA = (
|
|
24
|
+
"csv", "db", "json", "msgpack", "proto", "sql", "sqlite", "toml",
|
|
25
|
+
"tsv", "xml", "yaml", "yml"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
DOCUMENTS = (
|
|
29
|
+
"doc", "docm", "docx", "epub", "md", "odt", "pdf", "rtf", "txt"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
EXECUTABLES = (
|
|
33
|
+
"apk", "app", "bat", "bin", "cmd", "com", "exe", "ipa", "msi",
|
|
34
|
+
"ps1", "run", "sh", "vbs"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
FONTS = (
|
|
38
|
+
"eot", "otf", "ttf", "woff", "woff2"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
IMAGES = (
|
|
42
|
+
"ai", "bmp", "gif", "jpeg", "jpg", "png", "psd", "svg", "tiff",
|
|
43
|
+
"webp"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
PRESENTATIONS = (
|
|
47
|
+
"key", "odp", "potx", "ppsx", "ppt", "pptx"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
SPREADSHEETS = (
|
|
51
|
+
"csv", "ods", "xls", "xlsm", "xlsx"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
SYSTEM = (
|
|
55
|
+
"bak", "cab", "cfg", "dll", "ini", "log", "sys", "tmp"
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
VIDEOS = (
|
|
59
|
+
"avi", "flv", "mkv", "mov", "mp4", "webm", "wmv"
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
WEB = (
|
|
63
|
+
"css", "htm", "html", "jsonld", "jsx", "less", "rss", "sass",
|
|
64
|
+
"scss", "svelte", "tsx", "vue", "wasm", "xhtml"
|
|
65
|
+
)
|
filorithm/files.py
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from re import Pattern, compile
|
|
4
|
+
|
|
5
|
+
from storage import Unit, copy_items, delete_items, move_items, sanitize_directory, to_bytes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FilterFiles:
|
|
9
|
+
def __init__(self, files: tuple[Path, ...] | list[Path], overwrite: bool) -> None:
|
|
10
|
+
self._files = list(files)
|
|
11
|
+
self._overwrite = overwrite
|
|
12
|
+
|
|
13
|
+
def _filter(self, predicate):
|
|
14
|
+
self._files = [file for file in self._files if predicate(file)]
|
|
15
|
+
return self
|
|
16
|
+
|
|
17
|
+
def between_sizes(self, min_size: int, min_unit: Unit, max_size: int, max_unit: Unit):
|
|
18
|
+
lower = to_bytes(min_size, min_unit)
|
|
19
|
+
upper = to_bytes(max_size, max_unit)
|
|
20
|
+
return self._filter(lambda file: lower <= file.stat().st_size <= upper)
|
|
21
|
+
|
|
22
|
+
def bigger_than(self, size: int, unit: Unit):
|
|
23
|
+
limit = to_bytes(size, unit)
|
|
24
|
+
return self._filter(lambda file: file.stat().st_size > limit)
|
|
25
|
+
|
|
26
|
+
def smaller_than(self, size: int, unit: Unit):
|
|
27
|
+
limit = to_bytes(size, unit)
|
|
28
|
+
return self._filter(lambda file: file.stat().st_size < limit)
|
|
29
|
+
|
|
30
|
+
def largest(self, count: int):
|
|
31
|
+
self._files = sorted(self._files, key=(lambda file: file.stat().st_size), reverse=True)[:count]
|
|
32
|
+
return self
|
|
33
|
+
|
|
34
|
+
def smallest(self, count: int):
|
|
35
|
+
self._files = sorted(self._files, key=(lambda file: file.stat().st_size))[:count]
|
|
36
|
+
return self
|
|
37
|
+
|
|
38
|
+
def has_prefix(self, prefix: str):
|
|
39
|
+
return self._filter(lambda file: file.name.startswith(prefix))
|
|
40
|
+
|
|
41
|
+
def has_suffix(self, suffix: str):
|
|
42
|
+
return self._filter(lambda file: file.name.endswith(suffix))
|
|
43
|
+
|
|
44
|
+
def first(self, count: int):
|
|
45
|
+
self._files = self._files[:count]
|
|
46
|
+
return self
|
|
47
|
+
|
|
48
|
+
def last(self, count: int):
|
|
49
|
+
self._files = self._files[-count:]
|
|
50
|
+
return self
|
|
51
|
+
|
|
52
|
+
def keep_only(self, filenames: str | tuple[str, ...] | list[str]):
|
|
53
|
+
names = (filenames,) if isinstance(filenames, str) else filenames
|
|
54
|
+
allowed = set(names)
|
|
55
|
+
return self._filter(lambda file: file.name in allowed)
|
|
56
|
+
|
|
57
|
+
def exclude(self, filenames: str | tuple[str, ...] | list[str]):
|
|
58
|
+
names = (filenames,) if isinstance(filenames, str) else filenames
|
|
59
|
+
banned = set(names)
|
|
60
|
+
return self._filter(lambda file: file.name not in banned)
|
|
61
|
+
|
|
62
|
+
def with_extensions(self, extensions: str | tuple[str, ...] | list[str]):
|
|
63
|
+
exts = (extensions,) if isinstance(extensions, str) else extensions
|
|
64
|
+
normalized = {extension.lower().lstrip(".") for extension in exts}
|
|
65
|
+
return self._filter(lambda file: file.suffix.lower().lstrip(".") in normalized)
|
|
66
|
+
|
|
67
|
+
def without_extensions(self, extensions: str | tuple[str, ...] | list[str]):
|
|
68
|
+
exts = (extensions,) if isinstance(extensions, str) else extensions
|
|
69
|
+
normalized = {extension.lower().lstrip(".") for extension in exts}
|
|
70
|
+
return self._filter(lambda file: file.suffix.lower().lstrip(".") not in normalized)
|
|
71
|
+
|
|
72
|
+
def name_lacks(self, text: str):
|
|
73
|
+
return self._filter(lambda file: text not in file.name)
|
|
74
|
+
|
|
75
|
+
def name_contains(self, text: str):
|
|
76
|
+
return self._filter(lambda file: text in file.name)
|
|
77
|
+
|
|
78
|
+
def name_matches(self, regex: str | Pattern):
|
|
79
|
+
pattern = compile(regex) if isinstance(regex, str) else regex
|
|
80
|
+
return self._filter(lambda file: bool(pattern.search(file.name)))
|
|
81
|
+
|
|
82
|
+
def modified_between(self, start: datetime, end: datetime):
|
|
83
|
+
timestamp_start = start.timestamp()
|
|
84
|
+
timestamp_end = end.timestamp()
|
|
85
|
+
return self._filter(lambda file: timestamp_start <= file.stat().st_mtime <= timestamp_end)
|
|
86
|
+
|
|
87
|
+
def modified_after(self, date: datetime):
|
|
88
|
+
timestamp = date.timestamp()
|
|
89
|
+
return self._filter(lambda file: file.stat().st_mtime > timestamp)
|
|
90
|
+
|
|
91
|
+
def modified_before(self, date: datetime):
|
|
92
|
+
timestamp = date.timestamp()
|
|
93
|
+
return self._filter(lambda file: file.stat().st_mtime < timestamp)
|
|
94
|
+
|
|
95
|
+
def collect(self) -> "Files":
|
|
96
|
+
return Files("", overwrite=self._overwrite, raw=self._files)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class Files:
|
|
100
|
+
def __init__(self, source: str | Path, overwrite: bool = False, raw: str | Path | tuple[Path, ...] | list[Path] | None = None) -> None:
|
|
101
|
+
self._overwrite = overwrite
|
|
102
|
+
|
|
103
|
+
if raw is not None:
|
|
104
|
+
if isinstance(raw, (str, Path)):
|
|
105
|
+
self._files = [Path(raw)]
|
|
106
|
+
else:
|
|
107
|
+
self._files = [Path(item) for item in raw]
|
|
108
|
+
else:
|
|
109
|
+
directory = sanitize_directory(source)
|
|
110
|
+
self._files = [file for file in directory.iterdir() if file.is_file()]
|
|
111
|
+
|
|
112
|
+
def __iter__(self):
|
|
113
|
+
return iter(self._files)
|
|
114
|
+
|
|
115
|
+
def __getitem__(self, index):
|
|
116
|
+
return self._files[index]
|
|
117
|
+
|
|
118
|
+
def __len__(self) -> int:
|
|
119
|
+
return len(self._files)
|
|
120
|
+
|
|
121
|
+
def __repr__(self) -> str:
|
|
122
|
+
items = [repr(path.name) for path in self._files]
|
|
123
|
+
|
|
124
|
+
if len(items) > 5:
|
|
125
|
+
preview = ", ".join(items[:5]) + f", ... (+{len(items) - 5} more)"
|
|
126
|
+
else:
|
|
127
|
+
preview = ", ".join(items)
|
|
128
|
+
|
|
129
|
+
return f"<{self.__class__.__name__} count={len(self._files)} items=[{preview}]>"
|
|
130
|
+
|
|
131
|
+
def __str__(self) -> str:
|
|
132
|
+
return str(self._files)
|
|
133
|
+
|
|
134
|
+
def __rshift__(self, destination: str | Path) -> None:
|
|
135
|
+
directory = sanitize_directory(destination)
|
|
136
|
+
move_items(self._files, directory, self._overwrite)
|
|
137
|
+
|
|
138
|
+
def __matmul__(self, destination: str | Path) -> None:
|
|
139
|
+
directory = sanitize_directory(destination)
|
|
140
|
+
copy_items(self._files, directory, self._overwrite)
|
|
141
|
+
|
|
142
|
+
def __invert__(self) -> None:
|
|
143
|
+
delete_items(self._files)
|
|
144
|
+
|
|
145
|
+
def collect(self) -> list[Path]:
|
|
146
|
+
return self._files
|
|
147
|
+
|
|
148
|
+
def filter(self) -> FilterFiles:
|
|
149
|
+
return FilterFiles(self._files, self._overwrite)
|
filorithm/folders.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from re import Pattern, compile
|
|
4
|
+
|
|
5
|
+
from storage import copy_items, delete_items, move_items, sanitize_directory
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FilterFolders:
|
|
9
|
+
def __init__(self, folders: tuple[Path, ...] | list[Path], overwrite: bool) -> None:
|
|
10
|
+
self._folders = list(folders)
|
|
11
|
+
self._overwrite = overwrite
|
|
12
|
+
|
|
13
|
+
def _filter(self, predicate):
|
|
14
|
+
self._folders = [folder for folder in self._folders if predicate(folder)]
|
|
15
|
+
return self
|
|
16
|
+
|
|
17
|
+
def has_prefix(self, prefix: str):
|
|
18
|
+
return self._filter(lambda folder: folder.name.startswith(prefix))
|
|
19
|
+
|
|
20
|
+
def has_suffix(self, suffix: str):
|
|
21
|
+
return self._filter(lambda folder: folder.name.endswith(suffix))
|
|
22
|
+
|
|
23
|
+
def first(self, count: int):
|
|
24
|
+
self._folders = self._folders[:count]
|
|
25
|
+
return self
|
|
26
|
+
|
|
27
|
+
def last(self, count: int):
|
|
28
|
+
self._folders = self._folders[-count:]
|
|
29
|
+
return self
|
|
30
|
+
|
|
31
|
+
def keep_only(self, foldernames: str | tuple[str, ...] | list[str]):
|
|
32
|
+
names = (foldernames,) if isinstance(foldernames, str) else foldernames
|
|
33
|
+
allowed = set(names)
|
|
34
|
+
return self._filter(lambda folder: folder.name in allowed)
|
|
35
|
+
|
|
36
|
+
def exclude(self, foldernames: str | tuple[str, ...] | list[str]):
|
|
37
|
+
names = (foldernames,) if isinstance(foldernames, str) else foldernames
|
|
38
|
+
banned = set(names)
|
|
39
|
+
return self._filter(lambda folder: folder.name not in banned)
|
|
40
|
+
|
|
41
|
+
def name_lacks(self, text: str):
|
|
42
|
+
return self._filter(lambda folder: text not in folder.name)
|
|
43
|
+
|
|
44
|
+
def name_contains(self, text: str):
|
|
45
|
+
return self._filter(lambda folder: text in folder.name)
|
|
46
|
+
|
|
47
|
+
def name_matches(self, regex: str | Pattern):
|
|
48
|
+
pattern = compile(regex) if isinstance(regex, str) else regex
|
|
49
|
+
return self._filter(lambda folder: bool(pattern.search(folder.name)))
|
|
50
|
+
|
|
51
|
+
def modified_between(self, start: datetime, end: datetime):
|
|
52
|
+
timestamp_start = start.timestamp()
|
|
53
|
+
timestamp_end = end.timestamp()
|
|
54
|
+
return self._filter(lambda folder: timestamp_start <= folder.stat().st_mtime <= timestamp_end)
|
|
55
|
+
|
|
56
|
+
def modified_after(self, date: datetime):
|
|
57
|
+
timestamp = date.timestamp()
|
|
58
|
+
return self._filter(lambda folder: folder.stat().st_mtime > timestamp)
|
|
59
|
+
|
|
60
|
+
def modified_before(self, date: datetime):
|
|
61
|
+
timestamp = date.timestamp()
|
|
62
|
+
return self._filter(lambda folder: folder.stat().st_mtime < timestamp)
|
|
63
|
+
|
|
64
|
+
def collect(self) -> "Folders":
|
|
65
|
+
return Folders("", overwrite=self._overwrite, raw=self._folders)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class Folders:
|
|
69
|
+
def __init__(self, source: str | Path, overwrite: bool = False, raw: str | Path | tuple[Path, ...] | list[Path] | None = None) -> None:
|
|
70
|
+
self._overwrite = overwrite
|
|
71
|
+
|
|
72
|
+
if raw is not None:
|
|
73
|
+
if isinstance(raw, (str, Path)):
|
|
74
|
+
self._folders = [Path(raw)]
|
|
75
|
+
else:
|
|
76
|
+
self._folders = [Path(item) for item in raw]
|
|
77
|
+
else:
|
|
78
|
+
directory = sanitize_directory(source)
|
|
79
|
+
self._folders = [folder for folder in directory.iterdir() if folder.is_dir()]
|
|
80
|
+
|
|
81
|
+
def __iter__(self):
|
|
82
|
+
return iter(self._folders)
|
|
83
|
+
|
|
84
|
+
def __getitem__(self, index):
|
|
85
|
+
return self._folders[index]
|
|
86
|
+
|
|
87
|
+
def __len__(self) -> int:
|
|
88
|
+
return len(self._folders)
|
|
89
|
+
|
|
90
|
+
def __repr__(self) -> str:
|
|
91
|
+
items = [repr(path.name) for path in self._folders]
|
|
92
|
+
|
|
93
|
+
if len(items) > 5:
|
|
94
|
+
preview = ", ".join(items[:5]) + f", ... (+{len(items) - 5} more)"
|
|
95
|
+
else:
|
|
96
|
+
preview = ", ".join(items)
|
|
97
|
+
|
|
98
|
+
return f"<{self.__class__.__name__} count={len(self._folders)} items=[{preview}]>"
|
|
99
|
+
|
|
100
|
+
def __str__(self) -> str:
|
|
101
|
+
return str(self._folders)
|
|
102
|
+
|
|
103
|
+
def __rshift__(self, destination: str | Path) -> None:
|
|
104
|
+
directory = sanitize_directory(destination)
|
|
105
|
+
move_items(self._folders, directory, self._overwrite)
|
|
106
|
+
|
|
107
|
+
def __matmul__(self, destination: str | Path) -> None:
|
|
108
|
+
directory = sanitize_directory(destination)
|
|
109
|
+
copy_items(self._folders, directory, self._overwrite)
|
|
110
|
+
|
|
111
|
+
def __invert__(self) -> None:
|
|
112
|
+
delete_items(self._folders)
|
|
113
|
+
|
|
114
|
+
def collect(self) -> list[Path]:
|
|
115
|
+
return self._folders
|
|
116
|
+
|
|
117
|
+
def filter(self) -> FilterFolders:
|
|
118
|
+
return FilterFolders(self._folders, self._overwrite)
|
filorithm/storage.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from shutil import copy2, copytree, move, rmtree
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
Unit = Literal["kb", "mb", "gb", "tb"]
|
|
6
|
+
|
|
7
|
+
_MULTIPLIERS = {"kb": 1024, "mb": 1024**2, "gb": 1024**3, "tb": 1024**4}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def to_bytes(size: int, unit: Unit) -> int:
|
|
11
|
+
return size * _MULTIPLIERS[unit]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def sanitize_directory(raw: str | Path) -> Path:
|
|
15
|
+
path = Path(raw)
|
|
16
|
+
|
|
17
|
+
if not path.exists():
|
|
18
|
+
raise FileNotFoundError(f"No such directory: '{path}'")
|
|
19
|
+
if not path.is_dir():
|
|
20
|
+
raise NotADirectoryError(f"Not a directory: '{path}'")
|
|
21
|
+
|
|
22
|
+
return path
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def remove(path: Path) -> None:
|
|
26
|
+
if not path.exists():
|
|
27
|
+
raise FileNotFoundError(f"No such file or directory: '{path}'")
|
|
28
|
+
|
|
29
|
+
if path.is_dir():
|
|
30
|
+
rmtree(path)
|
|
31
|
+
else:
|
|
32
|
+
path.unlink()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def copy_items(items: tuple[Path, ...] | list[Path], destination: str | Path, overwrite: bool = False) -> None:
|
|
36
|
+
directory = sanitize_directory(destination)
|
|
37
|
+
|
|
38
|
+
for item in items:
|
|
39
|
+
if not item.exists():
|
|
40
|
+
raise FileNotFoundError(f"No such file or directory: '{item}'")
|
|
41
|
+
|
|
42
|
+
target = directory / item.name
|
|
43
|
+
|
|
44
|
+
if target.exists():
|
|
45
|
+
if target.resolve() == item.resolve():
|
|
46
|
+
continue
|
|
47
|
+
if not overwrite:
|
|
48
|
+
raise FileExistsError(f"Destination already exists: '{target}'")
|
|
49
|
+
remove(target)
|
|
50
|
+
|
|
51
|
+
if item.is_dir():
|
|
52
|
+
copytree(item, target)
|
|
53
|
+
else:
|
|
54
|
+
copy2(item, target)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def move_items(items: tuple[Path, ...] | list[Path], destination: str | Path, overwrite: bool = False) -> None:
|
|
58
|
+
directory = sanitize_directory(destination)
|
|
59
|
+
|
|
60
|
+
for item in items:
|
|
61
|
+
if not item.exists():
|
|
62
|
+
raise FileNotFoundError(f"No such file or directory: '{item}'")
|
|
63
|
+
|
|
64
|
+
target = directory / item.name
|
|
65
|
+
|
|
66
|
+
if target.exists():
|
|
67
|
+
if target.resolve() == item.resolve():
|
|
68
|
+
continue
|
|
69
|
+
if not overwrite:
|
|
70
|
+
raise FileExistsError(f"Destination already exists: '{target}'")
|
|
71
|
+
remove(target)
|
|
72
|
+
|
|
73
|
+
move(str(item), str(target))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def delete_items(items: tuple[Path, ...] | list[Path]) -> None:
|
|
77
|
+
for item in items:
|
|
78
|
+
if not item.exists():
|
|
79
|
+
raise FileNotFoundError(f"No such file or directory: '{item}'")
|
|
80
|
+
remove(item)
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yapping-filorithm
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Author-email: Patrick Ghetea <ghetea_patrick@outlook.com>
|
|
5
|
+
Classifier: Programming Language :: Python :: 3
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
7
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
# Filorithm
|
|
15
|
+
|
|
16
|
+
**Find the files. Do the thing. Retire a few nested loops.**
|
|
17
|
+
|
|
18
|
+
Filorithm is a lightweight Python utility for files, directories, filtering, and batch storage operations. It builds on `pathlib` and `shutil`, giving you a readable way to select items and then copy, move, or delete them together.
|
|
19
|
+
|
|
20
|
+
If a simple file task keeps turning into three loops and an `os.path.join()` expedition, this is the shorter route through the same filesystem.
|
|
21
|
+
|
|
22
|
+
> **IMPORTANT**
|
|
23
|
+
> **Now on PyPI!** You no longer need to clone the repository, sacrifice a weekend, and manually summon the source code. Just install it:
|
|
24
|
+
>
|
|
25
|
+
> ```bash
|
|
26
|
+
> pip install yapping-filorithm
|
|
27
|
+
> ```
|
|
28
|
+
>
|
|
29
|
+
> Then import it in Python using the module name, minus the `yapping-` prefix:
|
|
30
|
+
>
|
|
31
|
+
> ```python
|
|
32
|
+
> import filorithm
|
|
33
|
+
> ```
|
|
34
|
+
>
|
|
35
|
+
> Remember: `yapping-filorithm` is the package name; `filorithm` is the import name. Two names, one project. Don't overthink it. Python already does enough of that.
|
|
36
|
+
>
|
|
37
|
+
> Happy hacking! May your files be found and your paths be relative only when intended.
|
|
38
|
+
|
|
39
|
+
[What it does](#what-it-does) · [Get started](#get-started) · [A quick example](#a-quick-example) · [How it fits together](#how-it-fits-together) · [Reference](#reference) · [Examples](#examples) · [Good to know](#good-to-know) · [Design notes](#design-notes)
|
|
40
|
+
|
|
41
|
+
> **IMPORTANT**
|
|
42
|
+
> The file-family module has been renamed from **`file_types.py`** to **`families.py`** as part of the project's cleanup and standardization. The examples in this README use `filorithm.families`. Update older imports that still point to `filorithm.file_types`.
|
|
43
|
+
|
|
44
|
+
## What it does
|
|
45
|
+
|
|
46
|
+
- Supplies predefined extension families for archives, media, code, data, documents, executables, fonts, presentations, spreadsheets, system files, and web files.
|
|
47
|
+
- Collects files with `Files` and directories with `Folders`.
|
|
48
|
+
- Builds chainable filters for names, prefixes, suffixes, regex patterns, and modification dates, with extension and size filtering for files.
|
|
49
|
+
- Supports readable size amounts and units, including kilobytes, megabytes, gigabytes, and terabytes.
|
|
50
|
+
- Copies, moves, and deletes selected items through the `@`, `>>`, and `~` operators.
|
|
51
|
+
- Resolves paths and sanitizes directory inputs automatically.
|
|
52
|
+
- Handles individual files, multiple files, and entire directories through the collection and storage interfaces.
|
|
53
|
+
- Works with standard Python `Path` and `datetime` objects.
|
|
54
|
+
|
|
55
|
+
## Get started
|
|
56
|
+
|
|
57
|
+
> **NOTE**
|
|
58
|
+
> Filorithm uses only Python's standard library. Replace `filorithm` in the imports if your installation uses another package path.
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from filorithm.files import Files
|
|
62
|
+
from filorithm.folders import Folders
|
|
63
|
+
from filorithm.families import IMAGES, VIDEOS
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
For an older checkout, the relevant import change is:
|
|
67
|
+
|
|
68
|
+
| Older path | Current path |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `filorithm.file_types` | `filorithm.families` |
|
|
71
|
+
|
|
72
|
+
The examples use ordinary filesystem paths. Replace the sample paths with directories appropriate to your own environment.
|
|
73
|
+
|
|
74
|
+
## A quick example
|
|
75
|
+
|
|
76
|
+
Collect interpreted-code files and copy them to a backup directory:
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from filorithm.files import Files
|
|
80
|
+
from filorithm.families import CODE_INTERPRETED
|
|
81
|
+
|
|
82
|
+
scripts = Files("/scripts").filter().with_extensions(CODE_INTERPRETED).collect()
|
|
83
|
+
|
|
84
|
+
scripts @ "/backup/scripts"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`Files("/scripts")` selects the source directory. `filter()` starts a builder, `with_extensions()` narrows the selection, and `collect()` returns a new `Files` collection. The `@` operator then copies that selection.
|
|
88
|
+
|
|
89
|
+
No matrix algebra is involved. Python simply lent the operator to another department.
|
|
90
|
+
|
|
91
|
+
## How it fits together
|
|
92
|
+
|
|
93
|
+
### Collect files
|
|
94
|
+
|
|
95
|
+
Constructing `Files` reads the files in the specified directory:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
source_files = Files("/path/to/directory")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
You can also supply raw paths directly:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
source_files = Files(
|
|
105
|
+
"/path/to/directory",
|
|
106
|
+
raw=["file1.txt", "file2.txt"]
|
|
107
|
+
)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The collection is iterable and supports indexing. For example, iterate over it to inspect each filename:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
for file in source_files:
|
|
114
|
+
print(file.name)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Build a file filter
|
|
118
|
+
|
|
119
|
+
`Files.filter()` returns a `FilterFiles` builder. Chain criteria to narrow your selection, then collect the results.
|
|
120
|
+
|
|
121
|
+
#### Include or exclude extensions
|
|
122
|
+
|
|
123
|
+
Use a list or a predefined extension tuple:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
images = Files("/downloads").filter().with_extensions(IMAGES).collect()
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
To exclude a family, import that family and use `without_extensions()`:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from filorithm.families import EXECUTABLES
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
safe_files = Files("/downloads").filter().without_extensions(EXECUTABLES).collect()
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The variable name `safe_files` here only describes the extension-based selection. The filter excludes the listed executable extensions; it does not inspect file contents.
|
|
140
|
+
|
|
141
|
+
#### Match names
|
|
142
|
+
|
|
143
|
+
Name filters support prefixes, suffixes, regex patterns, and text matching. These examples show prefix matching, substring matching, and keeping an explicit filename:
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
reports = Files("/docs").filter().has_prefix("report_").collect()
|
|
147
|
+
|
|
148
|
+
old_files = Files("/docs").filter().name_contains("backup").collect()
|
|
149
|
+
|
|
150
|
+
specific = Files("/docs").filter().keep_only(["config.json"]).collect()
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`has_prefix("report_")` keeps names beginning with `report_`. `name_contains("backup")` keeps names containing that text, and `keep_only(["config.json"])` restricts the selection to the given name.
|
|
154
|
+
|
|
155
|
+
#### Filter by modification date
|
|
156
|
+
|
|
157
|
+
Date filtering accepts standard Python `datetime` values:
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from datetime import datetime
|
|
161
|
+
|
|
162
|
+
cutoff = datetime(2026, 1, 1)
|
|
163
|
+
|
|
164
|
+
recent = Files("/docs").filter().modified_after(cutoff).collect()
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Here, `modified_after(cutoff)` selects files modified after January 1, 2026. `modified_before(cutoff)` is used in the complete example below to select older files.
|
|
168
|
+
|
|
169
|
+
#### Filter by size
|
|
170
|
+
|
|
171
|
+
You can filter by size on disk using an amount and unit:
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
from filorithm.storage import Unit
|
|
175
|
+
|
|
176
|
+
large = Files("/media").filter().bigger_than(500, "mb").collect()
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
This selects files bigger than 500 MB. `Unit` is available from the storage module; the example passes the unit as the string `"mb"` and does not need to reference `Unit` directly.
|
|
180
|
+
|
|
181
|
+
You can also select the largest or smallest files. For example, collect the ten largest:
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
top_ten = Files("/media").filter().largest(10).collect()
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
> **IMPORTANT**
|
|
188
|
+
> Finish a filter chain with **`collect()`**. The chain builds conditions; `collect()` returns a new `Files` object containing the selected results.
|
|
189
|
+
|
|
190
|
+
### Collect and filter folders
|
|
191
|
+
|
|
192
|
+
`Folders` follows the same collection pattern, targeting directories instead of files:
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
folders = Folders("/var/log")
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Its `filter()` method returns a `FilterFolders` builder:
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
backups = Folders("/var/log").filter().name_contains("backup").collect()
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Folder filtering supports prefixes, suffixes, name content, regex patterns, and modification dates. Use `collect()` to finish the selection here too.
|
|
205
|
+
|
|
206
|
+
### Apply a batch operation
|
|
207
|
+
|
|
208
|
+
The same storage operators work with both `Files` and `Folders`:
|
|
209
|
+
|
|
210
|
+
| Operator | Action | Example form |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| `>>` | Move the collected items to a destination directory. | `items >> "/destination"` |
|
|
213
|
+
| `@` | Copy the collected items to a destination directory. | `items @ "/destination"` |
|
|
214
|
+
| `~` | Delete the collected items from disk. | `~items` |
|
|
215
|
+
|
|
216
|
+
#### Move items with `>>`
|
|
217
|
+
|
|
218
|
+
```python
|
|
219
|
+
images = Files("/downloads").filter().with_extensions(IMAGES).collect()
|
|
220
|
+
|
|
221
|
+
images >> "/pictures/memes"
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
All selected images move into the memes directory. Their journey is your business; Filorithm handles the moving.
|
|
225
|
+
|
|
226
|
+
#### Copy items with `@`
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
documents = Files("/work")
|
|
230
|
+
|
|
231
|
+
documents @ "/backup/work"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
This copies the files collected from `/work` into `/backup/work`. The collection determines the scope of the operation.
|
|
235
|
+
|
|
236
|
+
#### Delete items with `~`
|
|
237
|
+
|
|
238
|
+
> **CAUTION**
|
|
239
|
+
> **`~items` permanently removes the selected files or folders from disk.** Inspect the selection before applying it. This is a filesystem deletion, not a move to a recycle bin.
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
temp_files = Files("/tmp").filter().name_contains("cache").collect()
|
|
243
|
+
|
|
244
|
+
~temp_files
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
In this example, the deletion applies to files in `/tmp` whose names contain `cache`.
|
|
248
|
+
|
|
249
|
+
#### Choose overwrite behavior explicitly
|
|
250
|
+
|
|
251
|
+
By default, a storage operation raises `FileExistsError` when a destination file already exists. Enable overwriting when constructing the collection if that is the behavior you intend:
|
|
252
|
+
|
|
253
|
+
```python
|
|
254
|
+
Files("/downloads", overwrite=True) >> "/pictures"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
> **WARNING**
|
|
258
|
+
> `overwrite=True` opts into replacing existing destination files. Choose the destination and collection deliberately; the default protection is there for a reason.
|
|
259
|
+
|
|
260
|
+
## Reference
|
|
261
|
+
|
|
262
|
+
### File families
|
|
263
|
+
|
|
264
|
+
The family constants are tuples of common filename extensions, grouped by category. The examples in the table describe their contents; entries followed by “etc.” are representative rather than exhaustive lists of tuple members.
|
|
265
|
+
|
|
266
|
+
| Category | Contains |
|
|
267
|
+
|---|---|
|
|
268
|
+
| `ARCHIVES` | 7z, zip, tar, gz, rar, etc. |
|
|
269
|
+
| `AUDIO` | mp3, wav, flac, ogg, etc. |
|
|
270
|
+
| `CODE_ASSEMBLY` | asm, s, nasm, etc. |
|
|
271
|
+
| `CODE_COMPILED` | c, cpp, java, rs, go, etc. |
|
|
272
|
+
| `CODE_INTERPRETED` | py, js, php, rb, ts, etc. |
|
|
273
|
+
| `DATA` | json, csv, xml, yaml, sql, etc. |
|
|
274
|
+
| `DOCUMENTS` | pdf, docx, txt, md, epub, etc. |
|
|
275
|
+
| `EXECUTABLES` | exe, sh, bat, apk, bin, etc. |
|
|
276
|
+
| `FONTS` | ttf, otf, woff, etc. |
|
|
277
|
+
| `IMAGES` | png, jpg, jpeg, svg, gif, etc. |
|
|
278
|
+
| `PRESENTATIONS` | pptx, key, odp, etc. |
|
|
279
|
+
| `SPREADSHEETS` | xlsx, csv, ods, etc. |
|
|
280
|
+
| `SYSTEM` | dll, sys, log, ini, etc. |
|
|
281
|
+
| `VIDEOS` | mp4, mkv, avi, mov, etc. |
|
|
282
|
+
| `WEB` | html, css, jsx, wasm, etc. |
|
|
283
|
+
|
|
284
|
+
For example:
|
|
285
|
+
|
|
286
|
+
```python
|
|
287
|
+
from filorithm.families import IMAGES
|
|
288
|
+
|
|
289
|
+
print("png" in IMAGES)
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
The membership check shows the documented extension form: `"png"` appears without a leading dot. These collections let you reuse a family instead of remembering every spelling variation of a JPEG extension.
|
|
293
|
+
|
|
294
|
+
### Collections and filter methods
|
|
295
|
+
|
|
296
|
+
| Interface | Purpose |
|
|
297
|
+
| --- | --- |
|
|
298
|
+
| `Files(path)` | Collect files from the source directory. |
|
|
299
|
+
| `Files(path, raw=[...])` | Construct a file collection using supplied raw paths. |
|
|
300
|
+
| `Folders(path)` | Collect directories from the source directory. |
|
|
301
|
+
| `.filter()` | Start a `FilterFiles` or `FilterFolders` builder. |
|
|
302
|
+
| `.collect()` | Finish the builder and return a new collection containing the results. |
|
|
303
|
+
| `.with_extensions(extensions)` | Keep files whose extensions belong to the supplied collection. |
|
|
304
|
+
| `.without_extensions(extensions)` | Exclude files whose extensions belong to the supplied collection. |
|
|
305
|
+
| `.has_prefix(text)` | Filter names by prefix. |
|
|
306
|
+
| `.name_contains(text)` | Filter names by included text. |
|
|
307
|
+
| `.keep_only(names)` | Restrict the selection to the supplied names. |
|
|
308
|
+
| `.modified_after(date)` | Filter by modification time after a `datetime` cutoff. |
|
|
309
|
+
| `.modified_before(date)` | Filter by modification time before a `datetime` cutoff. |
|
|
310
|
+
| `.bigger_than(amount, unit)` | Filter files by size on disk. |
|
|
311
|
+
| `.largest(count)` | Keep the requested number of largest files. |
|
|
312
|
+
|
|
313
|
+
Additional supported filter categories include suffix matching, regex matching, and selecting the smallest files.
|
|
314
|
+
|
|
315
|
+
### Standalone storage functions
|
|
316
|
+
|
|
317
|
+
If you prefer calling functions directly, import the storage utilities:
|
|
318
|
+
|
|
319
|
+
```python
|
|
320
|
+
from filorithm.storage import (
|
|
321
|
+
to_bytes,
|
|
322
|
+
remove,
|
|
323
|
+
copy_items,
|
|
324
|
+
move_items,
|
|
325
|
+
delete_items,
|
|
326
|
+
)
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
`to_bytes()` converts a readable amount and unit into bytes:
|
|
330
|
+
|
|
331
|
+
```python
|
|
332
|
+
bytes = to_bytes(5, "gb")
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
For manual batch work, supply a list or tuple of `pathlib.Path` objects. First import `Path`:
|
|
336
|
+
|
|
337
|
+
```python
|
|
338
|
+
from pathlib import Path
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Then call the batch functions as needed:
|
|
342
|
+
|
|
343
|
+
```python
|
|
344
|
+
paths = [Path("file1.txt"), Path("file2.txt")]
|
|
345
|
+
|
|
346
|
+
copy_items(paths, "/destination")
|
|
347
|
+
move_items(paths, "/destination")
|
|
348
|
+
delete_items(paths)
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The snippet shows the call shapes for `copy_items()`, `move_items()`, and `delete_items()`. Choose the operation you need; running all three sequentially against the same paths changes which source paths still exist.
|
|
352
|
+
|
|
353
|
+
These functions supply the storage mechanics used by `Files` and `Folders`. The module also exposes `remove`, as shown in the import list above.
|
|
354
|
+
|
|
355
|
+
## Examples
|
|
356
|
+
|
|
357
|
+
### Select large videos and old images
|
|
358
|
+
|
|
359
|
+
> **CAUTION**
|
|
360
|
+
> This example performs real changes: it enables overwriting, moves selected videos, and permanently deletes selected images. Read through the filters and replace the paths before running it.
|
|
361
|
+
|
|
362
|
+
```python
|
|
363
|
+
from datetime import datetime
|
|
364
|
+
from filorithm.files import Files
|
|
365
|
+
from filorithm.families import VIDEOS, IMAGES
|
|
366
|
+
|
|
367
|
+
# Define a cutoff date
|
|
368
|
+
cutoff = datetime(2026, 1, 1)
|
|
369
|
+
|
|
370
|
+
# Collect all files in the downloads folder
|
|
371
|
+
downloads = Files("/users/home/downloads", overwrite=True)
|
|
372
|
+
|
|
373
|
+
# Find large videos
|
|
374
|
+
large_videos = (
|
|
375
|
+
downloads.filter()
|
|
376
|
+
.with_extensions(VIDEOS)
|
|
377
|
+
.bigger_than(1, "gb")
|
|
378
|
+
.collect()
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
# Find old images
|
|
382
|
+
old_images = (
|
|
383
|
+
downloads.filter()
|
|
384
|
+
.with_extensions(IMAGES)
|
|
385
|
+
.modified_before(cutoff)
|
|
386
|
+
.collect()
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
# Move the videos to an external drive
|
|
390
|
+
large_videos >> "/media/external/movies"
|
|
391
|
+
|
|
392
|
+
# Delete the old images
|
|
393
|
+
~old_images
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
The workflow has three steps:
|
|
397
|
+
|
|
398
|
+
1. Target the downloads directory with `Files`.
|
|
399
|
+
2. Build separate selections: videos bigger than 1 GB, and images modified before January 1, 2026.
|
|
400
|
+
3. Move the video selection to an external drive and delete the old-image selection.
|
|
401
|
+
|
|
402
|
+
The two collections let you express different criteria and actions from the same starting directory without writing the traversal and batch loops yourself.
|
|
403
|
+
|
|
404
|
+
## Good to know
|
|
405
|
+
|
|
406
|
+
Filorithm stays close to Python's standard filesystem utilities. The current implementation does not provide:
|
|
407
|
+
|
|
408
|
+
- Asynchronous file operations.
|
|
409
|
+
- A toggle for automatic symlink resolution.
|
|
410
|
+
- Deep recursive filtering through the filter interface, equivalent to an `os.walk()` traversal.
|
|
411
|
+
- File-content inspection.
|
|
412
|
+
- Advanced permission management through `chmod` or `chown`.
|
|
413
|
+
- Archiving or unzipping directly from `Files`.
|
|
414
|
+
|
|
415
|
+
> **NOTE**
|
|
416
|
+
> Both `Files` and `Folders` implement `__str__()` and `__repr__()` to provide readable collection output.
|
|
417
|
+
|
|
418
|
+
Use `print()` to display the collection's string representation:
|
|
419
|
+
|
|
420
|
+
```python
|
|
421
|
+
files = Files("/path/to/files")
|
|
422
|
+
folders = Folders("/path/to/folders")
|
|
423
|
+
|
|
424
|
+
print(files)
|
|
425
|
+
print(folders)
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
`__str__()` returns the string representation of the underlying list of `Path` objects. The output includes their paths.
|
|
429
|
+
|
|
430
|
+
Use `repr()` to display a shorter summary of the collection:
|
|
431
|
+
|
|
432
|
+
```python
|
|
433
|
+
print(repr(files))
|
|
434
|
+
print(repr(folders))
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
`__repr__()` displays the collection's class name, total item count, and item names. It shows up to five names; when the collection contains more than five items, the remaining count is shown instead.
|
|
438
|
+
|
|
439
|
+
For example, on a POSIX system:
|
|
440
|
+
|
|
441
|
+
```text
|
|
442
|
+
[PosixPath('/path/to/files/report.txt'), PosixPath('/path/to/files/data.csv')]
|
|
443
|
+
<Files count=2 items=['report.txt', 'data.csv']>
|
|
444
|
+
|
|
445
|
+
[PosixPath('/path/to/folders/archive'), PosixPath('/path/to/folders/images')]
|
|
446
|
+
<Folders count=2 items=['archive', 'images']>
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
The path representation may differ between operating systems. The collection summary, however, keeps the same format.
|
|
450
|
+
|
|
451
|
+
## Design notes
|
|
452
|
+
|
|
453
|
+
Filorithm puts a readable interface over the standard `os`, `shutil`, and `pathlib` operations. The work is split into three explicit stages:
|
|
454
|
+
|
|
455
|
+
1. **Select a source:** `Files` or `Folders` collects the items.
|
|
456
|
+
2. **Build conditions:** `FilterFiles` or `FilterFolders` narrows the collection.
|
|
457
|
+
3. **Execute an action:** storage operators or standalone functions perform the operation.
|
|
458
|
+
|
|
459
|
+
The overloaded operators make batch actions concise and visually distinct from normal method calls. The underlying filesystem and storage behavior remain ordinary Python operations; Filorithm handles the orchestration. If you have been repeating `shutil.move()` or `os.remove(os.path.join(root, file))` inside traversal loops, this gives that work a common interface. Fewer nested loops, same files, slightly more afternoon left.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
filorithm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
filorithm/families.py,sha256=SFpHfMYNTy2FX9Kv4ACQ2qzZPz9LtOUdnXIPci6ST6g,1431
|
|
3
|
+
filorithm/files.py,sha256=nW4kbjX8UWd3QYsMifjprStJADXQ36ZCW9w2t-CCOKo,5817
|
|
4
|
+
filorithm/folders.py,sha256=2xJcpDJY1wQmt7SiE-A0d2A2wOeY0xYgLzAnGCsLY3I,4368
|
|
5
|
+
filorithm/storage.py,sha256=vdY0jwvlF58e5aJRKSuvpKDbEJvGmVAi9opEpchd2Q4,2365
|
|
6
|
+
yapping_filorithm-0.1.0.dist-info/licenses/LICENSE,sha256=PRYv9Y8uqHFOEixDS2z_uFQtw1aVEE1mZX6fcvlVM7w,1090
|
|
7
|
+
yapping_filorithm-0.1.0.dist-info/METADATA,sha256=4LFNx2xRmOJkBObq99ROuUyMTERZdv2nrqD5vz4fE28,16903
|
|
8
|
+
yapping_filorithm-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
9
|
+
yapping_filorithm-0.1.0.dist-info/top_level.txt,sha256=hK8ogZQeT44XxfNvKVFDVG7ckmxmtqaclj0LRgClqiU,10
|
|
10
|
+
yapping_filorithm-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ghetea-patrick
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
filorithm
|