{"id":34656192,"url":"https://github.com/marcoroth/swiss_qr_bill","last_synced_at":"2025-12-24T18:05:27.726Z","repository":{"id":269514016,"uuid":"907644345","full_name":"marcoroth/swiss_qr_bill","owner":"marcoroth","description":"A Ruby Gem for reading and parsing Swiss QR-Bills from documents like PDFs and images.","archived":false,"fork":false,"pushed_at":"2025-12-22T18:53:18.000Z","size":4642,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-24T07:50:34.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/marcoroth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"marcoroth"}},"created_at":"2024-12-24T04:12:07.000Z","updated_at":"2025-12-22T18:53:20.000Z","dependencies_parsed_at":"2024-12-24T05:37:51.966Z","dependency_job_id":"1b6aa210-121e-47ca-a305-2a3dafcc366a","html_url":"https://github.com/marcoroth/swiss_qr_bill","commit_stats":null,"previous_names":["marcoroth/swiss_qr_bill"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/marcoroth/swiss_qr_bill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Fswiss_qr_bill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Fswiss_qr_bill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Fswiss_qr_bill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Fswiss_qr_bill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcoroth","download_url":"https://codeload.github.com/marcoroth/swiss_qr_bill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Fswiss_qr_bill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28005977,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"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":[],"created_at":"2025-12-24T18:02:46.925Z","updated_at":"2025-12-24T18:05:27.717Z","avatar_url":"https://github.com/marcoroth.png","language":"Ruby","funding_links":["https://github.com/sponsors/marcoroth"],"categories":[],"sub_categories":[],"readme":"# SwissQRBill\n\nA Ruby Gem for reading and parsing Swiss QR-Bills from documents like PDFs and images.\n\nThis gem is meant for reading and parsing Swiss QR-Bill codes out of documents, if you are looking to generate Swiss QR-Bills check out the [`qr-bills`](https://github.com/damoiser/qr-bills) and [`prawn-swiss_qr_bill`](https://github.com/mitosch/prawn-swiss_qr_bill) gems.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add swiss_qr_bill\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```bash\ngem install swiss_qr_bill\n```\n\nInstall the required NPM packages:\n\n```bash\nyarn add @andreekeberg/imagedata pdf-to-png-converter jsqr\n```\n\n#### Note\n\nThis gem is built on top of the [`jsQR`](https://github.com/cozmo/jsQR) NPM package, which means you need to be running [Node.js](https://nodejs.org/en). We utilize the [`nodo`](https://github.com/mtgrosser/nodo) gem for calling out to Node.js.\n\nTL;DR: as long as you have Node.js installed and the above listed NPM packages installed you shouldn't notice that it's calling out to Node.js.\n\n\n## Usage\n\nGiven the following QR-Bill:\n\n![](https://github.com/marcoroth/swiss_qr_bill/blob/main/test/fixtures/muster-qr-zahlteile-en/Nr.%201%20englisch.jpg?raw=true)\n\nYou can read out it's information using:\n\n```ruby\nrequire \"swiss_qr_bill\"\n\nqr_bills = SwissQRBill.parse_file(\"path/to/invoice.pdf\")\n\nqr_bills.first\n# =\u003e\n#  #\u003cdata SwissQRBill::QRBill\n#    header=#\u003cdata SwissQRBill::QRBill::Header qr_type=\"SPC\", version=\"0200\", coding_type=\"1\"\u003e,\n#    creditor_information=#\u003cdata SwissQRBill::QRBill::CreditorInformation iban=\"CH6431961000004421557\"\u003e,\n#    creditor=#\u003cdata SwissQRBill::QRBill::StructuredAddress type=\"S\", name=\"Health insurance fit\u0026kicking\", street=\"Am Wasser\", building_number=\"1\", postal_code=\"3000\", town=\"Bern\", country=\"CH\"\u003e,\n#    ulimate_creditor=#\u003cdata SwissQRBill::QRBill::StructuredAddress type=\"\", name=\"\", street=\"\", building_number=\"\", postal_code=\"\", town=\"\", country=\"\"\u003e,\n#    debtor=#\u003cdata SwissQRBill::QRBill::StructuredAddress type=\"S\", name=\"Sarah Beispiel\", street=\"Mustergasse\", building_number=\"1\", postal_code=\"3600\", town=\"Thun\", country=\"CH\"\u003e,\n#    payment_amount_information=#\u003cdata SwissQRBill::QRBill::PaymentAmountInformation amount=111.0, currency=\"CHF\"\u003e,\n#    payment_reference=#\u003cdata SwissQRBill::QRBill::PaymentReference type=\"QRR\", reference=\"000008207791225857421286694\", additional_information=\"Premium calculation July 2020\"\u003e,\n#    trailer=#\u003cdata SwissQRBill::QRBill::Trailer trailer=\"EPD\"\u003e,\n#    additional_information=#\u003cdata SwissQRBill::QRBill::AdditionalInformation billing_information=nil, av1=nil, av2=nil\u003e,\n#    raw=[...]\n#   \u003e\n\nqr_bills.first.creditor\n# =\u003e\n#  #\u003cdata SwissQRBill::QRBill::StructuredAddress\n#    type=\"S\",\n#    name=\"Health insurance fit\u0026kicking\",\n#    street=\"Am Wasser\",\n#    building_number=\"1\",\n#    postal_code=\"3000\",\n#    town=\"Bern\",\n#    country=\"CH\"\n#  \u003e\n\nqr_bills.first.to_s\n# =\u003e \"SPC\\n0200\\n1\\nCH6431961000004421557\\nS\\nHealth insurance fit\u0026kicking\\nAm Wasser\\n1\\n3000\\nBern\\nCH\\n\\n\\n\\n\\n\\n\\n\\n111.0\\nCHF\\nS\\nSarah Beispiel\\nMustergasse\\n1\\n3600\\nThun\\nCH\\nQRR\\n000008207791225857421286694\\nPremium calculation July 2020\\nEPD\\n\\n\\n\"\n```\n\n## Additional Information\n\n#### Specification\n\n* [Swiss Implementation Guidelines for the QR-bill](https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-en.pdf)\n* [Six Download Center (For sample data, specifications, and more)](https://www.six-group.com/en/products-services/banking-services/payment-standardization/downloads-faq/download-center.html)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/marcoroth/swiss_qr_bill. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/marcoroth/swiss_qr_bill/blob/main/CODE_OF_CONDUCT.md).\n\n## Code of Conduct\n\nEveryone interacting in the SwissQRBill project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/marcoroth/swiss_qr_bill/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoroth%2Fswiss_qr_bill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcoroth%2Fswiss_qr_bill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoroth%2Fswiss_qr_bill/lists"}