https://github.com/carlosqsilva/vqrcode
CLI for creating QR codes
https://github.com/carlosqsilva/vqrcode
qr-code qr-generator qrcode qrcode-image qrcode-svg vlang
Last synced: 2 months ago
JSON representation
CLI for creating QR codes
- Host: GitHub
- URL: https://github.com/carlosqsilva/vqrcode
- Owner: carlosqsilva
- Created: 2022-08-04T18:17:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-04T17:34:44.000Z (5 months ago)
- Last Synced: 2025-01-03T15:24:20.399Z (4 months ago)
- Topics: qr-code, qr-generator, qrcode, qrcode-image, qrcode-svg, vlang
- Language: V
- Homepage:
- Size: 107 KB
- Stars: 26
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-v - vqrcode - CLI for creating QR Codes. (Applications / Command-line)
README
# vqrcode
CLI for creating QR codes
## Examples
![]()
![]()
![]()
![]()
![]()
### Usage
```bash
pbpaste | vqrcode
pbpaste | vqrcode -o > qrcode.png
pbpaste | vqrcode --svg | pbcopy
pbpaste | vqrcode --svg > qrcode.svgvqrcode 'hello' # print qrcode as ascii to console
vqrcode 'hello' --svg -s "pointed" # print qrcode in svg, with "pointed" style
vqrcode 'hello' --svg > qrcode.svg # output qrcode to file
vqrcode 'hello' -o qrcode.png # output qrcode to png file (only support png)
vqrcode 'hello' --svg | pbcopy # output qrcode to clipboard
vqrcode 'hello' --svg -l ./logo.png | pbcopy # output qrcode with custom logo to clipboard
vqrcode 'hello' -l ./logo.png -o ./qrcode.png # output qrcode with custom logo to file
```flags:
```sh
--ecl -e | Error correction level 0...3
--style -s | qrcode style, values: "round", "pointed", "sharp", "square", "circle" or "dot"
--finder -f | finder pattern style, values: "round", "pointed", "sharp", "square", "octagon" "circle" or "dot"
--logo -l | path to image to embed on qrcode
--size | Size in pixels, valid when the output is image
--svg | Output to svg
--output -o | Output to png
```## Installation
### Homebrew
```bash
brew install carlosqsilva/brew/vqrcode
```### Install from source
#### 0) Install [vlang](https://vlang.io), and add to your `path`
#### 1) install dependencies,
the following dependencies are required to output in png:
```
brew install librsvg cairo // MacOs homebrew
apt install librsvg2-dev libcairo2-dev // linux package manager
```#### 2) clone repo
```bash
git clone https://github.com/carlosqsilva/vqrcode.git
```#### 3) change dir to `vqrcode`
```bash
cd vqrcode/
```#### 4) build program
```bash
just build
```or
```bash
v -cc gcc \
-cflags "$(pkg-config --cflags librsvg-2.0 cairo)" \
-ldflags "$(pkg-config --libs librsvg-2.0 cairo)" \
-prod vqrcode.v
```After that you will get a ready-made binary file in the root directory of the project.