draft-redmine_users_from_csv/README.md

47 lines
1,011 B
Markdown
Raw Normal View History

2024-01-15 23:40:41 +01:00
# Redmine CSV loader
Create Redmine users from CSV and add users to a group.
⚠️ This project is only a draft, it's working but not intended to be use widely ⚠️
2024-01-15 23:45:27 +01:00
Binaries are placed in `dist/` for x64.
- "*": linux
- "*.exe": windows
Script can be run directly with `deno task start` for other architectures or
compile with `deno task compile` using [deno](https://deno.com/).
2024-01-15 23:40:41 +01:00
### Requirements
The users CSV file must be in utf-8 using "," or ";" as separator. The required
headers must be exactly "firstname", "lastname" and "mail" in any order (all
other header will be skipped).
```csv
firstname;lastname;mail
jean;dupont;jean.dupont@example.com
alice;coger;alice.coger@example.com
bob;parraut;bob.parraut@example.com
```
## Usage
### Get help
```sh
2024-01-15 23:45:27 +01:00
./dist/redmine-csv-loader --help
2024-01-15 23:40:41 +01:00
```
### Create users
```sh
2024-01-15 23:45:27 +01:00
./dist/redmine-csv-loader ./path/to/csv -k "my_api_key"
2024-01-15 23:40:41 +01:00
```
### Add existing users to a group
```sh
2024-01-15 23:45:27 +01:00
./dist/redmine-csv-loader ./path/to/csv -k "my_api_key" -a -g "my_group"
2024-01-15 23:40:41 +01:00
```