pc-cleaner 1.0.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.
pc_cleaner/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """PC Cleaner — safe disk analysis, duplicate discovery, and reports."""
2
+
3
+ from .core import VERSION
4
+
5
+ __version__ = VERSION
pc_cleaner/cli.py ADDED
@@ -0,0 +1,64 @@
1
+ """Public command line entry point for :mod:`pc_cleaner`."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from . import __version__
8
+ from . import core
9
+
10
+
11
+ USAGE = """PC Cleaner - safe disk analyzer and cleanup advisor
12
+
13
+ Usage:
14
+ pc-cleaner Open the interactive terminal UI
15
+ pc-cleaner tui Open the interactive terminal UI
16
+ pc-cleaner scan [SCAN OPTIONS] Run a scan and write reports
17
+ pc-cleaner report --from-db DB Regenerate reports from a saved scan DB
18
+
19
+ Examples:
20
+ pc-cleaner
21
+ pc-cleaner scan --drive D --open
22
+ pc-cleaner scan --path "D:\\Projects" --no-dups
23
+ pc-cleaner report --from-db .scan_tmp_20261008_055421.db
24
+
25
+ Safety: PC Cleaner is read-only. It finds reclaimable data but never deletes it.
26
+ """
27
+
28
+
29
+ def _scan_help() -> int:
30
+ core.build_argparser().print_help()
31
+ return 0
32
+
33
+
34
+ def main(argv: list[str] | None = None) -> int:
35
+ args = list(sys.argv[1:] if argv is None else argv)
36
+ if not args or args[0] in {"tui", "ui"}:
37
+ from .tui import run_tui
38
+ return run_tui(args[1:])
39
+ if args[0] in {"-h", "--help", "help"}:
40
+ print(USAGE)
41
+ return 0
42
+ if args[0] in {"-V", "--version"}:
43
+ print("pc-cleaner %s" % __version__)
44
+ return 0
45
+ if args[0] == "scan":
46
+ if len(args) > 1 and args[1] in {"-h", "--help"}:
47
+ return _scan_help()
48
+ return core.main(args[1:])
49
+ if args[0] == "report":
50
+ if len(args) > 1 and args[1] in {"-h", "--help"}:
51
+ return _scan_help()
52
+ return core.main(args[1:])
53
+
54
+ # Preserve convenience for existing users: `pc-cleaner --drive D` works.
55
+ if args[0].startswith("-"):
56
+ return core.main(args)
57
+
58
+ print("Unknown command: %s\n" % args[0], file=sys.stderr)
59
+ print(USAGE, file=sys.stderr)
60
+ return 2
61
+
62
+
63
+ if __name__ == "__main__":
64
+ raise SystemExit(main())