This is a convergent repository for various qr code data storage projects with the goal of creating a single data storage solution that encapsulates all the data (and any code) inside a single JSON file and single qr code video.
The current version encapsulates the following file types within a single 'qr code video' and JSON file: python scripts, an html file, a text file, bash scripts, a javascript file and a zip file.
https://github.com/txtatech/qros-storage/tree/main/qros-storage/qros-dna-main
https://github.com/txtatech/qros-storage/tree/main/qros-storage/qros-dna
https://github.com/txtatech/qros-storage/tree/main/qros-storage/qros-dna-live
https://github.com/txtatech/qros-storage/tree/main/qros-storage/qros-builder
Use 'qros-builder-lite' for standalone file encoding and decoding without qr codes or qr code video files:
https://github.com/txtatech/qros-storage/tree/main/qros-storage/qros-builder-lite
- Encodes and decodes text like DNA.
- Keeps track of version info and other metadata.
- Cleans and parses code files.
- Stores everything in a JSON file.
- Generates QR codes from encoded data.
- Creates videos from QR codes.
- Maps common words to shorter versions.
- Can reverse the mapping to get original text back.
- Adds version, author, and timestamps to data.
- Removes comments from code.
- Stores cleaned code in a JSON file.
- Organized like DNA (Genomes > Chromosomes > Genes).
- Saves mappings in 'introns'.
- Can save other data in 'exons'.
- Transforms encoded data into QR codes.
- Allows multiple QR codes for large data.
- Combines QR codes into a video sequence.
- Can set video duration and transition effects.
- Can decode data back to its original form.
Generates DNA-like code representations for characters and character combinations ranging from one to five characters long. These generated mappings are used to encode text data.
It reads text data from an input file, applies consistent mappings using the generated DNA-like code, and outputs the mapped data to an output file. This process effectively encodes the text using the DNA-like code representations.
The main script also handles metadata for the encoded data, including versioning and author information.
Step 1:
python3 qros-dna-encoder.py
Step 2:
python3 qros-dna-decoder.py
{
"dna_structure": {
"Genomes": {
"Chromosomes": {
"Genes": {
"Nucleotide Sequences": {
"code": "The `qros-_CATZ-encoder.py` _C _G _T<--...This is 'dna' encoded from a text file that creates the mappings."
}
}
}
},
"introns": {
"mappings": "{'the': '_T', 'qrosdnaencoderpy': '_A',,<--...This is where the mappings are stored."
},
"exons": {
"0shell": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<--...This is the 'live component' javascript shell.",
"0js": "// Simulated JSON containing \"live components\"\n<--...This is the 'live component' javascript backend.",
"0html": "<!DOCTYPE html>\n<html>\n<head>\n <title>Dynamic<--...This is the 'live component' html frontend.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
},
"files": {
"code": "{\"chunks\": [\"H4sIAOtuGmUC_wvwZmbhYmYAgq-STuFK<--...This is a zip file stored as chunks.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
},
"profusion": {
"code": "<html>\n<head>\n <style>\n<--...This is the html file for the stable-profusion frontend.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
},
"emu": {
"loader": "<!doctype html>\n<title>Asynchronous loading of disk images<--...This is the html loader file for V86 OS emulation.",
"libv86": "PLACEHOLDER FOR TESTING SPEED ONLY<--...This is the libV86.js file for OS emulation.",
"v86wasm": "{\"chunks\": [\"H4sIAOtuGmUC_wvwcXR29fD3c<--...This is the V86.wasm file for OS emulation stored as chunks.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
}
},
"initial_strand": {
"code": "#!/bin/bash\n\n_AZ=('T' 'A' 'C' 'G' 'Z')\n<--...This is a bash file for a list of possible combinations.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
},
"second_strand": {
"code": "#!/bin/bash\n\n# Set _T maximum _ACTC _GGT _AZ<--...This is a bash file for splitting large text files.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
},
"third_strand": {
"js-shell": "<!DOCTYPE html>\n<html lang=\"en\">\n<--...This is another javascript shell html file for backend use.",
"encoded-encoder": "# Begin _TTG _ZTA WASM _TAC _GA<--...This is a dna encoded version of the 'qros-dna-encoder.py' file used to encode and create this JSON.",
"encoded-decoder": "# Begin _TTCZ _CT _GTCZ _GGT<--...This is a dna encoded version of the 'qros-dna-decoder.py' file used to decode this JSON.",
"decoder": "# Begin decoding and reconstruction<--...This is a plain text version of the 'qros-dna-decoder.py' file used to decode this JSON.",
"metadata": {
"metadata": {
"version": "1.0",
"author": "AI",
"description": "DNA strand with metadata and versioning",
"timestamp": "2023-10-02T03:19:08.683209"
}
}
}
}
The example JSON file, encoded_dna_data-EXAMPLE.json
, has a complex nested structure. Below is a breakdown of its structure and what each part does:
-
dna_structure: Encapsulates the core data structure meant to mimic a DNA structure.
- Genomes: A further categorization within
dna_structure
.- Chromosomes: Another level of categorization.
- Genes: The lowest level of this hierarchy.
- Nucleotide Sequences: Contains the encoded code, which is a representation of another file's content in an encoded form.
- Genes: The lowest level of this hierarchy.
- Chromosomes: Another level of categorization.
- Genomes: A further categorization within
-
introns: Stores the mappings used for encoding and decoding the code present in
dna_structure
and other strands. The mappings are stored as a string representation of a Python dictionary. -
exons: Contains un-encoded JavaScript code (from the file
web.js
) and associated metadata.- code: The raw JavaScript code.
- metadata: Additional information about this strand like version, author, description, and timestamp.
-
files: Contains compressed, base64 encoded, and chunked data (presumably from a ZIP file). It's also accompanied by metadata.
- code: The compressed and encoded data.
- metadata: Similar to the metadata in
exons
.
-
initial_strand: Stores encoded Python code and metadata for a Python script that presumably encodes this JSON structure.
- code: The encoded Python code.
- metadata: Metadata similar to that in
exons
.
-
second_strand: Similar to
initial_strand
, but this appears to be a Python script for decoding the JSON structure.- code: The encoded Python code for decoding.
- metadata: Additional metadata similar to other strands.
- Encoded Python Code: Found in
initial_strand
andsecond_strand
. - Mappings for Encoding/Decoding: Found in
introns
. - Encoded Text: Found in
dna_structure
. - Raw JavaScript Code: Found in
exons
. - Compressed and Encoded Data: Found in
files
.
This structure allows the JSON file to act as a multi-layered container that holds various types of information, each with its own purpose and encoding logic. It can be used for:
- Data Obfuscation: Encoded Python code and text.
- Data Compression: Chunked and base64 encoded ZIP data.
- Data Integrity: Through metadata for versioning and timestamping.
- Multi-language Support: Holds Python and JavaScript code.
Using the web.js
, index.html
, and the JS shell from the JSON file as "live components" within the encoded_dna_data-EXAMPLE.json
for a live architecture.
Here's how they could function:
This JavaScript file could serve as the "logic layer" for the web interface. It handles asynchronous data fetching and interacts with the DOM elements defined in index.html
. When this component is "live" inside the JSON, it could be fetched and executed on-the-fly to control the web interface dynamically.
This HTML file provides the structural skeleton of the web interface, with elements like a navigation bar and dark mode styles. When embedded as a "live" component in the JSON, it could be fetched and rendered to create the UI, ready to be manipulated by the web.js
.
This component might serve as an interactive terminal or command-line interface on the web. It could allow for real-time execution of JavaScript code, perhaps even interfacing with the other two components. When "live" in the JSON, it could be fetched and initialized to offer an interactive shell within the web interface.
These "live components" could be fetched from the JSON dynamically to assemble a working web interface. They would not be static but could interact with each other:
web.js
would manipulate theindex.html
DOM elements.- The JS shell could execute commands that invoke functions from
web.js
or manipulate theindex.html
elements.
The JSON file, in this case, serves not just as a data store but as a dynamic repository that can deploy a fully functional web interface. This approach allows for a highly modular and portable system, encapsulating code and data in a single JSON structure.
- Dynamic Data Loading: Given its asynchronous nature,
web.js
could fetch other parts of the JSON dynamically, updating the UI without a full page reload. - Event Handling: It could listen for user interactions on the
index.html
elements and execute corresponding functions. For instance, toggling dark mode could change the JSON's state to reflect this user preference. - JS Shell Interactions: Functions within
web.js
might be invokable from the JS shell, offering a programmatic way to control the interface.
- DOM Elements: These could be placeholders for data loaded dynamically via
web.js
. For example, a<div>
could be designated to display decoded text from the JSON. - User Inputs: Form elements in
index.html
could capture user inputs that influence the JSON's state, like selecting which DNA strand to decode.
- Real-time Execution: This could offer a more hands-on way to interact with the JSON. For instance, executing a command could trigger a decode operation in
web.js
. - Debugging: The shell could serve as a real-time debugger, allowing you to check the state of variables or even modify the JSON directly.
- State Management: The JSON could maintain a "live" state of the entire interface, including user preferences, currently displayed data, and even runtime variables.
- Dynamic Code Loading: Beyond data, the JSON could contain the most current versions of
web.js
,index.html
, and the JS shell. This would allow for seamless updates without requiring a manual refresh. - Modularity: Each "live component" could be a modular, replaceable part of the system. For example, an entirely new JavaScript logic layer could be swapped in without changing the HTML or shell components.
- Initialization: On loading the web interface,
web.js
fetchesindex.html
and the JS Shell from the JSON and initializes them. - User Interaction: A user selects an option in
index.html
.web.js
captures this event, updates the JSON's state, and potentially triggers a change in the JS shell. - JS Shell Commands: A command entered into the JS shell updates the JSON and triggers a corresponding update in
web.js
andindex.html
.
By incorporating these components as "live" elements within a JSON file, you'd essentially have a self-contained, dynamically updatable, and highly modular system. This concept has the potential for high portability, ease of updates, and even real-time collaborative features.
https://github.com/txtatech/qros-builder-webby
A cross platform linux distribution built with qr code videos that can be loaded in a browser. This is just the base system with all the qr code videos and required scripts to utilize the os in a browser.
https://github.com/txtatech/qros-builder-vid
Builds KolibriOS from qr codes embedded in a video and launches the small assembly written OS in qemu.
https://github.com/txtatech/qros-builder-vid
Also builds KolibriOS from qr codes and launches the small assembly written OS in qemu.
https://github.com/txtatech/qr-vid-gui
GUI version of a method to extract code from qr codes in a video, output it to a live python editor, the terminal and a text file.
https://github.com/txtatech/qr-vid
A method to extract code from qr codes in a video, output it to a live python editor, the terminal and a text file.
https://github.com/txtatech/qr-gif
A method to extract code (javascript in this example) from qr codes in an animated gif, print it to the terminal and output it as a text file.
https://github.com/txtatech/frac-crawl
A fractal encoding framework written in Python that generates fractal images based on a given text input, builds a central ledger, and updates the metadata of the images. It then builds a JSON lattice with a coordinate mapping system to create a seamless self-referencing fractal terrain.
https://github.com/txtatech/fractal-encoder
A fractal encoding framework for fractal encoding text, lattice structuring, ASCII art qr code generation, 3D QR code and fractal grid generation plus mappings for programmable terrain.
This is a sub-project of the virtual-forest project.
The DNA encoding framework source files are in 'game_instance_sandbox/djinn-dna':
https://github.com/txtatech/virtual-forest/tree/main/virtual-forest/game_instance_sandbox/djinn-dna
Djinn-DNA Note: The README-DNA.txt explains the steps involved.