Skip to content

Commit aa7a45c

Browse files
authored
Improve documentation (#281)
1 parent 3d6efc6 commit aa7a45c

File tree

2 files changed

+867
-329
lines changed

2 files changed

+867
-329
lines changed

docs/faq_general.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,43 @@ Lychee supports major image formats, and since version 3.2.1 some video formats
1010

1111
If you're uploading video files, make sure to increase your upload limits in `php.ini`. See the [Installation](installation.html) section for more information.
1212

13+
### How to mass import photos?
14+
15+
Lychee supports mass import of photos via the command line. You can use the following command to import photos from a given path:
16+
17+
```bash
18+
php artisan lychee:sync /path/to/import
19+
```
20+
21+
This command will import all photos from the specified path, creating albums for each folder and subfolder. You can also specify an album ID to import photos into a specific album:
22+
23+
```bash
24+
php artisan lychee:sync /path/to/import --album_id="album ID"
25+
```
26+
27+
If you want to do this within docker, then we recommend you mount the volume containing the photos to be imported to a temporary location in the container, for example `/tmp/import`, and then run the command:
28+
29+
```bash
30+
docker exec -it <container_name> php artisan lychee:sync /tmp/import
31+
```
32+
33+
This will create an album `import` in which all the photos will be imported. You can then move the photos to the desired albums using the web interface. Note that this import is recursive, so any subfolders will be imported as subalbums.
34+
35+
Note that `lychee:sync` has a few options:
36+
37+
- `--album_id[=ALBUM_ID]`: Album ID to import to.
38+
- `--owner_id[=OWNER_ID]`: Owner ID of imported photos [default: "1"]
39+
- `--resync_metadata[=RESYNC_METADATA]`: Re-sync metadata of existing files [default: "1"]
40+
- `--delete_imported[=DELETE_IMPORTED]`: Delete the original files [default: "1"]
41+
- `--import_via_symlink[=IMPORT_VIA_SYMLINK]`: Import photos via symlink instead of copying the files [default: "0"]
42+
- `--skip_duplicates[=SKIP_DUPLICATES]`: Skip photos and albums if they already exist in the gallery [default: "0"]
43+
- `--delete_missing_photos[=DELETE_MISSING_PHOTOS]`: Delete photos in the album that are not present in the synced directory [default: "0"]
44+
- `--delete_missing_albums[=DELETE_MISSING_ALBUMS]`: Delete albums in the parent album that are not present in the synced directory [default: "0"]
45+
- `--dry_run[=DRY_RUN]`: Run the delete photos process but do not make any changes [default: "1"]
46+
47+
We strongly recommend to specify those or at least run `php artisan lychee:sync --help` to understand the default values of those options as they are specified with your configuration. The `--delete_xxx` can have disastrous consequences if you are not careful.
48+
49+
1350
### What is new?
1451

1552
Take a look at the [Release Notes](releases.html) to see what's new.

0 commit comments

Comments
 (0)