qrcode-toolkit
qrcode-toolkit copied to clipboard
Programmaticaly Create QR Codes
Clear and concise description of the problem
hello,
thanks for this project, it is extremely impressive. For a project of my own, i am interested in creating qr codes programmatically (given a list of texts, and a json giving all the attributes of the qrcode) and right now i have re-implemented in python a number of the features you have, by looking at the underlying libraries etc.
however i feel like maybe i could spin up the server locally and simply send requests to it?
i haven't used nuxt in a long time, and also wouldn't really know exactly which request i should be doing. one per text is absolutely fine, we don't need to implement a batch mode, a for loop would work perfectly.
Suggested solution
a small guide on how to get setup locally + where the important function calls are so people can tinker with it a bit
Alternative
as i said, i have tried implementing it in python, and i can do different markers style, only show data or function modules, different colours etc, but i can't do all you have, and the crystallize/liquify effects are pretty hard to draw on svg (that i then convert to PIL)
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Hello, have you solved this problem? I also have the same demand. If you have solved it, please give a demo. Thank you
I have been able to run the project as is, and then modified the download function in components/Generator.vue
. Basically now when I go to batch mode at localhost:3000/batch, the download buttons download more than one QR code.
Here's what I have, but please change generateRandomString()
to what you want to put into the QR code.
async function download() {
const c = canvas.value!
const a = document.createElement('a')
for (let i = 0; i < 5; i++) {
state.value.text = generateRandomString()
await generateQRCode(c, state.value)
a.href = c.toDataURL('image/png')
a.download = `${state.value.text}.png`
a.click()
await new Promise(resolve => setTimeout(resolve, 50))
}
}
Hope you find this useful