{"id":41054044,"url":"https://github.com/angkarn/qrgen","last_synced_at":"2026-01-22T11:33:52.665Z","repository":{"id":232358131,"uuid":"783350157","full_name":"angkarn/qrgen","owner":"angkarn","description":"QR Code Generator Tools","archived":false,"fork":false,"pushed_at":"2025-08-17T13:26:12.000Z","size":18869,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T15:21:53.897Z","etag":null,"topics":["cli","csv","image","qr","qr-code","qrcode","qrcode-generator","rust","text"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angkarn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-07T16:44:10.000Z","updated_at":"2025-08-17T13:26:16.000Z","dependencies_parsed_at":"2025-08-17T15:21:52.895Z","dependency_job_id":null,"html_url":"https://github.com/angkarn/qrgen","commit_stats":null,"previous_names":["angkarn/qrgen"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/angkarn/qrgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angkarn%2Fqrgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angkarn%2Fqrgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angkarn%2Fqrgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angkarn%2Fqrgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angkarn","download_url":"https://codeload.github.com/angkarn/qrgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angkarn%2Fqrgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","csv","image","qr","qr-code","qrcode","qrcode-generator","rust","text"],"created_at":"2026-01-22T11:33:52.083Z","updated_at":"2026-01-22T11:33:52.660Z","avatar_url":"https://github.com/angkarn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QR Code Generator and Draws\n\nGenerate QRCode image and draw customizable texts (font, template on json) via command line and library, written in Rust.\n\n## Features\n\n- Draw custom text, font, .etc on image via json template!.\n- Generate multiple QR from a csv format file.\n- Set template from data list e.g. qr content, draw, filename, set base image.\n\n## Download\nSee [Release](https://github.com/angkarn/qrgen/releases).\n\n### Mac (Apple Silicon)\n\n```sh\ncurl -L -o qrgen https://github.com/angkarn/qrgen/releases/latest/download/aarch64-apple-darwin \u0026\u0026 chmod +x qrgen\n```\n\n### Mac (Intel)\n\n```sh\ncurl -L -o qrgen https://github.com/angkarn/qrgen/releases/latest/download/x86_64-apple-darwin \u0026\u0026 chmod +x qrgen\n```\n### Linux GNU (x86-64)\n\n```sh\ncurl -L -o qrgen https://github.com/angkarn/qrgen/releases/latest/download/x86_64-unknown-linux-gnu \u0026\u0026 chmod +x qrgen\n```\n\n### Windows (x86_64)\n\nDownload from [Release](https://github.com/angkarn/qrgen/releases).\n\n### WASI \n\nDownload from [Release](https://github.com/angkarn/qrgen/releases).\n\n### Other\n\nSee [build](#build) and try build it.\n\n## Uasge\n\nYou can use help command to see this.\n`qrgen help`\n\n```bash\nUsage: qrgen \u003cCOMMAND\u003e\n\nCommands:\n  gen     Generate one QR code\n  from    Generate multiple QR codes from a CSV file\n  config  Run command from config file\n  help    Print this message or the help of the given subcommand(s)\n\nOptions:\n      --help\n          Print help\n\n  -V, --version\n          Print version\n```\n\n### gen\n\n`qrgen help gen`\n\n```bash\nGenerate one QR code\n\nUsage: qrgen gen [OPTIONS] \u003cCONTENT\u003e\n\nArguments:\n  \u003cCONTENT\u003e  QR code content\n\nOptions:\n  -f, --format \u003cFORMAT\u003e               Output format (console|png|base64) [default: console]\n  -b, --base_image \u003cBASE_IMAGE\u003e       Path to base image file. Overrides image width/height (also works with data template)\n  -1, --qr_color_1 \u003cQR_COLOR_1\u003e       QR color (1, like black) [default: 000000ff]\n  -0, --qr_color_0 \u003cQR_COLOR_0\u003e       QR color (0, like white) [default: ffffffff]\n      --fill \u003cFILL_COLOR\u003e             Fill background color [default: ffffffff]\n  -w, --image_width \u003cIMAGE_WIDTH\u003e     Image width (pixels) [default: 1000]\n  -h, --image_height \u003cIMAGE_HEIGHT\u003e   Image height (pixels) (default: image width)\n  -s, --qr_size \u003cQR_SIZE\u003e             QR size (pixels) (default: image width)\n  -x, --pos_x \u003cPOS_QR_X\u003e              QR X position (pixels) [default: 0]\n  -y, --pos_y \u003cPOS_QR_Y\u003e              QR Y position (pixels) [default: 0]\n  -d, --td \u003cTEMPLATE_DRAW_STRING\u003e     Draw template as string (json5)\n      --fp \u003cFONT_PATH\u003e                Font file paths\n      --fs \u003cFONT_SIZE\u003e                Default font size (percentage of image width) [default: 3]\n  -o, --outdir \u003cOUTDIR\u003e               Output directory [default: output]\n      --ecc \u003cERROR_CORRECTION_LEVEL\u003e  QR error correction level (l|m|q|h) [default: m]\n```\n\n### from\n\n`qrgen help from`\n\n```bash\nGenerate multiple QR codes from a CSV file\n\nUsage: qrgen from [OPTIONS] \u003cPATH\u003e\n\nArguments:\n  \u003cPATH\u003e  Path to CSV file\n\nOptions:\n  -c, --tc \u003cTEMPLATE_CONTENT\u003e         QR content template [default: {{1}}]\n  -n, --tfn \u003cTEMPLATE_FILENAME\u003e       Filename template [default: {{1}}]\n  -f, --format \u003cFORMAT\u003e               Output format (console|png|base64) [default: console]\n  -b, --base_image \u003cBASE_IMAGE\u003e       Path to base image file. Overrides image width/height (also works with data template)\n  -1, --qr_color_1 \u003cQR_COLOR_1\u003e       QR color (1, like black) [default: 000000ff]\n  -0, --qr_color_0 \u003cQR_COLOR_0\u003e       QR color (0, like white) [default: ffffffff]\n      --fill \u003cFILL_COLOR\u003e             Fill background color [default: ffffffff]\n  -w, --image_width \u003cIMAGE_WIDTH\u003e     Image width (pixels) [default: 1000]\n  -h, --image_height \u003cIMAGE_HEIGHT\u003e   Image height (pixels) (default: image width)\n  -s, --qr_size \u003cQR_SIZE\u003e             QR size (pixels) (default: image width)\n  -x, --pos_x \u003cPOS_QR_X\u003e              QR X position (pixels) [default: 0]\n  -y, --pos_y \u003cPOS_QR_Y\u003e              QR Y position (pixels) [default: 0]\n  -d, --td \u003cTEMPLATE_DRAW_STRING\u003e     Draw template as string (json5)\n      --fp \u003cFONT_PATH\u003e                Font file paths\n      --fs \u003cFONT_SIZE\u003e                Default font size (percentage of image width) [default: 3]\n  -o, --outdir \u003cOUTDIR\u003e               Output directory [default: output]\n      --ecc \u003cERROR_CORRECTION_LEVEL\u003e  QR error correction level (l|m|q|h) [default: m]\n\nTemplate can use `{{Number of column}}` to replace column data, and `{{ROW}}` to replace row number.\n```\n\n### config\n\n`gen help config`\n\n```bash\nRun command from config file\n\nUsage: qrgen config \u003cPATH\u003e\n\nArguments:\n  \u003cPATH\u003e  Path to the config file\n```\n\n## Example\n\nYou can try on browser [Demo](https://qrgen-browser-demo.pages.dev) (Run via WASI build)\n\n#### gen\n\nGenerate one qr and print to console.\n\n```bash\nqrgen gen \"Hello World\"\n```\n\nSave to image file and custom size.\n\n```bash\nqrgen gen \"Hello World\" -f=png -w=400\n```\n\nSimple Draw text to image.\n\n```bash\nqrgen gen abc123 -f=png --fs=10 -w=400 -h=450 --td=\"[{a:1,p:2,ts:[{t:'abc123'}]}]\"\n```\n\n## ![qr](https://raw.githubusercontent.com/angkarn/qrgen/main/example/simple_draw/qr.png)\n\n#### from\n\nGenerate from csv list and set template of QR content, Draw, Filename. (file on repo)\n\n```bash\nqrgen from example/data.csv -f=png -w=1000 -h=1340 -y=150 --tfn=\"no_{{ROW}}\" --tc=\"{{ROW}}|{{1}}\" -d=\"[{a:1,ts:[{f:10,fs:8,t:'🌈'},{f:2,fs:11,c:'C63658',t:'Hello '},{f:1,fs:12,t:'*world*'}]},{y:85,h:15,fill:'435058',c:'ffffff',fs:5,wi:[{p:1,ml:5,fs:5,ts:[{t:'Infomation\\nNo. {{ROW}}'}]},{y:16,a:2,mr:12,c:'ffffff',ts:[{t:'{{1}}'}]},{y:16,a:2,mr:4,c:'ffffff',ts:[{f:3,t:'👤'}]},{y:50,a:2,mr:12,c:'ffffff',ts:[{t:'{{2}}'}]},{y:50,mr:4,a:2,c:'ffffff',ts:[{f:3,t:'✉️'}]}]}]\" --fp=fonts/LibreBarcode39Text-Regular.ttf,fonts/Monofett-Regular.ttf,fonts/noto-emoji-v53-emoji-regular.ttf,fonts/noto-sans-arabic-v28-arabic-regular.ttf,fonts/noto-sans-devanagari-v26-devanagari-regular.ttf,fonts/noto-sans-jp-v53-japanese-regular.ttf,fonts/noto-sans-kr-v36-korean-regular.ttf,fonts/noto-sans-sc-v37-chinese-simplified-regular.ttf,fonts/noto-sans-thai-v25-thai-regular.ttf,fonts/NotoColorEmoji.ttf\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/angkarn/qrgen/main/example/template_qr_filename_draw/no_1.png\" alt=\"no_1.png\" width=\"300px\"/\u003e\n\n```\noutput/\nno_1.png\nno_2.png\nno_3.png\n```\n\n---\n\n\n### Config Command\n\nYou can run QRGen using a config file in JSON5 (support json) format with the `config` command.\n\n**Usage:**\n```bash\nqrgen config example.json5\n```\n\n**Config file structure example for Gen:**\n```json5\n{\n  command: \"gen\",\n  content: \"abc123\",\n  common_arg: {\n    format: \"png\",\n    image_width: 400,\n  }\n}\n```\n\n**Config file structure example for From:**\n```json5\n{\n  command: \"from\",\n  path: \"example/data.csv\",\n  common_arg: {\n    format: \"png\",\n    image_width: 400,\n  }\n}\n```\n\n**Notes:**\n- If you use a draw template, you can specify it directly as an array/object with the template_draw key in JSON5, or as a stringified JSON using the `template_draw_string` key.\n- See [example](example/json5_config).\n\n---\n\n### Fun!\n\nNo QR\n\n```bash\nqrgen from example/data_markup.csv -f=png -w=1000 -h=1000 -s=0 --fs=2.4 --tfn=\"hello_world\" --fp=fonts/noto-sans-thai-v25-thai-regular.ttf,fonts/noto-sans-arabic-v28-arabic-regular.ttf,fonts/noto-sans-jp-v53-japanese-regular.ttf,fonts/noto-sans-kr-v36-korean-regular.ttf,fonts/noto-sans-sc-v37-chinese-simplified-regular.ttf,fonts/noto-sans-devanagari-v26-devanagari-regular.ttf,fonts/NotoColorEmoji.ttf,fonts/Monofett-Regular.ttf,fonts/LibreBarcode39Text-Regular.ttf -d=\"[{fill:'e9e0d4'},{y:3,a:1,c:'000000',ts:[{fs:6,t:'{{1}}'},{f:8,fs:8,c:'C63658',t:'{{2}} '},{f:9,fs:8,t:'*{{3}}*'}]},{a:1,y:18,fs:4.5,ts:[{t:'{{4}}'}]},{y:28,h:0.3,ml:30,mr:30,fill:'b1b2b3'},{y:30,c:'ff999a',ts:[{t:'{{5}}'},{c:'0c87a5',t:' {{6}}'}]},{y:40,a:2,ts:[{fs:2,t:'{{5}} {{6}}'}]},{y:52,ml:3,mr:3,p:1,w:50,h:40,ts:[{c:'000000',t:'{{5}} {{6}}'}]},{x:50,y:52,w:50,h:45,ml:3,mr:3,fill:'8d8282',wi:[{ml:3,mr:3,mb:3,mt:3,fill:'36454F',wi:[{p:2,ml:1,mr:1,ts:[{c:'ffffff',t:'{{5}} {{6}}'}]}]}]},{ts:[{c:'e74c3c',t:'a:0'},{c:'2ecc71',t:' p:0'}]},{a:1,ts:[{c:'5dade2',t:'a:1'},{c:'2ecc71',t:' p:0'}]},{a:2,ts:[{c:'f39c12',t:'a:2'},{c:'2ecc71',t:' p:0'}]},{p:1,ts:[{c:'e74c3c',t:'a:0'},{c:'71569b',t:' p:1'}]},{a:1,p:1,ts:[{c:'5dade2',t:'a:1'},{c:'71569b',t:' p:1'}]},{a:2,p:1,ts:[{c:'f39c12',t:'a:2'},{c:'71569b',t:' p:1'}]},{p:2,ts:[{c:'e74c3c',t:'a:0'},{c:'f17ba3',t:' p:2'}]},{a:1,p:2,ts:[{c:'5dade2',t:'a:1'},{c:'f17ba3',t:' p:2'}]},{a:2,p:2,ts:[{c:'f39c12',t:'a:2'},{c:'f17ba3',t:' p:2'}]}]\"\n```\n\n## \u003cimg src=\"https://raw.githubusercontent.com/angkarn/qrgen/main/example/hello_world/hello_world.png\" alt=\"no_1\" width=\"500px\"/\u003e\n\nSet base image, custom qr color.\n\n```bash\nqrgen gen \"travel is my therapy\\!\" -b=\"example/base_image.jpg\" -f=png -s=140 -x=435 -y=20 -0=\"ffffff4d\" -1=\"00000080\" --fp=fonts/knewave-v14-latin-regular.ttf -d=\"[{x:9,y:35,f:1,fs:7,c:'ffffff',ts:[{t:'Travel'}]},{x:15,y:50,fs:3,c:'ffffff',ts:[{t:'is my'}]},{x:4,y:53.1,f:1,fs:7,c:'ffffff',ts:[{t:'Therapy!'}]}]\"\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/angkarn/qrgen/main/example/set_base_image/qr.png\" alt=\"set_base_image\" width=\"600px\"/\u003e\n\n---\n\nSet base image by data template.\n\n```bash\nqrgen from \"example/set_base_image/from/data.csv\" -b=\"example/set_base_image/from/{{2}}\" -f=png -s=0 --fp=fonts/paytone-one-v23-latin-regular.ttf -d=\"[{a:1,p:1,f:1,fs:16,c:'ffffff',ts:[{t:'{{1}}'}]}]\"\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/angkarn/qrgen/main/example/set_base_image/from/output/Bridge.png\" alt=\"Bridge\" width=\"300px\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/angkarn/qrgen/main/example/set_base_image/from/output/Koi%20carp.png\" alt=\"Koi carp\" width=\"300px\"/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/angkarn/qrgen/main/example/set_base_image/from/output/Moon.png\" alt=\"Moon\" width=\"300px\"/\u003e\n\n---\n\n## Build\n\nThis project uses dependency from [rust-text-draw](https://github.com/angkarn/rust-text-draw). Please clone this repo before.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangkarn%2Fqrgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangkarn%2Fqrgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangkarn%2Fqrgen/lists"}