{"id":23684986,"url":"https://github.com/trikko/qr","last_synced_at":"2025-09-02T12:32:28.811Z","repository":{"id":258332822,"uuid":"873541107","full_name":"trikko/qr","owner":"trikko","description":"QrCode for D","archived":false,"fork":false,"pushed_at":"2024-10-18T10:59:59.000Z","size":371,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T17:18:03.755Z","etag":null,"topics":["d","dlang","qr","qrcode"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trikko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-10-16T10:42:37.000Z","updated_at":"2024-10-18T13:11:44.000Z","dependencies_parsed_at":"2024-12-05T00:45:33.700Z","dependency_job_id":null,"html_url":"https://github.com/trikko/qr","commit_stats":null,"previous_names":["trikko/qr"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trikko%2Fqr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trikko%2Fqr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trikko%2Fqr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trikko%2Fqr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trikko","download_url":"https://codeload.github.com/trikko/qr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231785172,"owners_count":18426286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["d","dlang","qr","qrcode"],"created_at":"2024-12-29T20:50:08.661Z","updated_at":"2025-09-02T12:32:28.779Z","avatar_url":"https://github.com/trikko.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QR Code for D\n\nA QR Code generator library for D. It is self-contained and does not require any external dependencies.\nYou can use it to generate QR Codes and save them as PNG, SVG, SVGZ, PPM files (or print them as ASCII art).\n\nBased on [Project Nayuki's code](https://github.com/nayuki/QR-Code-generator)\n## Usage\n\nBasic example:\n\n```d\nimport qr;\nQrCode(\"Hello, world!\").saveAs(\"test.png\");\n\n/* same as above\nQrCode qrcode = \"Hello, world!\";\nqrcode.saveAs(\"test.png\");\n*/\n```\n\nYou can set extra options for generator:\n\n- `ecl`: Error Correction Level.\n- `mask`: Mask pattern.\n- `boostEcl`: Boost the error correction level (without increasing the size of the QR Code).\n\nFor example:\n\n```d\nimport qr;\nQrCode(\"Hello, world!\", ecl: ErrorCorrectionLevel.HIGH).writeln; // Print QR Code to stdout\n```\n\nYou can save the QR Code to a file (PNG, SVG, PPM) with some options:\n\n - `moduleSize`: Size of each module (pixel)\n - `padding`: Padding around the QR Code (in modules)\n - `foreground`: Foreground color (default: `#000000`)\n - `background`: Background color (default: `#FFFFFF`)\n\n```d\nimport qr;\nQrCode(\"Hello, world!\").saveAs(\"test.png\", moduleSize: 10, foreground: \"#ff0000\"); // Save a red QR Code as PNG\n```\n\nYou can also access the raw QR Code data:\n\n```d\nimport qr;\nQrCode qrcode = \"Hello, world!\";\nqrcode.size.writeln; // Print the size (number of modules per side) of the QR Code\nqrcode[0,0].writeln; // Print the module at position (0, 0) (true = black, false = white)\n```\n\nYou can print QR Code as ASCII art:\n\n```d\nimport qr;\nQrCode(\"Hello, world!\").writeln; // Print QR Code as ASCII art\nQrCode(\"Hello, world!\").toString(dense: true).writeln; // Print QR Code as ASCII art, dense!\n```\n![immagine](https://github.com/user-attachments/assets/8eaff80d-f8eb-4751-9fdc-e22c87a5b0de)\n\n\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrikko%2Fqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrikko%2Fqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrikko%2Fqr/lists"}