Skip to content

Commit bcab08b

Browse files
author
Mathis Koblin
committed
Updated readme
1 parent 7010c17 commit bcab08b

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,36 @@ php vendor/bin/typo3 unduplicate:sysfile --update-refindex --dry-run
4040
# for real
4141
php vendor/bin/typo3 unduplicate:sysfile -n
4242
```
43-
Options:
44-
* `--dry-run` | `-d` only shows the duplicates, but does not update the database.
45-
* `--storage` | `-s` only consider duplicates in the given storage.
46-
* `--identifier` | `-i` only consider duplicates with the given identifier.
47-
* `--meta-fields` | `-m` check for conflicting metadata fields, see below.
48-
* `--no-interaction` | `-n` do not ask for the update of the reference index.
49-
* `--update-refindex` | `-u` update the reference index before the operation.
43+
### Options
44+
45+
| Option | Alias | Description |
46+
| --- | --- |---------------------------------------------------------------------------------------------------------------------------------------|
47+
| `--dry-run` | `-d` | Only shows the duplicates, but does not update the database. |
48+
| `--identifier` | `-i` | Only consider duplicates with the given identifier. |
49+
| `--storage` | `-s` | Only consider duplicates in the given storage. |
50+
| `--force` | `-f` | Enforce keeping or overwriting of metadata of the master record in case of conflict. Possible values: keep, keep-nonempty, overwrite. |
51+
| `--keep-oldest` | `-o` | Use the oldest record as master instead of the newest. |
52+
| `--meta-fields` | `-m` | Check for conflicting metadata fields, see below. |
53+
| `--update-refindex` | `-u` | Update the reference index before the operation. |
54+
| `--no-interaction` | `-n` | Do not ask for the update of the reference index. |
5055

5156
Run another reference index update when you are done:
5257
```
5358
php vendor/bin/typo3 referenceindex:update
5459
```
5560

56-
Example: if you want to run the unduplicator only for a specific storage or even identifier (found by dry-run):
61+
### Examples
5762

58-
```
59-
php vendor/bin/typo3 unduplicate:sysfile --storage <storage> --identifier <"identifier">
63+
```bash
64+
# run for a specific storage and identifier
65+
php vendor/bin/typo3 unduplicate:sysfile --storage 1 --identifier "/user_upload/duplicate.jpg"
6066

61-
# For example:
62-
php vendor/bin/typo3 unduplicate:sysfile --storage 1 --identifier "/user_upload/duplicate.jpg"
67+
# `--keep-oldest` can be used in conjunction with `--force keep` to keep the oldest entries as they are and delete all others
68+
php vendor/bin/typo3 unduplicate:sysfile -n --force keep --keep-oldest
6369
```
6470

6571
> **Note**
6672
> For non-composer-mode the path to the CLI script is `typo3/sysext/core/bin/typo3`
67-
>
68-
>
6973
7074
## How the duplicate check is done
7175

0 commit comments

Comments
 (0)