tmaier / asn-qr-code-label-generator

QR Code Label Generator for ASNs in Paperless-ngx
https://tobiasmaier.info/asn-qr-code-label-generator/
GNU Affero General Public License v3.0
45 stars 26 forks source link

Generate QR codes locally #6

Open leimer opened 5 months ago

leimer commented 5 months ago

Thanks for your highly appreciated work on the label template. I like it a lot :-) Thank you very much!

I came to notice the script is using an online service to render QR codes. I'd like to suggest to use a simple and stable javascript library to generate the QR codes locally without any additional network traffic. This website - once stored locally - can then be used at offline locations.

leimer commented 5 months ago

Just realized: the codes get only rendered once. Feels like the x-init attribute is executed only once. I will update my PR. Please stay tuned ;-)

tmaier commented 4 months ago

Hi, thanks for your contribution.

You are using a very dated library. One which has not been updated for 9 years. Please consider replacing it with a more popular solution.

leimer commented 4 months ago

You are using a very dated library. One which has not been updated for 9 years. Please consider replacing it with a more popular solution.

I tried switching to qrcode, but it loads dependencies by require, which is unavailable inside the browser. I found less popular but newer QRious library, which works even smoother. Feels like the qrcode libraries are pretty stable.

Since this is a very simple tool, with only local execution, I don't have the normal paranoia regarding updated libs.