Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A helper tool to produce QR codes to be used on website and elsewhere #509

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yarikoptic
Copy link
Contributor

@yarikoptic yarikoptic commented Sep 21, 2024

Most likely I should move this PR somewhere else, https://github.com/bids-standard/artworks ? , but it was partially inspired because I saw bit.ly watermarked QR codes somewhere on website. Also for a poster(s) wanted to create branded QR codes... With this tool we get "smallest" but guaranteed to be readable QR code -- tool sweeps through incrementing levels of redundancy and verifies that QR becomes readable.

Example:

❯ tools/mkqrcode_bids -o /tmp/proj-bids-qr.png https://github.com/orgs/bids-standard/projects/10/views/1
++ dirname tools/mkqrcode_bids
+ tools/mkqrcode.py -i tools/../docs/assets/img/logos/BIDS_logo_black_square_in_circle.png -o /tmp/proj-bids-qr.png https://github.com/orgs/bids-standard/projects/10/views/1
2024-09-21 17:55:35,710 - INFO - Successfully decoded text: 'https://github.com/orgs/bids-standard/projects/10/views/1' encoded with compress quality M. File /tmp/proj-bids-qr.png

produces

image

TODOs

  • probably move where more appropriate
  • provide mkqrcode-requirements.txt ?
  • replace qr codes here? (could still lead to bit.ly for visitors count etc)
  • anything else?

may be

  • add control over image size?
  • I don't think we can produce svg with this backend/approach since uses PIL so raster

@Remi-Gau
Copy link
Contributor

I would be fine having it in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants