FileSorterX 0.1.0__tar.gz

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.
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: FileSorterX
3
+ Version: 0.1.0
4
+ Summary: A colorful CLI tool that groups files by extension.
5
+ Author: SWARAAJ ARORA
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE.txt
10
+ Requires-Dist: rich>=13.0.0
11
+ Dynamic: license-file
12
+
13
+ # FileSorter
14
+
15
+ FileSorter is a simple and colorful command line tool that groups files by extension.
16
+
17
+ It uses Rich for styled terminal output and supports optional directory arguments.
18
+
19
+ ---
20
+
21
+ ## Features
22
+
23
+ - Groups files by extension
24
+ - Clean, sorted output
25
+ - Handles files with no extension
26
+ - Optional directory argument
27
+ - Modern pathlib usage
@@ -0,0 +1,9 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ FileSorterX.egg-info/PKG-INFO
5
+ FileSorterX.egg-info/SOURCES.txt
6
+ FileSorterX.egg-info/dependency_links.txt
7
+ FileSorterX.egg-info/requires.txt
8
+ FileSorterX.egg-info/top_level.txt
9
+ filesorterx/__init__.py
@@ -0,0 +1 @@
1
+ rich>=13.0.0
@@ -0,0 +1 @@
1
+ filesorterx
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SWARAAJ ARORA
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,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: FileSorterX
3
+ Version: 0.1.0
4
+ Summary: A colorful CLI tool that groups files by extension.
5
+ Author: SWARAAJ ARORA
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE.txt
10
+ Requires-Dist: rich>=13.0.0
11
+ Dynamic: license-file
12
+
13
+ # FileSorter
14
+
15
+ FileSorter is a simple and colorful command line tool that groups files by extension.
16
+
17
+ It uses Rich for styled terminal output and supports optional directory arguments.
18
+
19
+ ---
20
+
21
+ ## Features
22
+
23
+ - Groups files by extension
24
+ - Clean, sorted output
25
+ - Handles files with no extension
26
+ - Optional directory argument
27
+ - Modern pathlib usage
@@ -0,0 +1,15 @@
1
+ # FileSorter
2
+
3
+ FileSorter is a simple and colorful command line tool that groups files by extension.
4
+
5
+ It uses Rich for styled terminal output and supports optional directory arguments.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - Groups files by extension
12
+ - Clean, sorted output
13
+ - Handles files with no extension
14
+ - Optional directory argument
15
+ - Modern pathlib usage
@@ -0,0 +1,38 @@
1
+ from rich import print
2
+ import os
3
+ from pathlib import Path
4
+ import sys
5
+
6
+ def get_extension(filepath):
7
+ return Path(filepath).suffix.lstrip(".").lower()
8
+
9
+ def main(directory=None):
10
+ directory = Path(directory or os.getcwd())
11
+
12
+ if not directory.exists():
13
+ print("[bold red]Directory not found![/bold red]")
14
+ return
15
+
16
+ files = {}
17
+
18
+ for item in directory.iterdir():
19
+ if not item.is_file():
20
+ continue
21
+
22
+ ext = get_extension(item.name)
23
+ files.setdefault(ext, []).append(item.name)
24
+
25
+ for extension in sorted(files):
26
+ print(f"[bold red].{extension or 'No Extension'}[/bold red]")
27
+ print("-" * 30)
28
+
29
+ for i, file in enumerate(sorted(files[extension]), start=1):
30
+ print(f"[bold cyan]{i}.[/bold cyan] [bold green]{file}[/bold green]")
31
+
32
+ print()
33
+
34
+ input("Press Enter to continue...")
35
+
36
+ if __name__ == "__main__":
37
+ args = sys.argv[1:]
38
+ main(args[0] if args else None)
@@ -0,0 +1,18 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "FileSorterX"
7
+ version = "0.1.0"
8
+ description = "A colorful CLI tool that groups files by extension."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "MIT"
12
+ license-files = ["LICENSE.txt"]
13
+ authors = [
14
+ { name = "SWARAAJ ARORA" }
15
+ ]
16
+ dependencies = [
17
+ "rich>=13.0.0"
18
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+