Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dridk/qrfontain
Transferring data through a sequence of QR codes using a fountain code.
https://github.com/dridk/qrfontain
Last synced: about 1 month ago
JSON representation
Transferring data through a sequence of QR codes using a fountain code.
- Host: GitHub
- URL: https://github.com/dridk/qrfontain
- Owner: dridk
- License: gpl-3.0
- Created: 2024-10-26T13:53:05.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T23:10:10.000Z (2 months ago)
- Last Synced: 2024-11-26T17:52:33.923Z (about 2 months ago)
- Language: Python
- Size: 15.9 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qrfontain
Transferring data through a sequence of QR codes using a fountain code.This tool enables file transfers by generating multiple QR codes using
the [Luby Transform Code](https://en.wikipedia.org/wiki/Luby_transform_code) thanks to [anrosent/Lt-code](https://github.com/anrosent/LT-code).
This fountain code allows the receiver to scan the QR codes in any order while minimizing the amount of data required
to retrieve the complete file.![](qrfontain.gif)
## Installation
```
git clone [email protected]:dridk/qrfontain
cd qrfontain
python -m virtualenv venv
pip install -e .```
## Usage
### Encode and Decode a stream of QR CodeYou can stream data to QR Codes using a generator of PIL Images:
```python
import qrfontainwith open("big.txt", "rb") as file:
for image in qrfontain.data_to_qrcode(file):
# Display image
# show(image)```
You can decode PIL images as follow :
```python
import qrfontainwith open("output.txt", "wb") as file:
# Get QR Code images
# images = Generator..
data = qrfontain.data_from_qrcode(images)
file.write(data)```
There is a short hand to create a video with a sample of qrcode generated :
### From python
```pythonimport qrfontain
qrfontain.create_video("big.txt", "big.webm")```
### From bash
```bash
qrfontain --input big.txt --output big.webm```
## Decode using a gui_receiver.py
I made a GUI to extract animated QR codes from your desktop.
Install Pyside6 ```pip install pyside6``` and run ```python gui_receiver.py```Check the video above:
![Screencast](https://github.com/dridk/qrfontain/raw/refs/heads/main/gui_receiver.webm)## Similar projects
- [https://github.com/digitalbazaar/qram](https://github.com/digitalbazaar/qram)
- [https://github.com/divan/txqr](https://github.com/divan/txqr)