|
1 | 1 | # odnelazm-cli |
2 | 2 |
|
3 | | -Run the `odnelazm` web scraper and parser from the command line |
| 3 | +Run the `odnelazm` web scraper and parser from the command line. |
4 | 4 |
|
5 | 5 | ## Installation |
6 | 6 |
|
7 | | -Install with `cargo` |
8 | | - |
9 | 7 | ```bash |
10 | 8 | cargo install odnelazm-cli |
11 | 9 | ``` |
12 | 10 |
|
13 | | -## CLI Features |
| 11 | +## Global flags |
| 12 | + |
| 13 | +| Flag | Description | |
| 14 | +| ----------------- | ------------------------------------------------------------------------------------- | |
| 15 | +| `-l, --log-level` | Set log verbosity: `off`, `error`, `warn`, `info`, `debug`, `trace` (default: `info`) | |
14 | 16 |
|
15 | | -### List sittings |
| 17 | +--- |
16 | 18 |
|
17 | | -Browse available hansard sittings with optional filtering and pagination. |
| 19 | +## archive |
18 | 20 |
|
19 | | -| Flag | Description | |
20 | | -| ----------------------------------- | -------------------------------------- | |
21 | | -| `--start-date YYYY-MM-DD` | Filter sittings from this date onwards | |
22 | | -| `--end-date YYYY-MM-DD` | Filter sittings up to this date | |
23 | | -| `--house senate\|national_assembly` | Filter sittings by house | |
24 | | -| `--limit N` | Maximum number of results to return | |
25 | | -| `--offset N` | Number of results to skip | |
26 | | -| `--output text\|json` | Output format (default: text) | |
| 21 | +Archival Hansard data from `info.mzalendo.com`. |
| 22 | + |
| 23 | +### archive list |
| 24 | + |
| 25 | +Browse available sittings with optional filtering and pagination. |
| 26 | + |
| 27 | +| Flag | Description | |
| 28 | +| --------------------------------------- | -------------------------------------- | |
| 29 | +| `--start-date YYYY-MM-DD` | Filter sittings from this date onwards | |
| 30 | +| `--end-date YYYY-MM-DD` | Filter sittings up to this date | |
| 31 | +| `--house senate\|national_assembly\|na` | Filter by house | |
| 32 | +| `--limit N` | Maximum number of results to return | |
| 33 | +| `--offset N` | Number of results to skip | |
| 34 | +| `-o, --output text\|json` | Output format (default: text) | |
27 | 35 |
|
28 | 36 | ```bash |
29 | | -odnelazm list |
30 | | -odnelazm list --start-date 2024-01-01 --end-date 2024-12-31 --house national_assembly --limit 10 |
31 | | -odnelazm list --output json | jq '.[] | select(.house == "senate")' |
| 37 | +odnelazm archive list |
| 38 | +odnelazm archive list --house senate --start-date 2020-01-01 --end-date 2020-12-31 --limit 10 |
| 39 | +odnelazm archive list -o json | jq '.[] | select(.house == "senate")' |
32 | 40 | ``` |
33 | 41 |
|
34 | | -### Sitting detail |
| 42 | +### archive sitting |
35 | 43 |
|
36 | | -Fetch the full transcript of a sitting, including sections, contributions, and procedural notes. |
| 44 | +Fetch the full transcript of a sitting including sections, contributions, and procedural notes. |
37 | 45 |
|
38 | | -| Flag | Description | |
39 | | -| --------------------- | --------------------------------------------------------------- | |
40 | | -| `--fetch-speakers` | Fetch full profile for each speaker (makes additional requests) | |
41 | | -| `--output text\|json` | Output format (default: text) | |
| 46 | +| Flag | Description | |
| 47 | +| ------------------------- | --------------------------------------------------------------- | |
| 48 | +| `--fetch-speakers` | Fetch full profile for each speaker (makes additional requests) | |
| 49 | +| `-o, --output text\|json` | Output format (default: text) | |
42 | 50 |
|
43 | 51 | ```bash |
44 | | -odnelazm detail https://info.mzalendo.com/hansard/sitting/senate/2020-12-29-14-30-00 |
45 | | -odnelazm detail --fetch-speakers --output json |
| 52 | +odnelazm archive sitting https://info.mzalendo.com/hansard/sitting/senate/2020-12-29-14-30-00 |
| 53 | +odnelazm archive sitting https://info.mzalendo.com/hansard/sitting/senate/2020-12-29-14-30-00 --fetch-speakers -o json |
46 | 54 | ``` |
47 | 55 |
|
48 | | -### Global flags |
| 56 | +--- |
49 | 57 |
|
50 | | -| Flag | Description | |
51 | | -| ----------------- | ------------------------------------------------------------------------------------- | |
52 | | -| `-l, --log-level` | Set log verbosity: `off`, `error`, `warn`, `info`, `debug`, `trace` (default: `info`) | |
| 58 | +## current |
| 59 | + |
| 60 | +Up to date Hansard data from `mzalendo.com/democracy-tools`. |
| 61 | + |
| 62 | +### current sittings |
| 63 | + |
| 64 | +List available sittings, paged or all at once. |
| 65 | + |
| 66 | +| Flag | Description | |
| 67 | +| --------------------------------------- | ----------------------------------------------- | |
| 68 | +| `--page N` | Page number to fetch (default: 1) | |
| 69 | +| `--all` | Fetch all pages at once (conflicts with --page) | |
| 70 | +| `--house senate\|national_assembly\|na` | Filter by house | |
| 71 | +| `-o, --output text\|json` | Output format (default: text) | |
| 72 | + |
| 73 | +```bash |
| 74 | +odnelazm current sittings |
| 75 | +odnelazm current sittings --page 2 --house senate |
| 76 | +odnelazm current sittings --all -o json |
| 77 | +``` |
| 78 | + |
| 79 | +### current sitting |
| 80 | + |
| 81 | +Fetch the full transcript of a sitting. |
| 82 | + |
| 83 | +| Flag | Description | |
| 84 | +| ------------------------- | ----------------------------- | |
| 85 | +| `-o, --output text\|json` | Output format (default: text) | |
| 86 | + |
| 87 | +```bash |
| 88 | +odnelazm current sitting thursday-12th-february-2026-afternoon-sitting-2438 |
| 89 | +odnelazm current sitting https://mzalendo.com/democracy-tools/hansard/thursday-12th-february-2026-afternoon-sitting-2438/ -o json |
| 90 | +``` |
| 91 | + |
| 92 | +### current members |
| 93 | + |
| 94 | +List members of parliament. |
| 95 | + |
| 96 | +| Flag | Description | |
| 97 | +| ------------------------- | ----------------------------------------------- | |
| 98 | +| `--page N` | Page number (default: 1) | |
| 99 | +| `--all` | Fetch all pages at once (conflicts with --page) | |
| 100 | +| `-o, --output text\|json` | Output format (default: text) | |
| 101 | + |
| 102 | +```bash |
| 103 | +odnelazm current members na 13th-parliament |
| 104 | +odnelazm current members senate 13th-parliament --page 2 -o json |
| 105 | +odnelazm current members na 13th-parliament --all -o json |
| 106 | +``` |
| 107 | + |
| 108 | +### current profile |
| 109 | + |
| 110 | +Fetch a member's full profile including speeches, bills, and voting record. |
| 111 | + |
| 112 | +| Flag | Description | |
| 113 | +| ------------------------- | ----------------------------------------- | |
| 114 | +| `--all-activity` | Fetch all pages of parliamentary activity | |
| 115 | +| `--all-bills` | Fetch all pages of sponsored bills | |
| 116 | +| `-o, --output text\|json` | Output format (default: text) | |
53 | 117 |
|
54 | 118 | ```bash |
55 | | -odnelazm --log-level debug list |
| 119 | +odnelazm current profile https://mzalendo.com/mps-performance/national-assembly/13th-parliament/boss-gladys-jepkosgei/ |
| 120 | +odnelazm current profile https://mzalendo.com/mps-performance/national-assembly/13th-parliament/boss-gladys-jepkosgei/ --all-activity --all-bills -o json |
56 | 121 | ``` |
0 commit comments