generated from nhcarrigan/template
24ebf004cc0c4a59f780023341f7336693977a12
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 56s
Deepgram QR Code Generator
CLI tool for generating branded Deepgram QR codes from the command line. Uses the same
qr-code-styling library as the original
browser tool — output is identical.
Each generated QR code includes:
- Large circular dots (the
qr-code-styling"dots" style) - Extra-rounded corner squares
- Deepgram logo centred in the QR matrix
- White padding border
- "POWERED BY DEEPGRAM" branding strip at the bottom
Prerequisites
-
Node.js 18+ and pnpm
-
System libraries required by the
canvaspackage (Cairo, Pango, etc.):# Ubuntu / Debian sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev # macOS (Homebrew) brew install pkg-config cairo pango libpng jpeg giflib librsvg pixmanSee the
canvasinstallation docs for other platforms.
Setup
pnpm install
Usage
pnpm generate -- <url> [<url> ...]
Examples
Generate a single QR code:
pnpm generate -- https://dpgr.am/ucb-ai-careers
Generate multiple QR codes in one go:
pnpm generate -- https://dpgr.am/ucb-ai-careers https://dpgr.am/ucb-ai-intern
URLs without a scheme are accepted — https:// is prepended automatically:
pnpm generate -- dpgr.am/ucb-ai-careers
Output
Generated files are saved to the output/ directory (created automatically). Each file is named
after the URL slug:
output/dpgr-am-ucb-ai-careers.png
output/dpgr-am-ucb-ai-intern.png
The output/ directory is gitignored — generated files are not committed to the repo.
Dependencies
| Package | Version | Purpose |
|---|---|---|
qr-code-styling |
1.6.0 | QR code generation (dots, corner styles, layout) |
canvas |
3.2.3 | Node.js canvas for logo overlay and branding composite |
@xmldom/xmldom |
0.9.10 | Lightweight DOM polyfill required by qr-code-styling |
Description
Languages
TypeScript
99.5%
JavaScript
0.5%