Skip to content

Commit

Permalink
Simulot/issue205 (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
simulot committed Mar 29, 2024
1 parent 9c62473 commit 6634a2a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 49 deletions.
8 changes: 8 additions & 0 deletions docs/releases.md
Expand Up @@ -2,6 +2,14 @@

## Release 0.13.1

### Improvement: [#195](https://github.com/simulot/immich-go/issues/195) Rethink the user interactions with the CLI application #195

#### Use Bubble Tea library to provide a modern TUI (Terminal User Interface)


### API KEY self provisioning
When the server and the API keys aren't given on the command line, immich-go ask the user if he wants to get a key from a server, and saves it the configuration file.

### Fix [#199](https://github.com/simulot/immich-go/issues/199)

## Release 0.13.0
Expand Down
107 changes: 58 additions & 49 deletions readme.md
Expand Up @@ -40,26 +40,35 @@ For insights into the reasoning behind this alternative to `immich-cli`, please

# Executing `immich-go`
The `immich-go` is a command line tool.
The `immich-go` is a command line tool that must be run from a terminal window.
The `immich-go` program uses the Immich API. Hence it need the server address and a valid API key.


```sh
immich-go -server URL -key KEY -general_options COMMAND -command_options... {files}
```

| **Parameter** | **Description** | **Default value** |
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| `-use-configuration=path/to/config/file` | Specifies the configuration file to use. <br>Server URL and the API key are stored into the immich-go configuration file. They can be omitted for the next runs. | `$HOME/.immich-go/immich-go.json` |
| `-server URL` | URL of the Immich service, example http://<your-ip>:2283 or https://your-domain | |
| `-api URL` | URL of the Immich api endpoint (http://container_ip:3301) | |
| `-device-uuid VALUE` | Force the device identification | `$HOSTNAME` |
| `-skip-verify-ssl <bool>` | Skip SSL verification for use with self-signed certificates | `false` |
| `-key KEY` | A key generated by the user. Uploaded photos will belong to the key's owner. | |
| `-no-colors-log` | Remove color codes from logs. | |
| `-log-level` | Adjust the log verbosity as follows: <br> - `ERROR`: Display only errors <br> - `WARNING`: Same as previous one plus non blocking error <br> - `OK`: Same as previous plus actions <br> - `INFO`: Same as previous one plus progressions | `OK` |
| `-log-file=file` | Write all messages to a file | |
| `-time-zone=time_zone_name` | Set the time zone | |

> Boolean options have a default value indicated below. Mentioning any option on the common line changes the option to TRUE.
>To force an option to FALSE, use the following syntax: `-option=FALSE`.
>
>Example: Immich-go check the server's SSL certificate. you can disable this behavior by turning on the `skip-verify-ssl` option. Just add `-skip-verify-ssl`.
>`-skip-verify-ssl` is equivalent to `-skip-verify-ssl=TRUE`. To turn off the feature (which is the default behavior), use `-skip-verify-ssl=FALSE`


| **Parameter** | **Description** | **Default value** |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `-use-configuration=path/to/config/file` | Specifies the configuration file to use. <br>Server URL and the API key are stored into the immich-go configuration file. They can be omitted for the next runs. | `$HOME/.immich-go/immich-go.json` |
| `-server=URL` | URL of the Immich service, example http://<your-ip>:2283 or https://your-domain | |
| `-api=URL` | URL of the Immich api endpoint (http://container_ip:3301) | |
| `-device-uuid=VALUE` | Force the device identification | `$HOSTNAME` |
| `-skip-verify-ssl` | Skip SSL verification for use with self-signed certificates | `false` |
| `-key=KEY` | A key generated by the user. Uploaded photos will belong to the key's owner. | |
| `-no-colors-log` | Remove color codes from logs. | `TRUE` on Windows, `FALSE` otherwise |
| `-log-level=LEVEL` | Adjust the log verbosity as follows: <br> - `ERROR`: Display only errors <br> - `WARNING`: Same as previous one plus non blocking error <br> - `OK`: Same as previous plus actions <br> - `INFO`: Same as previous one plus progressions | `OK` |
| `-log-file=file` | Write all messages to a file | |
| `-time-zone=time_zone_name` | Set the time zone | the system's time zone |



Expand All @@ -69,43 +78,43 @@ Use this command for uploading photos and videos from a local directory, a zippe

### Switches and options:

| **Parameter** | **Description** | **Default value** |
|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|-------------------|
| `-album "ALBUM NAME"` | Import assets into the Immich album `ALBUM NAME`. | |
| `-dry-run` | Preview all actions as they would be done. | |
| `-create-album-folder <bool>` | Generate immich albums after folder names. | `FALSE` |
| `-force-sidecar <bool>` | Force sending a .xmp sidecar file beside images. With Google photos date and GPS coordinates are taken from metadata.json files. | `FALSE` |
| `-create-stacks <bool>` | Stack jpg/raw or bursts. | `TRUE` |
| `-stack-jpg-raw <bool>` | Control the stacking of jpg/raw photos. | `TRUE` |
| `-stack-burst <bool>` | Control the stacking bursts. | `TRUE` |
| `-select-types .ext,.ext,.ext...` | List of accepted extensions. |
| `-exclude-types .ext,.ext,.ext...` | List of excluded extensions. |
| <code>-when-no-date FILE&#124;NOW</code> | When the date of take can't be determined, use the FILE's date or the current time NOW. | `FILE` |
| **Parameter** | **Description** | **Default value** |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| `-album="ALBUM NAME"` | Import assets into the Immich album `ALBUM NAME`. | |
| `-dry-run` | Preview all actions as they would be done. | `FALSE` |
| `-create-album-folder>` | Generate immich albums after folder names. | `FALSE` |
| `-force-sidecar ` | Force sending a .xmp sidecar file beside images. With Google photos date and GPS coordinates are taken from metadata.json files to creates an XMP file and. | `FALSE` |
| `-create-stacks` | Stack jpg/raw or bursts. | `TRUE` |
| `-stack-jpg-raw` | Control the stacking of jpg/raw photos. | `TRUE` |
| `-stack-burst` | Control the stacking bursts. | `TRUE` |
| `-select-types=".ext,.ext,.ext..."` | List of accepted extensions. | |
| `-exclude-types=".ext,.ext,.ext..."` | List of excluded extensions. | |
| `-when-no-date=FILE\|NOW` | When the date of take can't be determined, use the FILE's date or the current time NOW. | `FILE` |


### Date selection:
Fine-tune import based on specific dates:

| **Parameter** | **Description** |
|-------------------------------|------------------------------------------------|
| `-date YYYY-MM-DD` | import photos taken on a particular day. |
| `-date YYYY-MM` | select photos taken during a particular month. |
| `-date YYYY` | select photos taken during a particular year. |
| **Parameter** | **Description** |
| ------------------ | ---------------------------------------------- |
| `-date=YYYY-MM-DD` | import photos taken on a particular day. |
| `-date=YYYY-MM` | select photos taken during a particular month. |
| `-date=YYYY` | select photos taken during a particular year. |


### Google photos options:
Specialized options for Google Photos management:

| **Parameter** | **Description** | **Default value** |
|------------------------------------|----------------------------------------------------------------------------------|-------------------|
| `-google-photos` | import from a Google Photos structured archive, recreating corresponding albums. |
| `-from-album "GP Album"` | Create the album in `immich` and import album's assets. |
| `-create-albums <bool>` | Controls creation of Google Photos albums in Immich. | `TRUE` |
| `-keep-untitled-albums <bool>` | Untitled albums are imported into `immich` with the name of the folder as title. | `FALSE` |
| `-use-album-folder-as-name <bool>` | Use the folder's name instead of the album title. | `FALSE` |
| `-keep-partner <bool>` | Specifies inclusion or exclusion of partner-taken photos. | `TRUE` |
| `-partner-album "partner's album"` | import assets from partner into given album. |
| `-discard-archived <bool>` | don't import archived assets. | `FALSE` |
| ---------------------------------- | -------------------------------------------------------------------------------- | ----------------- |
| `-google-photos` | import from a Google Photos structured archive, recreating corresponding albums. | |
| `-from-album="GP Album"` | Create the album in `immich` and import album's assets. | |
| `-create-albums` | Controls creation of Google Photos albums in Immich. | `TRUE` |
| `-keep-untitled-albums` | Untitled albums are imported into `immich` with the name of the folder as title. | `FALSE` |
| `-use-album-folder-as-name` | Use the folder's name instead of the album title. | `FALSE` |
| `-keep-partner` | Specifies inclusion or exclusion of partner-taken photos. | `TRUE` |
| `-partner-album="partner's album"` | import assets from partner into given album. | |
| `-discard-archived` | don't import archived assets. | `FALSE` |

Read [here](docs/google-takeout.md) to understand how Google Photos takeout isn't easy to handle.

Expand Down Expand Up @@ -142,12 +151,12 @@ Use this command for analyzing the content of your `immich` server to find any f
Before deleting the inferior copies, the system get all albums they belong to, and add the superior copy to them.

### Switches and options:
| **Parameter** | **Description** | **Default value** |
|----------------------------|-------------------------------------------------------------|-------------------------|
| `-yes` | Assume Yes to all questions | `FALSE` |
| `-date` | Check only assets have a date of capture in the given range | `1850-01-04,2030-01-01` |
| `-ignore-tz-errors <bool>` | Ignore timezone difference when searching for duplicates | `FALSE` |
| `-ignore-extension` | Ignore filetype extensions when searching for duplicates | `FALSE` |
| **Parameter** | **Description** | **Default value** |
| ------------------- | ----------------------------------------------------------- | ----------------------- |
| `-yes` | Assume Yes to all questions | `FALSE` |
| `-date` | Check only assets have a date of capture in the given range | `1850-01-04,2030-01-01` |
| `-ignore-tz-errors` | Ignore timezone difference when searching for duplicates | `FALSE` |
| `-ignore-extension` | Ignore filetype extensions when searching for duplicates | `FALSE` |

### Example Usage: clean the `immich` server after having merged a google photo archive and original files

Expand All @@ -163,10 +172,10 @@ The possibility to stack images has been introduced with `immich` version 1.83.
Let use it to group burst and jpg/raw images together.

### Switches and options:
| **Parameter** | **Description** | **Default value** |
|---------------|-------------------------------------------------------------|-------------------------|
| `-yes` | Assume Yes to all questions | `FALSE` |
| `-date` | Check only assets have a date of capture in the given range | `1850-01-04,2030-01-01` |
| **Parameter** | **Description** | **Default value** |
| ------------------ | ----------------------------------------------------------- | ----------------------- |
| `-yes` | Assume Yes to all questions | `FALSE` |
| `-date=date_range` | Check only assets have a date of capture in the given range | `1850-01-04,2030-01-01` |


## Command `tool`
Expand Down

0 comments on commit 6634a2a

Please sign in to comment.