diff options
Diffstat (limited to 'sorter')
| -rw-r--r-- | sorter/rules.toml | 13 | ||||
| -rw-r--r-- | sorter/sort_downloads.py | 5 |
2 files changed, 16 insertions, 2 deletions
diff --git a/sorter/rules.toml b/sorter/rules.toml index 0c0a7ac..ae1cbfd 100644 --- a/sorter/rules.toml +++ b/sorter/rules.toml @@ -29,6 +29,15 @@ supported_extensions = [ ".xls", ".md", ".odt", + ".sh", + ".py", + ".js", + ".ts", + ".html", + ".css", + ".json", + ".yaml", + ".toml", ] # ── Categories ──────────────────────────────────────────────────────────────── @@ -79,6 +88,10 @@ filename_keywords = [ "akw", ] +[[categories]] +name = "Code" +description = "Scripts and source code files" +filename_keywords = [".sh", ".py", ".js", ".ts", ".html", ".css", ".json", ".yaml", ".toml"] # ── Add more categories below ───────────────────────────────────────────────── # [[categories]] diff --git a/sorter/sort_downloads.py b/sorter/sort_downloads.py index 10cc696..1ced5e3 100644 --- a/sorter/sort_downloads.py +++ b/sorter/sort_downloads.py @@ -215,11 +215,11 @@ def main(): sys.exit(1) parser = argparse.ArgumentParser( - description="Sort ~/Downloads using rules defined in rules.toml" + description="Sort ~/downloads using rules defined in rules.toml" ) parser.add_argument( "--dir", - default=str(Path.home() / "Downloads"), + default=str(Path.home() / "downloads"), help="Path to Downloads folder (default: ~/Downloads)", ) parser.add_argument( @@ -246,6 +246,7 @@ def main(): extensions = set(config.get("supported_extensions", [ ".pdf", ".docx", ".doc", ".txt", ".xlsx", ".xls", ".md", ".odt" + ".sh", ".py", ".js", ".ts", ".html", ".css", ".json", ".yaml", ".toml" ])) if args.list_rules: |
