Skip to content

Commit 4999f84

Browse files
committed
docs(qr_codes): steps to run workflow, and CLI help
1 parent 7954597 commit 4999f84

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

qr_codes/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Generate QR codes
2+
3+
> Generate a QR code as an PNG file
4+
5+
## Run in GitHub
6+
7+
1. Go to the `Actions` tab at the top of this repository
8+
1. In the left bar, select the `Generate QR code` workflow
9+
1. Click the gray `Run workflow` button on the right side, providing inputs as-needed:
10+
11+
- `branch` should be left as `main`
12+
- `data` is required, this is the URL the QR code should point to
13+
- `color`, `background`, and `size` are optional
14+
15+
1. Click the green `Run workflow` button
16+
1. Refresh the page to see the in-progress workflow run
17+
1. When the workflow has completed (look for the green check mark), click the run
18+
1. In the bottom pane under `Artifacts`, find a link to download the QR code image (downloads a ZIP file with the image inside)
19+
20+
## Run locally
21+
22+
1. Open this repository's devcontainer in VS Code
23+
2. Change into the `qr_codes` directory
24+
3. Run the helper script
25+
26+
```bash
27+
$ python main.py -h
28+
usage: main.py [-h] [--color COLOR] [--background BACKGROUND] [--size SIZE] data output
29+
30+
Generate a QR code as an PNG file
31+
32+
positional arguments:
33+
data The data to encode as a QR code
34+
output Path to an PNG file where the QR code is written
35+
36+
options:
37+
-h, --help show this help message and exit
38+
--color COLOR The color of the QR code in hex format, by default black
39+
--background BACKGROUND
40+
The background color of the QR code in hex format, by default transparent
41+
--size SIZE The QR code size from 1-10, by default 4
42+
```

0 commit comments

Comments
 (0)