Open lewisbelcher opened 2 months ago
Extra questions / things to consider:
After some exploration, here is a script that should produce a QR for a list of 30 Uint64 IDs:
const pako = require('pako');
const QRCode = require('qrcode');
// Some example IDs:
const arr = new BigUint64Array([1n, 2n, 3n, 4n, 5n, 6n, 7n, 8n, 9n, 10n, 11n, 12n, 13n, 14n, 15n, 16n, 17n, 18n, 19n, 20n, 21n, 22n, 23n, 83383n, 123n, 9999n, 18446744073709551613n, 111n, 123n, 678n]);
// Compress these IDs using pako:
const compressed = pako.deflate(arr.buffer);
// Test decompressing to check that the ouput is the same:
const uncompressed = pako.inflate(compressed);
const uncompressed_arr = new BigUint64Array(uncompressed.buffer);
// Create a QR code:
QRCode.toFile(
'qr-code.png',
[{data: compressed.buffer, mode: 'byte' }],
{ version: 7 },
function (err, url) {
console.log(url)
})
Extra questions / things to consider:
* How do we deal with multi-day events? They have the same ID across multiple days. At the moment we'll need to just assume attendance to one day implies attendance to all days * Event clusters in general and multi-shift events? How can we adjust for these?
Example of QR code generated in Zetkin calendar
Description
A user should be able to:
Part 1 is useful as a standalone feature.
The intention for part 2 (scanning the sign-up sheets) is to encode selected event IDs in a QR code and include this in a corner of the sign-up sheet. This QR code can then be used to not only communicate which events are present on the page and in what order, but also to locate the document and, in turn, locate relevant checkboxes and identify whether they have been checked.
QR code creation
At the moment is assumed that only event IDs need to be encoded in the QR code, but this may be extended in the future.
What size QR code do we need?
Estimated issue size
I think this issue is large because it involves implementing new, non-trivial functionality (document creation, QR encoding, computer vision).
Prerequisites
All platform-related prerequisites are already met.
Requirements
Possible implementations
Entirely JS based
Webassembly
Webassembly could be explored as an alternative to JS.
Design specifications
TODO
Open questions