Update to recognize positional args
This commit is contained in:
parent
6aa6fcfeed
commit
404f0cd56f
26
README.md
26
README.md
@ -167,16 +167,25 @@ Batch subscription example using [google-civic-api.pl](https://git.bikeshopi.dev
|
|||||||
|
|
||||||
**Usage:**
|
**Usage:**
|
||||||
```bash
|
```bash
|
||||||
./subscribe-members.sh <membership_csv_file> [list_id]
|
./test-subscribe-members.sh <csv_file> <password> [list_id] [connector_url]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
- `csv_file` - Path to CSV file with format: email,first_name,last_name
|
||||||
|
- `password` - Secret password for the mailman-connector (required)
|
||||||
|
- `list_id` - Target mailing list (default: members.lists.example.org)
|
||||||
|
- `connector_url` - URL of the mailman-connector (default: https://mailman-connector.example.com)
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
```bash
|
```bash
|
||||||
# Using default list
|
# Using default list and connector URL
|
||||||
./subscribe-members.sh league_membership.csv
|
./test-subscribe-members.sh members.csv mysecretpassword
|
||||||
|
|
||||||
# Using specific list
|
# With specific list
|
||||||
./subscribe-members.sh league_membership.csv test.lists.example.org
|
./test-subscribe-members.sh members.csv mysecretpassword test.lists.example.org
|
||||||
|
|
||||||
|
# With specific list and connector URL
|
||||||
|
./test-subscribe-members.sh members.csv mysecretpassword test.lists.example.org https://connector.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
**How it works:**
|
**How it works:**
|
||||||
@ -184,10 +193,3 @@ Batch subscription example using [google-civic-api.pl](https://git.bikeshopi.dev
|
|||||||
2. Converts output to CSV format: `email,first_name,last_name`
|
2. Converts output to CSV format: `email,first_name,last_name`
|
||||||
3. Sends batch subscribe request to connector
|
3. Sends batch subscribe request to connector
|
||||||
|
|
||||||
**Configuration:**
|
|
||||||
Edit the script to set:
|
|
||||||
```bash
|
|
||||||
CONNECTOR_URL="https://mailman-connector.example.com"
|
|
||||||
CONNECTOR_PASSWORD="your_secret_password"
|
|
||||||
LIST_ID="test.lists.example.org" # Default list
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user