Fancy Galaxy Code creator package.
Project description
Fancy Galaxy Code (FGC)
Fancy Galaxy Code (FGC) is an open source standard for fast and reliable data representation while maintaining a nice look and feel.
FGC strifes to serve as a prettier QR-Code straight from the future.
Contributions and integrations into projects are highly appreciated!
Specification
Data processing
- 4 Version bits
- n Data + Hamming Code correction bits
Data representation
General structure
Center point is thick and has a distance d to the ring surrounding it.
All of the rings have exactly distance d to every previous and next ring.
The dot in the ring around it represents the orientation (0 degrees).
The black dot in the outer ring is for orientation purposes as well.
Every ring has an amount of n bits, calculated with: degree_per_bit = max(5, max(1, 20 / max(1, ring_number / 2)))
That means the rings can store up to degree_per_bit - 1 bits, since the first bit of every layer is always a 0.
Data representation
If the next bit is the same as this bit: Draw an arc
If the next bit is not the same as this bit: Draw a dot
Also:
In the last layer there is an orientation point for easier orientation calculation, if it fits.
It fits if the last layer has space for it.
If it does not fit, it has to be placed in a seperate layer without any data.
After the orientation point, the sequence starts with the normal non-data 0.
Visual explanation
Code execution
Before execution you have to install the requirements by executing:
pip install -r requirements.txt
Execution:
python3 main.py 'Content of fgc' outputfile.svg
Use the fgc-tools package
Install the package via:
pip install fgc-tools
Import the FGCCreator class and create an fgc:
from fgc_tools import FGCCreator
FGCCreator.create_fgc(data, output_file, color_start, color_end, background_color)
Example svg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fgc_tools-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aa65883e3cc63032c3c8d4c849556c24b8698d0d513e8ece710d624cab97a6f |
|
MD5 | b917765fd31a5885c5708c7e73bb0064 |
|
BLAKE2b-256 | 5abeabf03c4885052ed53042608ae2be32916ba4ebf0272c3320886cfa9847d9 |