{"id":30354575,"url":"https://github.com/alessioborgi/qrcodegenerator","last_synced_at":"2026-06-30T13:31:38.048Z","repository":{"id":293969338,"uuid":"985634514","full_name":"alessioborgi/QRCodeGenerator","owner":"alessioborgi","description":"QRStaticCode allows you to generate static, unlimited-use QR codes with custom styles, embedded icons, and optional captions.","archived":false,"fork":false,"pushed_at":"2026-03-20T15:08:20.000Z","size":75271,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-21T06:59:55.788Z","etag":null,"topics":["pythonqrcode","qr","qr-code","qr-code-generator","qrcode","qrcode-generator","qrcodepython","qrcodes"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alessioborgi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-18T07:35:34.000Z","updated_at":"2026-03-20T15:08:33.000Z","dependencies_parsed_at":"2025-05-21T21:33:47.944Z","dependency_job_id":null,"html_url":"https://github.com/alessioborgi/QRCodeGenerator","commit_stats":null,"previous_names":["alessioborgi/qrstaticcode_maker","alessioborgi/qrstaticcode_generator","alessioborgi/qrcodegenerator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alessioborgi/QRCodeGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessioborgi%2FQRCodeGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessioborgi%2FQRCodeGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessioborgi%2FQRCodeGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessioborgi%2FQRCodeGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alessioborgi","download_url":"https://codeload.github.com/alessioborgi/QRCodeGenerator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alessioborgi%2FQRCodeGenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34969682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"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":["pythonqrcode","qr","qr-code","qr-code-generator","qrcode","qrcode-generator","qrcodepython","qrcodes"],"created_at":"2025-08-19T03:39:42.365Z","updated_at":"2026-06-30T13:31:37.658Z","avatar_url":"https://github.com/alessioborgi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QRCodeGenerator\n\n**Copyright © 2025 Alessio Borgi**\n\nA flexible Python code for generating styled QR codes with optional icons and captions. \n\n## Features\n\n- **Rounded modules** for a smooth look.  \n- **Custom colors** for both the QR code and the background.  \n- **Icon overlay**: tint and embed any silhouette icon in the center.  \n- **Caption support**: add custom text below (or overlapping) the code.  \n- Fully **configurable** via function parameters.\n\n---\n\n## Installation\n\n1. **Clone or copy** this repository.  \n\n   ```bash\n   git clone https://github.com/alessioborgi/QRStaticCode_Generator.git\n2. Ensure you have Python 3.7+ installed.  \n3. Install dependencies:\n\n   ```bash\n   pip install qrcode[pil] Pillow\n\n--- \n\n## Usage\nImport the ```generate_stylish_qr``` function and call it with your desired parameters:\n\n``` bash \n    from qr_generator import generate_stylish_qr\n\n    # Example: generate a QR for your project page\n    generate_stylish_qr(\n        url=\"https://example.com\",\n        output_path=\"my_qr.png\",\n        fill_color=\"#182b5f\",\n        back_color=\"white\",\n        icon_path=\"./icons/globe.png\",\n        icon_size_ratio=0.25,\n        icon_border=30,\n        caption=\"Project Page\",\n        font_path=\"/Library/Fonts/Ayuthaya.ttf\",\n        caption_size_ratio=0.10,\n        caption_padding=2,\n        caption_offset=-20,\n        caption_color=\"#182b5f\",\n    )\n```\nThe generated PNG will be saved at the specified ```output_path```.\n\n---\n\n## Function Parameters\n\n| Parameter            | Type    | Default              | Description                                             |\n| -------------------- | ------- | -------------------- | ------------------------------------------------------- |\n| `url`                | `str`   | *required*           | URL or text to encode in the QR code.                   |\n| `output_path`        | `str`   | `\"qr_with_text.png\"` | Path where the PNG will be saved.                       |\n| `box_size`           | `int`   | `20`                 | Pixel size of each QR module.                           |\n| `border`             | `int`   | `4`                  | Border width (in modules).                              |\n| `fill_color`         | `str`   | `\"#000000\"`          | Color of QR modules (`#RRGGBB` or CSS name).            |\n| `back_color`         | `str`   | `\"white\"`            | Background color.                                       |\n| `icon_path`          | `str`   | `None`               | Path to a silhouette icon (optional).                   |\n| `icon_color`         | `str`   | `fill_color`         | Tint color for the icon.                                |\n| `icon_size_ratio`    | `float` | `0.25`               | Icon width as fraction of QR width.                     |\n| `icon_border`        | `int`   | `30`                 | Padding (pixels) around the icon.                       |\n| `caption`            | `str`   | `None`               | Text caption below the QR (optional).                   |\n| `font_path`          | `str`   | `None`               | Path to a `.ttf` font file.                             |\n| `font_size`          | `int`   | *auto*               | Explicit font size in px (overrides ratio).             |\n| `caption_size_ratio` | `float` | `0.30`               | Caption height as fraction of QR width.                 |\n| `caption_color`      | `str`   | `\"#000000\"`          | Color of the caption text.                              |\n| `caption_padding`    | `int`   | `4`                  | Vertical gap (px) between QR and caption.               |\n| `caption_offset`     | `int`   | `-20`                | Shift caption up/down relative to gap (negative is up). |\n\n\n\n---\n\n## Examples\n\n### 1. Basic QR with Default Styling\n\nGenerate a simple QR code with the default parameters:\n```python\ngenerate_stylish_qr(\n    url=\"https://openai.com\"\n)\n```\n\n### 2. QR with Centered Icon\nEmbed and tint an icon in the middle of the QR code:\n```python\ngenerate_stylish_qr(\n    url=\"https://example.com\",\n    icon_path=\"./icons/logo.png\",\n    icon_color=\"#FF0000\",        # Tint the icon red\n    icon_size_ratio=0.2,         # Icon width = 20% of QR width\n    icon_border=20               # 20 px padding around the icon\n)\n\n```\n### 3. QR with Overlapping Caption\nAdd a large caption that overlaps into the bottom border of the QR:\n```python\ngenerate_stylish_qr(\n    url=\"https://project.com\",\n    caption=\"Visit Now!\",\n    caption_size_ratio=0.30,     # Caption height = 30% of QR width\n    caption_offset=-40,          # Pull the text 40 px up into the QR\n    caption_color=\"#1f2937\"      # Navy‐blue caption text\n)\n\n```\n\n---\n\n## License\n\nThis documentation is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).  \nYou are free to **share** (copy and redistribute in any medium or format) and **adapt** (remix, transform, and build upon) this work for any purpose, even commercially, under the following terms:\n\n1. **Attribution** — You must give appropriate credit, provide a link to the license, and indicate if changes were made.  \n2. **ShareAlike** — If you remix, transform, or build upon this material, you must distribute your contributions under the same license as the original.\n\nFor details, see:  \n\u003chttps://creativecommons.org/licenses/by/4.0/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falessioborgi%2Fqrcodegenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falessioborgi%2Fqrcodegenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falessioborgi%2Fqrcodegenerator/lists"}