lrclean 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.
- lrclean-0.1.0/LICENSE +21 -0
- lrclean-0.1.0/PKG-INFO +156 -0
- lrclean-0.1.0/README.md +138 -0
- lrclean-0.1.0/lrclean/__init__.py +0 -0
- lrclean-0.1.0/lrclean/__main__.py +5 -0
- lrclean-0.1.0/lrclean/backup.py +385 -0
- lrclean-0.1.0/lrclean/backup_plan.py +376 -0
- lrclean-0.1.0/lrclean/backup_verify.py +98 -0
- lrclean-0.1.0/lrclean/backups.py +193 -0
- lrclean-0.1.0/lrclean/catalog_views.py +235 -0
- lrclean-0.1.0/lrclean/catalogs.py +353 -0
- lrclean-0.1.0/lrclean/classify.py +256 -0
- lrclean-0.1.0/lrclean/cli.py +860 -0
- lrclean-0.1.0/lrclean/copies.py +259 -0
- lrclean-0.1.0/lrclean/copy_out.py +79 -0
- lrclean-0.1.0/lrclean/file_views.py +196 -0
- lrclean-0.1.0/lrclean/hashing.py +113 -0
- lrclean-0.1.0/lrclean/inventory.py +164 -0
- lrclean-0.1.0/lrclean/mover_check.py +206 -0
- lrclean-0.1.0/lrclean/mover_files.py +55 -0
- lrclean-0.1.0/lrclean/mover_gate.py +178 -0
- lrclean-0.1.0/lrclean/mover_journal.py +190 -0
- lrclean-0.1.0/lrclean/mover_list.py +139 -0
- lrclean-0.1.0/lrclean/mover_purge.py +166 -0
- lrclean-0.1.0/lrclean/mover_seams.py +143 -0
- lrclean-0.1.0/lrclean/mover_stage.py +211 -0
- lrclean-0.1.0/lrclean/mover_undo.py +118 -0
- lrclean-0.1.0/lrclean/paths.py +76 -0
- lrclean-0.1.0/lrclean/reject_archive.py +94 -0
- lrclean-0.1.0/lrclean/reject_out.py +126 -0
- lrclean-0.1.0/lrclean/reject_twin.py +88 -0
- lrclean-0.1.0/lrclean/rejects.py +387 -0
- lrclean-0.1.0/lrclean/report.py +174 -0
- lrclean-0.1.0/lrclean/store.py +119 -0
- lrclean-0.1.0/lrclean/verdict_views.py +60 -0
- lrclean-0.1.0/lrclean.egg-info/PKG-INFO +156 -0
- lrclean-0.1.0/lrclean.egg-info/SOURCES.txt +78 -0
- lrclean-0.1.0/lrclean.egg-info/dependency_links.txt +1 -0
- lrclean-0.1.0/lrclean.egg-info/entry_points.txt +2 -0
- lrclean-0.1.0/lrclean.egg-info/top_level.txt +1 -0
- lrclean-0.1.0/pyproject.toml +43 -0
- lrclean-0.1.0/setup.cfg +4 -0
- lrclean-0.1.0/tests/test_backup.py +1241 -0
- lrclean-0.1.0/tests/test_backup_plan.py +213 -0
- lrclean-0.1.0/tests/test_backup_select.py +485 -0
- lrclean-0.1.0/tests/test_backup_summary.py +132 -0
- lrclean-0.1.0/tests/test_backup_verify.py +186 -0
- lrclean-0.1.0/tests/test_backups.py +271 -0
- lrclean-0.1.0/tests/test_catalog_images.py +255 -0
- lrclean-0.1.0/tests/test_catalog_views.py +301 -0
- lrclean-0.1.0/tests/test_catalogs.py +571 -0
- lrclean-0.1.0/tests/test_classify.py +480 -0
- lrclean-0.1.0/tests/test_cli.py +2481 -0
- lrclean-0.1.0/tests/test_copies.py +418 -0
- lrclean-0.1.0/tests/test_copy_out.py +166 -0
- lrclean-0.1.0/tests/test_e2e.py +1049 -0
- lrclean-0.1.0/tests/test_file_views.py +261 -0
- lrclean-0.1.0/tests/test_hashing.py +325 -0
- lrclean-0.1.0/tests/test_inventory.py +375 -0
- lrclean-0.1.0/tests/test_mover_check.py +464 -0
- lrclean-0.1.0/tests/test_mover_files.py +165 -0
- lrclean-0.1.0/tests/test_mover_gate.py +423 -0
- lrclean-0.1.0/tests/test_mover_journal.py +401 -0
- lrclean-0.1.0/tests/test_mover_list.py +282 -0
- lrclean-0.1.0/tests/test_mover_purge.py +703 -0
- lrclean-0.1.0/tests/test_mover_seams.py +412 -0
- lrclean-0.1.0/tests/test_mover_stage.py +718 -0
- lrclean-0.1.0/tests/test_mover_undo.py +357 -0
- lrclean-0.1.0/tests/test_mover_world.py +261 -0
- lrclean-0.1.0/tests/test_paths.py +113 -0
- lrclean-0.1.0/tests/test_reject_archive.py +297 -0
- lrclean-0.1.0/tests/test_reject_out.py +318 -0
- lrclean-0.1.0/tests/test_reject_twin.py +324 -0
- lrclean-0.1.0/tests/test_rejects.py +324 -0
- lrclean-0.1.0/tests/test_rejects_lift.py +332 -0
- lrclean-0.1.0/tests/test_rejects_verdicts.py +783 -0
- lrclean-0.1.0/tests/test_report.py +189 -0
- lrclean-0.1.0/tests/test_store.py +189 -0
- lrclean-0.1.0/tests/test_synth.py +237 -0
- lrclean-0.1.0/tests/test_verdict_views.py +107 -0
lrclean-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Peter Wiercioch
|
|
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.
|
lrclean-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lrclean
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Free a full photo drive without losing a photo or breaking a Lightroom Classic catalog.
|
|
5
|
+
Author: Peter Wiercioch
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pterw/lrclean
|
|
8
|
+
Project-URL: Issues, https://github.com/pterw/lrclean/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/pterw/lrclean/blob/main/CHANGELOG.md
|
|
10
|
+
Keywords: lightroom-classic,photography,photo-management,deduplication,duplicate-files,backup,raw-photos,digital-asset-management,python,cli,windows
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Python: >=3.13
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
<p align="center"><picture>
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/lrclean-logo-dark.svg">
|
|
21
|
+
<img src="docs/assets/lrclean-logo-light.svg" alt="LrClean" width="420">
|
|
22
|
+
</picture></p>
|
|
23
|
+
|
|
24
|
+
<p align="center"><strong>Free a full photo drive without losing a photo or breaking a Lightroom Classic catalog.</strong></p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://github.com/pterw/lrclean/actions/workflows/ci.yml"><img src="https://github.com/pterw/lrclean/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://github.com/pterw/lrclean/releases/latest"><img src="https://img.shields.io/github/v/release/pterw/lrclean" alt="Latest release"></a> <img src="https://img.shields.io/badge/python-3.13-blue" alt="Python 3.13">
|
|
28
|
+
<img src="https://img.shields.io/badge/platform-Windows-blue" alt="Windows"> <img src="https://img.shields.io/badge/dependencies-none-brightgreen" alt="No dependencies"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT"></a>
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<a href="#what-it-is">What it is</a> · <a href="#how-it-keeps-your-photos-safe">Safety</a> · <a href="#quick-start">Quick start</a> · <a href="#the-phases">Phases</a> · <a href="#before-a-real-run">Before a real run</a> · <a href="#tested-with">Tested with</a> · <a href="#limits-and-the-rest">Limits</a> · <a href="docs/guide.md">Guide</a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
## What it is
|
|
36
|
+
|
|
37
|
+
`lrclean` is a command-line tool that finds the files on a full drive that one large Lightroom Classic catalog, and
|
|
38
|
+
many small per-shoot catalogs, point at. It reads copies of the catalogs, never the originals. It copies every photo
|
|
39
|
+
folder to two archive drives and verifies each copy byte for byte. It decides, file by file and with the evidence
|
|
40
|
+
written down, which rejects and which byte-identical unrecorded copies can leave the disk. It then moves them off in
|
|
41
|
+
two steps, the first reversible. Lightroom's own duplicate finder only sees photos in the open catalog; nothing in
|
|
42
|
+
Lightroom compares the files on disk with several catalogs and with the backups at once, and that is the gap this
|
|
43
|
+
tool fills.
|
|
44
|
+
|
|
45
|
+
**Who it is for:** a photographer with a backlog of raw files and JPEGs, many catalogs, duplicates across them, and a
|
|
46
|
+
full drive.
|
|
47
|
+
|
|
48
|
+
## How it keeps your photos safe
|
|
49
|
+
|
|
50
|
+
- **Catalogs are never written.** They are copied and read there; removing a photo from a catalog is done by you,
|
|
51
|
+
in Lightroom.
|
|
52
|
+
- **Nothing leaves the drive without a verified copy on each of two archive volumes** (separate drive letters and
|
|
53
|
+
volume serials; that they are separate physical drives is yours to check, see
|
|
54
|
+
[Before a real run](#before-a-real-run)).
|
|
55
|
+
- **Every removal is from a list approved by its SHA-256.**
|
|
56
|
+
- **Every removal is staged first, and `undo` works until the `purge`.**
|
|
57
|
+
- **Online-only placeholders are never opened.**
|
|
58
|
+
|
|
59
|
+
The rules in full are in [the guide](docs/guide.md#the-rules-in-detail).
|
|
60
|
+
|
|
61
|
+
## Quick start
|
|
62
|
+
|
|
63
|
+
Windows, Python 3.13.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
pipx install lrclean
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Make a tool folder outside your photo folders, make a `work` folder inside it, and write `work/config.json` there.
|
|
70
|
+
These are the nine required keys, with made-up values (`archive_roots`, two folders on two archive drives, is added
|
|
71
|
+
before the backup phase):
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"library_roots": ["C:\\"],
|
|
76
|
+
"photo_root": "C:\\Photos",
|
|
77
|
+
"catalog_roots": ["C:\\Photos"],
|
|
78
|
+
"backup_roots": ["E:\\Old-backup"],
|
|
79
|
+
"live_catalog": "C:\\Photos\\Main\\Main.lrcat",
|
|
80
|
+
"old_states": [],
|
|
81
|
+
"excluded_catalogs": [],
|
|
82
|
+
"exclude": [],
|
|
83
|
+
"group_depth": 1
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`--base` defaults to the current folder, so run from the tool folder or put `--base <tool folder>` before the
|
|
88
|
+
command: `lrclean --base <tool folder> report`. Close Lightroom, then run the read-only report. It writes only inside
|
|
89
|
+
the tool folder (`work/` and `out/`):
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
lrclean catalogs
|
|
93
|
+
lrclean inventory
|
|
94
|
+
lrclean hash
|
|
95
|
+
lrclean report
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Read `out/summary.md` first. It gives counts per section; the files themselves are listed in the numbered CSV files
|
|
99
|
+
beside it (for example `08_missing.csv`). Every key and command is in
|
|
100
|
+
[the guide](docs/guide.md#configuration-workconfigjson).
|
|
101
|
+
|
|
102
|
+
## The phases
|
|
103
|
+
|
|
104
|
+
Each is its own phase; the step-by-step is in [the guide](docs/guide.md#the-process-end-to-end).
|
|
105
|
+
|
|
106
|
+
1. **Report.** Reads every catalog it can find (from copies), walks the photo drive, hashes files and reports what each file is.
|
|
107
|
+
2. **Backup.** Copies every photo and video folder to two archive drives from a list you approve, and verifies every copy.
|
|
108
|
+
3. **Reject check.** After you cull in Lightroom, decides which rejects can safely leave and writes a removal list.
|
|
109
|
+
4. **Unrecorded copies.** Lists byte-identical copies that no catalog records: a second removal list, in the same format.
|
|
110
|
+
5. **Offload.** `stage` (a reversible move into a staging folder, with `undo`), then `purge` (a permanent delete, after everything is checked again).
|
|
111
|
+
|
|
112
|
+
## Before a real run
|
|
113
|
+
|
|
114
|
+
These checks are made by hand today:
|
|
115
|
+
|
|
116
|
+
- Lightroom is closed, and the sync client is stopped.
|
|
117
|
+
- The archive drives are identified by label and serial, and are two separate physical drives.
|
|
118
|
+
- `catalogs`, `inventory`, `hash` and `backup-verify` were run again just before this run, with both archive drives
|
|
119
|
+
connected.
|
|
120
|
+
- `catalog_roots` is compared with the drives and folders you use.
|
|
121
|
+
- No junction or substituted drive points into `photo_root` from a path a catalog root uses.
|
|
122
|
+
- The list's configuration is not edited between `copies` and the last `stage`.
|
|
123
|
+
- The set of paths the main catalog records that are missing is taken before `stage` and after each
|
|
124
|
+
`stage --apply`, and is unchanged: a newly missing path means you stop and look
|
|
125
|
+
before going on.
|
|
126
|
+
|
|
127
|
+
## Tested with
|
|
128
|
+
|
|
129
|
+
Windows 11 and Python 3.13. The catalog format numbers the work database has recorded so far are six: 0600008,
|
|
130
|
+
0700003, 1303001, 1400000, 1500000 and 1504001 (an example from one library). Older formats are untested, not known
|
|
131
|
+
to fail.
|
|
132
|
+
|
|
133
|
+
## Working with an AI assistant and the Lightroom plug-in
|
|
134
|
+
|
|
135
|
+
[`AGENTS.md`](AGENTS.md) holds the rules for an AI assistant that works on the code.
|
|
136
|
+
|
|
137
|
+
On the first library, a third-party Lightroom plug-in (an MCP server; MIT) was used for work that is otherwise done
|
|
138
|
+
by hand, photo by photo: flagging duplicates as rejects only after every catalog had been checked for develop work
|
|
139
|
+
and picks; giving both copies of a duplicate the union of their keywords; and removing the records of purged files
|
|
140
|
+
from the per-shoot catalogs by id, each write proved by counts before and after.
|
|
141
|
+
|
|
142
|
+
- `lrclean` never needs the plug-in and never talks to it.
|
|
143
|
+
- When it is used, previews and metadata go to the model: pin a version that has been read, and keep removals behind
|
|
144
|
+
a confirmation.
|
|
145
|
+
|
|
146
|
+
## Limits and the rest
|
|
147
|
+
|
|
148
|
+
- `purge` cannot be undone: only the two archive copies remain.
|
|
149
|
+
- A sync client deletes the cloud copy of a file that is moved out of a synced folder.
|
|
150
|
+
- Windows only.
|
|
151
|
+
- Lightroom's catalog format is private; a future version could change the tables the tool reads.
|
|
152
|
+
|
|
153
|
+
How long a pass takes depends on the drives and on how much is read again; the guide's
|
|
154
|
+
[Limits](docs/guide.md#limits) gives one example. Roadmap: the [0.2 milestone](https://github.com/pterw/lrclean/milestones).
|
|
155
|
+
How it was built: [`docs/process/README.md`](docs/process/README.md). Licence: [MIT](LICENSE).
|
|
156
|
+
`lrclean` is an independent project, not made or endorsed by Adobe.
|
lrclean-0.1.0/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<p align="center"><picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/lrclean-logo-dark.svg">
|
|
3
|
+
<img src="docs/assets/lrclean-logo-light.svg" alt="LrClean" width="420">
|
|
4
|
+
</picture></p>
|
|
5
|
+
|
|
6
|
+
<p align="center"><strong>Free a full photo drive without losing a photo or breaking a Lightroom Classic catalog.</strong></p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://github.com/pterw/lrclean/actions/workflows/ci.yml"><img src="https://github.com/pterw/lrclean/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://github.com/pterw/lrclean/releases/latest"><img src="https://img.shields.io/github/v/release/pterw/lrclean" alt="Latest release"></a> <img src="https://img.shields.io/badge/python-3.13-blue" alt="Python 3.13">
|
|
10
|
+
<img src="https://img.shields.io/badge/platform-Windows-blue" alt="Windows"> <img src="https://img.shields.io/badge/dependencies-none-brightgreen" alt="No dependencies"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="#what-it-is">What it is</a> · <a href="#how-it-keeps-your-photos-safe">Safety</a> · <a href="#quick-start">Quick start</a> · <a href="#the-phases">Phases</a> · <a href="#before-a-real-run">Before a real run</a> · <a href="#tested-with">Tested with</a> · <a href="#limits-and-the-rest">Limits</a> · <a href="docs/guide.md">Guide</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
## What it is
|
|
18
|
+
|
|
19
|
+
`lrclean` is a command-line tool that finds the files on a full drive that one large Lightroom Classic catalog, and
|
|
20
|
+
many small per-shoot catalogs, point at. It reads copies of the catalogs, never the originals. It copies every photo
|
|
21
|
+
folder to two archive drives and verifies each copy byte for byte. It decides, file by file and with the evidence
|
|
22
|
+
written down, which rejects and which byte-identical unrecorded copies can leave the disk. It then moves them off in
|
|
23
|
+
two steps, the first reversible. Lightroom's own duplicate finder only sees photos in the open catalog; nothing in
|
|
24
|
+
Lightroom compares the files on disk with several catalogs and with the backups at once, and that is the gap this
|
|
25
|
+
tool fills.
|
|
26
|
+
|
|
27
|
+
**Who it is for:** a photographer with a backlog of raw files and JPEGs, many catalogs, duplicates across them, and a
|
|
28
|
+
full drive.
|
|
29
|
+
|
|
30
|
+
## How it keeps your photos safe
|
|
31
|
+
|
|
32
|
+
- **Catalogs are never written.** They are copied and read there; removing a photo from a catalog is done by you,
|
|
33
|
+
in Lightroom.
|
|
34
|
+
- **Nothing leaves the drive without a verified copy on each of two archive volumes** (separate drive letters and
|
|
35
|
+
volume serials; that they are separate physical drives is yours to check, see
|
|
36
|
+
[Before a real run](#before-a-real-run)).
|
|
37
|
+
- **Every removal is from a list approved by its SHA-256.**
|
|
38
|
+
- **Every removal is staged first, and `undo` works until the `purge`.**
|
|
39
|
+
- **Online-only placeholders are never opened.**
|
|
40
|
+
|
|
41
|
+
The rules in full are in [the guide](docs/guide.md#the-rules-in-detail).
|
|
42
|
+
|
|
43
|
+
## Quick start
|
|
44
|
+
|
|
45
|
+
Windows, Python 3.13.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
pipx install lrclean
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Make a tool folder outside your photo folders, make a `work` folder inside it, and write `work/config.json` there.
|
|
52
|
+
These are the nine required keys, with made-up values (`archive_roots`, two folders on two archive drives, is added
|
|
53
|
+
before the backup phase):
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"library_roots": ["C:\\"],
|
|
58
|
+
"photo_root": "C:\\Photos",
|
|
59
|
+
"catalog_roots": ["C:\\Photos"],
|
|
60
|
+
"backup_roots": ["E:\\Old-backup"],
|
|
61
|
+
"live_catalog": "C:\\Photos\\Main\\Main.lrcat",
|
|
62
|
+
"old_states": [],
|
|
63
|
+
"excluded_catalogs": [],
|
|
64
|
+
"exclude": [],
|
|
65
|
+
"group_depth": 1
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`--base` defaults to the current folder, so run from the tool folder or put `--base <tool folder>` before the
|
|
70
|
+
command: `lrclean --base <tool folder> report`. Close Lightroom, then run the read-only report. It writes only inside
|
|
71
|
+
the tool folder (`work/` and `out/`):
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
lrclean catalogs
|
|
75
|
+
lrclean inventory
|
|
76
|
+
lrclean hash
|
|
77
|
+
lrclean report
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Read `out/summary.md` first. It gives counts per section; the files themselves are listed in the numbered CSV files
|
|
81
|
+
beside it (for example `08_missing.csv`). Every key and command is in
|
|
82
|
+
[the guide](docs/guide.md#configuration-workconfigjson).
|
|
83
|
+
|
|
84
|
+
## The phases
|
|
85
|
+
|
|
86
|
+
Each is its own phase; the step-by-step is in [the guide](docs/guide.md#the-process-end-to-end).
|
|
87
|
+
|
|
88
|
+
1. **Report.** Reads every catalog it can find (from copies), walks the photo drive, hashes files and reports what each file is.
|
|
89
|
+
2. **Backup.** Copies every photo and video folder to two archive drives from a list you approve, and verifies every copy.
|
|
90
|
+
3. **Reject check.** After you cull in Lightroom, decides which rejects can safely leave and writes a removal list.
|
|
91
|
+
4. **Unrecorded copies.** Lists byte-identical copies that no catalog records: a second removal list, in the same format.
|
|
92
|
+
5. **Offload.** `stage` (a reversible move into a staging folder, with `undo`), then `purge` (a permanent delete, after everything is checked again).
|
|
93
|
+
|
|
94
|
+
## Before a real run
|
|
95
|
+
|
|
96
|
+
These checks are made by hand today:
|
|
97
|
+
|
|
98
|
+
- Lightroom is closed, and the sync client is stopped.
|
|
99
|
+
- The archive drives are identified by label and serial, and are two separate physical drives.
|
|
100
|
+
- `catalogs`, `inventory`, `hash` and `backup-verify` were run again just before this run, with both archive drives
|
|
101
|
+
connected.
|
|
102
|
+
- `catalog_roots` is compared with the drives and folders you use.
|
|
103
|
+
- No junction or substituted drive points into `photo_root` from a path a catalog root uses.
|
|
104
|
+
- The list's configuration is not edited between `copies` and the last `stage`.
|
|
105
|
+
- The set of paths the main catalog records that are missing is taken before `stage` and after each
|
|
106
|
+
`stage --apply`, and is unchanged: a newly missing path means you stop and look
|
|
107
|
+
before going on.
|
|
108
|
+
|
|
109
|
+
## Tested with
|
|
110
|
+
|
|
111
|
+
Windows 11 and Python 3.13. The catalog format numbers the work database has recorded so far are six: 0600008,
|
|
112
|
+
0700003, 1303001, 1400000, 1500000 and 1504001 (an example from one library). Older formats are untested, not known
|
|
113
|
+
to fail.
|
|
114
|
+
|
|
115
|
+
## Working with an AI assistant and the Lightroom plug-in
|
|
116
|
+
|
|
117
|
+
[`AGENTS.md`](AGENTS.md) holds the rules for an AI assistant that works on the code.
|
|
118
|
+
|
|
119
|
+
On the first library, a third-party Lightroom plug-in (an MCP server; MIT) was used for work that is otherwise done
|
|
120
|
+
by hand, photo by photo: flagging duplicates as rejects only after every catalog had been checked for develop work
|
|
121
|
+
and picks; giving both copies of a duplicate the union of their keywords; and removing the records of purged files
|
|
122
|
+
from the per-shoot catalogs by id, each write proved by counts before and after.
|
|
123
|
+
|
|
124
|
+
- `lrclean` never needs the plug-in and never talks to it.
|
|
125
|
+
- When it is used, previews and metadata go to the model: pin a version that has been read, and keep removals behind
|
|
126
|
+
a confirmation.
|
|
127
|
+
|
|
128
|
+
## Limits and the rest
|
|
129
|
+
|
|
130
|
+
- `purge` cannot be undone: only the two archive copies remain.
|
|
131
|
+
- A sync client deletes the cloud copy of a file that is moved out of a synced folder.
|
|
132
|
+
- Windows only.
|
|
133
|
+
- Lightroom's catalog format is private; a future version could change the tables the tool reads.
|
|
134
|
+
|
|
135
|
+
How long a pass takes depends on the drives and on how much is read again; the guide's
|
|
136
|
+
[Limits](docs/guide.md#limits) gives one example. Roadmap: the [0.2 milestone](https://github.com/pterw/lrclean/milestones).
|
|
137
|
+
How it was built: [`docs/process/README.md`](docs/process/README.md). Licence: [MIT](LICENSE).
|
|
138
|
+
`lrclean` is an independent project, not made or endorsed by Adobe.
|
|
File without changes
|