filedust 0.5.0__tar.gz → 0.5.2__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.
- {filedust-0.5.0 → filedust-0.5.2}/PKG-INFO +10 -10
- {filedust-0.5.0 → filedust-0.5.2}/README.md +9 -9
- {filedust-0.5.0 → filedust-0.5.2}/pyproject.toml +2 -2
- {filedust-0.5.0 → filedust-0.5.2}/src/filedust/cli.py +4 -0
- {filedust-0.5.0 → filedust-0.5.2}/src/filedust/junk.py +9 -1
- {filedust-0.5.0 → filedust-0.5.2}/LICENCE +0 -0
- {filedust-0.5.0 → filedust-0.5.2}/src/filedust/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: filedust
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Opinionated junk cleaner for dev machines (caches, build artifacts, editor backups).
|
|
5
5
|
License-Expression: GPL-3.0-or-later
|
|
6
6
|
License-File: LICENCE
|
|
@@ -65,7 +65,7 @@ Shows how much disk space can be freed.
|
|
|
65
65
|
|
|
66
66
|
## Installation
|
|
67
67
|
|
|
68
|
-
### From
|
|
68
|
+
### From the SysMD package repository
|
|
69
69
|
|
|
70
70
|
This is the preferred method of installation.
|
|
71
71
|
|
|
@@ -75,7 +75,7 @@ This is the preferred method of installation.
|
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
sudo mkdir -p /usr/share/keyrings
|
|
78
|
-
curl -fsSL https://repo.sysmd.uk/
|
|
78
|
+
curl -fsSL https://repo.sysmd.uk/sysmd/sysmd.gpg | sudo gpg --dearmor -o /usr/share/keyrings/sysmd.gpg
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
The GPG fingerprint is `0032C71FA6A11EF9567D4434C5C06BD4603C28B1`.
|
|
@@ -83,7 +83,7 @@ The GPG fingerprint is `0032C71FA6A11EF9567D4434C5C06BD4603C28B1`.
|
|
|
83
83
|
#### 2) Add the APT source
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/
|
|
86
|
+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/sysmd.gpg] https://repo.sysmd.uk/sysmd/debian stable main" | sudo tee /etc/apt/sources.list.d/sysmd.list
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
#### 3) Update and install
|
|
@@ -98,20 +98,20 @@ sudo apt install filedust
|
|
|
98
98
|
#### 1) Import the GPG key
|
|
99
99
|
|
|
100
100
|
```
|
|
101
|
-
sudo rpm --import https://repo.sysmd.uk/
|
|
101
|
+
sudo rpm --import https://repo.sysmd.uk/sysmd/sysmd.gpg
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
#### 2) Add the repository configuration
|
|
105
105
|
|
|
106
106
|
```
|
|
107
|
-
sudo tee /etc/yum.repos.d/
|
|
108
|
-
[
|
|
109
|
-
name=
|
|
110
|
-
baseurl=https://repo.sysmd.uk/
|
|
107
|
+
sudo tee /etc/yum.repos.d/sysmd.repo > /dev/null << 'EOF'
|
|
108
|
+
[sysmd]
|
|
109
|
+
name=SysMD Repository
|
|
110
|
+
baseurl=https://repo.sysmd.uk/sysmd/rpm/$basearch
|
|
111
111
|
enabled=1
|
|
112
112
|
gpgcheck=1
|
|
113
113
|
repo_gpgcheck=1
|
|
114
|
-
gpgkey=https://repo.sysmd.uk/
|
|
114
|
+
gpgkey=https://repo.sysmd.uk/sysmd/sysmd.gpg
|
|
115
115
|
EOF
|
|
116
116
|
```
|
|
117
117
|
|
|
@@ -44,7 +44,7 @@ Shows how much disk space can be freed.
|
|
|
44
44
|
|
|
45
45
|
## Installation
|
|
46
46
|
|
|
47
|
-
### From
|
|
47
|
+
### From the SysMD package repository
|
|
48
48
|
|
|
49
49
|
This is the preferred method of installation.
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ This is the preferred method of installation.
|
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
sudo mkdir -p /usr/share/keyrings
|
|
57
|
-
curl -fsSL https://repo.sysmd.uk/
|
|
57
|
+
curl -fsSL https://repo.sysmd.uk/sysmd/sysmd.gpg | sudo gpg --dearmor -o /usr/share/keyrings/sysmd.gpg
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
The GPG fingerprint is `0032C71FA6A11EF9567D4434C5C06BD4603C28B1`.
|
|
@@ -62,7 +62,7 @@ The GPG fingerprint is `0032C71FA6A11EF9567D4434C5C06BD4603C28B1`.
|
|
|
62
62
|
#### 2) Add the APT source
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/
|
|
65
|
+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/sysmd.gpg] https://repo.sysmd.uk/sysmd/debian stable main" | sudo tee /etc/apt/sources.list.d/sysmd.list
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
#### 3) Update and install
|
|
@@ -77,20 +77,20 @@ sudo apt install filedust
|
|
|
77
77
|
#### 1) Import the GPG key
|
|
78
78
|
|
|
79
79
|
```
|
|
80
|
-
sudo rpm --import https://repo.sysmd.uk/
|
|
80
|
+
sudo rpm --import https://repo.sysmd.uk/sysmd/sysmd.gpg
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
#### 2) Add the repository configuration
|
|
84
84
|
|
|
85
85
|
```
|
|
86
|
-
sudo tee /etc/yum.repos.d/
|
|
87
|
-
[
|
|
88
|
-
name=
|
|
89
|
-
baseurl=https://repo.sysmd.uk/
|
|
86
|
+
sudo tee /etc/yum.repos.d/sysmd.repo > /dev/null << 'EOF'
|
|
87
|
+
[sysmd]
|
|
88
|
+
name=SysMD Repository
|
|
89
|
+
baseurl=https://repo.sysmd.uk/sysmd/rpm/$basearch
|
|
90
90
|
enabled=1
|
|
91
91
|
gpgcheck=1
|
|
92
92
|
repo_gpgcheck=1
|
|
93
|
-
gpgkey=https://repo.sysmd.uk/
|
|
93
|
+
gpgkey=https://repo.sysmd.uk/sysmd/sysmd.gpg
|
|
94
94
|
EOF
|
|
95
95
|
```
|
|
96
96
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "filedust"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.2"
|
|
4
4
|
description = "Opinionated junk cleaner for dev machines (caches, build artifacts, editor backups)."
|
|
5
5
|
authors = [{ name = "Marco D'Aleo", email = "marco@marcodaleo.com" }]
|
|
6
6
|
license = "GPL-3.0-or-later"
|
|
@@ -24,7 +24,7 @@ packages = [{ include = "filedust", from = "src" }]
|
|
|
24
24
|
[tool.poetry.group.dev.dependencies]
|
|
25
25
|
pytest = "^9.0.1"
|
|
26
26
|
pytest-cov = "^7.0.0"
|
|
27
|
-
pre-commit = "^
|
|
27
|
+
pre-commit = "^4.0.0"
|
|
28
28
|
|
|
29
29
|
[tool.black]
|
|
30
30
|
line-length = 79
|
|
@@ -189,6 +189,10 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
189
189
|
console.print(f"[red]Error:[/] Path not found: {root}")
|
|
190
190
|
return 1
|
|
191
191
|
|
|
192
|
+
if not root.is_dir():
|
|
193
|
+
console.print(f"[red]Error:[/] Not a directory: {root}")
|
|
194
|
+
return 1
|
|
195
|
+
|
|
192
196
|
print("Looking for junk ...")
|
|
193
197
|
|
|
194
198
|
if root.resolve() == Path("/"):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
+
import sys
|
|
4
5
|
import configparser
|
|
5
6
|
from dataclasses import dataclass
|
|
6
7
|
from fnmatch import fnmatch
|
|
@@ -21,7 +22,14 @@ def load_user_rules() -> UserRules:
|
|
|
21
22
|
if cfg_path.exists():
|
|
22
23
|
parser = configparser.ConfigParser(allow_no_value=True)
|
|
23
24
|
parser.optionxform = str
|
|
24
|
-
|
|
25
|
+
try:
|
|
26
|
+
parser.read(cfg_path)
|
|
27
|
+
except configparser.Error as exc:
|
|
28
|
+
print(
|
|
29
|
+
f"filedust: ignoring invalid config {cfg_path}: {exc}",
|
|
30
|
+
file=sys.stderr,
|
|
31
|
+
)
|
|
32
|
+
return rules
|
|
25
33
|
|
|
26
34
|
if parser.has_section("include"):
|
|
27
35
|
rules.include = list(parser["include"].keys())
|
|
File without changes
|
|
File without changes
|