Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable

- name: Build
run: cargo build --verbose

- name: Run Clippy
run: cargo clippy --all-targets --all-features
run: cargo clippy

- name: Run tests
run: cargo test --verbose
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = "Command line interface client for PersonalMediaVault"
edition = "2021"
license = "MIT"
name = "pmv-cli"
version = "2.0.0"
version = "3.0.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
224 changes: 215 additions & 9 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pmv-cli [OPTIONS] <COMMAND>
| [config](#command-config) | Manages vault configuration |
| [task](#command-task) | Retrieves tasks information |
| [invites](#command-invites) | Manages invites |
| [home](#command-home) | Manges the home page |
| [batch](#command-batch) | Applies a batch operation to a list of media assets |
| [get-server-information](#command-get-server-information) | Gets server information, like the version it is using |
| [get-disk-usage](#command-get-disk-usage) | Gets server disk usage |
Expand Down Expand Up @@ -367,12 +368,13 @@ pmv-cli media <COMMAND>
| [get](#command-media-get) | Gets media asset metadata and download links |
| [stats](#command-media-stats) | Gets media asset size stats |
| [download](#command-media-download) | Downloads a media asset |
| [get-related](#command-media-get-related) | Gets related media |
| [export](#command-media-export) | Exports a media asset, downloading everything (metadata + assets) into a folder |
| [upload](#command-media-upload) | Uploads a new media asset, waits for encryption and adds tags if specified |
| [import](#command-media-import) | Imports a media asset, expecting a folder with the same format the export command uses |
| [set-title](#command-media-set-title) | Changes the title of a media asset |
| [set-description](#command-media-set-description) | Changes the description of a media asset |
| [set-extended-description](#command-media-set-extended-description) | Changes the extended description of a media asset |
| [set-related-media](#command-media-set-related-media) | Sets the related media list |
| [set-force-start-beginning](#command-media-set-force-start-beginning) | Changes the forced start from beginning parameter of a media asset |
| [set-is-animation](#command-media-set-is-animation) | Changes the is-animation parameter of a media asset |
| [set-thumbnail](#command-media-set-thumbnail) | Sets the thumbnail of a media asset |
Expand Down Expand Up @@ -469,6 +471,30 @@ pmv-cli media download [OPTIONS] <MEDIA> [ASSET]
| `-p, --print-link` | Prints the download link, instead of downloading to a file |
| `-h, --help` | Print help |

### Command: media get-related

Gets related media

<ins>**Usage:**</ins>

```
pmv-cli media get-related [OPTIONS] <MEDIA>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<MEDIA>` | Media asset ID |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-e, --extended` | Extended version of the results table |
| `-c, --csv` | CSV format |
| `-h, --help` | Print help |

### Command: media export

Exports a media asset, downloading everything (metadata + assets) into a folder
Expand Down Expand Up @@ -571,38 +597,38 @@ Changes the description of a media asset
<ins>**Usage:**</ins>

```
pmv-cli media set-description <MEDIA> <DESCRIPTION>
pmv-cli media set-description <MEDIA> <PATH>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<MEDIA>` | Media asset ID |
| `<DESCRIPTION>` | Description |
| `<PATH>` | Path to the text file containing the description |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

### Command: media set-extended-description
### Command: media set-related-media

Changes the extended description of a media asset
Sets the related media list

<ins>**Usage:**</ins>

```
pmv-cli media set-extended-description <MEDIA> <PATH>
pmv-cli media set-related-media <MEDIA> <RELATED>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<MEDIA>` | Media asset ID |
| `<PATH>` | Path to the text file containing the extended description |
| `<RELATED>` | List of related media IDs, separated by commas |

<ins>**Options:**</ins>

Expand Down Expand Up @@ -1134,7 +1160,6 @@ pmv-cli advanced-search [OPTIONS]
| Option | Description |
| --- | --- |
| `-q, --title <TITLE>` | Filter by title |
| `-d, --description <DESCRIPTION>` | Filter by description |
| `-k, --media-type <MEDIA_TYPE>` | Filter by media type. Can be: video, audio or image |
| `-t, --tags <TAGS>` | Filter by tags. Expected a list of tag names, separated by spaces |
| `-m, --tags-mode <TAGS_MODE>` | Tag filtering mode. Can be: all, any, none or untagged |
Expand Down Expand Up @@ -2098,6 +2123,188 @@ pmv-cli invites close-session <INDEX>
| --- | --- |
| `-h, --help` | Print help |

## Command: home

Manges the home page

<ins>**Usage:**</ins>

```
pmv-cli home <COMMAND>
```

<ins>**Commands:**</ins>

| Command | Description |
| --- | --- |
| [get-groups](#command-home-get-groups) | Gets the groups in the home page |
| [add-group](#command-home-add-group) | Adds a home page group |
| [get-group-elements](#command-home-get-group-elements) | Gets the elements of a group |
| [set-group-elements](#command-home-set-group-elements) | Sets the elements of a group |
| [rename-group](#command-home-rename-group) | Renames an existing group |
| [move-group](#command-home-move-group) | Moves an existing group to another position |
| [delete-group](#command-home-delete-group) | Deletes an existing group |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

### Command: home get-groups

Gets the groups in the home page

<ins>**Usage:**</ins>

```
pmv-cli home get-groups
```

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

### Command: home add-group

Adds a home page group

<ins>**Usage:**</ins>

```
pmv-cli home add-group [OPTIONS] <NAME> <GROUP_TYPE>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<NAME>` | A name for the group |
| `<GROUP_TYPE>` | The type of group (CUSTOM, RECENT_MEDIA or RECENT_ALBUMS) |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `--prepend` | Add this option in order to add the group at the top of the list |
| `-h, --help` | Print help |

### Command: home get-group-elements

Gets the elements of a group

<ins>**Usage:**</ins>

```
pmv-cli home get-group-elements [OPTIONS] <ID>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<ID>` | ID of the group |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `--as-refs` | Add this option to print the elements as references |
| `-h, --help` | Print help |

### Command: home set-group-elements

Sets the elements of a group

<ins>**Usage:**</ins>

```
pmv-cli home set-group-elements <ID> <ELEMENTS>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<ID>` | ID of the group |
| `<ELEMENTS>` | List of group elements, as references, separated by commas. For media elements use M{ID} and for albums use A{ID}. Example: A12, M6, M8 |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

### Command: home rename-group

Renames an existing group

<ins>**Usage:**</ins>

```
pmv-cli home rename-group <ID> <NAME>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<ID>` | ID of the group |
| `<NAME>` | A name for the group |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

### Command: home move-group

Moves an existing group to another position

<ins>**Usage:**</ins>

```
pmv-cli home move-group <ID> <POSITION>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<ID>` | ID of the group |
| `<POSITION>` | The position to move the group |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

### Command: home delete-group

Deletes an existing group

<ins>**Usage:**</ins>

```
pmv-cli home delete-group <ID>
```

<ins>**Arguments:**</ins>

| Argument | Description |
| --- | --- |
| `<ID>` | ID of the group |

<ins>**Options:**</ins>

| Option | Description |
| --- | --- |
| `-h, --help` | Print help |

## Command: batch

Applies a batch operation to a list of media assets
Expand All @@ -2123,7 +2330,6 @@ pmv-cli batch [OPTIONS] <COMMAND>
| Option | Description |
| --- | --- |
| `-q, --title <TITLE>` | Filter by title |
| `-d, --description <DESCRIPTION>` | Filter by description |
| `-k, --media-type <MEDIA_TYPE>` | Filter by media type. Can be: video, audio or image |
| `-t, --tags <TAGS>` | Filter by tags. Expected a list of tag names, separated by spaces |
| `-m, --tags-mode <TAGS_MODE>` | Tag filtering mode. Can be: all, any, none or untagged |
Expand Down
Loading