Skip to content

Commit

Permalink
Merge pull request #3 from unbekanntes-pferd/v0.3.0
Browse files Browse the repository at this point in the history
V0.3.0
  • Loading branch information
unbekanntes-pferd authored Jul 3, 2022
2 parents 7313d0e + 9c44e4f commit 3896dfb
Show file tree
Hide file tree
Showing 13 changed files with 688 additions and 265 deletions.
78 changes: 76 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The tool is built on top of dracoon, an async API wrapper for DRACOON based on h
The project is managed with poetry (dependencies, release build and publishing).

## Getting Started
In order to get started, download the latest tarball from Github:
In order to get started, download the latest tarball from Github or install dccmd from pip:
[Releases]()

### Prerequisites
Expand Down Expand Up @@ -265,7 +265,81 @@ To download a file, use the `download` command:
```bash
dccmd download your-dracoon.domain.com/your/cool-file.mp4 /target/directory
```
*Note: Currently, the download of a container (room, folder) is not supported.*

To download a room or a folder, use the `download` command with `--recursive` (`-r`) flag:

```bash
dccmd download -r your-dracoon.domain.com/your/cool-folder /target/directory
```

#### Advanced usage
If you download folders recursively, you might encounter performance issues, specifically when downloading many small files.
You can therefore adjust concurrent file uploads via the `--velocity` (`-v`) flag:

```bash
dccmd upload -r /path/to/folder your-dracoon.domain.com/ -v 3
```
The default value is 2 - it does not coincide with real request value.<br>
Maximum (although not recommended) value is 10. Entering higher numbers will result in max value use.<br>
Minimum value is 1 - this will not download a folder per file but is the minimum concurrent request value. Entering lower numbers will result in min value use.

### User operations

You can list, edit and import users with relevant `dccmd users` command:

* csv-import Add a list of users to DRACOON from a CSV file
* ls Get a list of users in DRACOON
* rm Delete a user

#### Importing users

You can import users by using the `csv-import` command and providing a path to the csv file:

```bash
dccmd users csv-import /path/to/users.csv your-dracoon.domain.com/
```

The csv file must contain a header and should include the following attributes:

* first name
* last name
* email
* login (optional)

By default, local users are created - if you want to import oidc users, you need pass the oidc config id:

```bash
#example with OIDC config 5
dccmd users csv-import /path/to/users.csv your-dracoon.domain.com/ 5
```

#### Listing users

You can list all users using the `ls` command:

```bash
dccmd users ls your-dracoon.domain.com/
```

You can get all users also as csv format by using the `--csv` flag:

```bash
dccmd users ls your-dracoon.domain.com/ --csv > users.csv
```

To find a user, you can pass a search string to search for either first name, last name or user name (search string applies to all):

```bash
# will return all users with either first name, last name or user name containing 'yourname'
dccmd users ls your-dracoon.domain.com/ yourname
```

#### Deleting users

You can delete a user by providing the username:
```bash
dccmd users rm your-dracoon.domain.com/ user123
```


## Configuration / administration
Expand Down
Loading

0 comments on commit 3896dfb

Please sign in to comment.