https://github.com/alix-tz/virtual-kabbage
A virtual-keyboard generator for eScriptorium 🥬
https://github.com/alix-tz/virtual-kabbage
csv2json escriptorium utils
Last synced: 3 months ago
JSON representation
A virtual-keyboard generator for eScriptorium 🥬
- Host: GitHub
- URL: https://github.com/alix-tz/virtual-kabbage
- Owner: alix-tz
- License: mit
- Created: 2023-02-04T00:04:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-06T14:36:23.000Z (about 2 years ago)
- Last Synced: 2025-09-09T04:05:33.704Z (7 months ago)
- Topics: csv2json, escriptorium, utils
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Virtual Kabbage :leafy_green: - A virtual-keyboard generator for eScriptorium
## Usage
Install dependencies in a virtual environment with pip (`pip install -r requirements.txt`) and run `cook.py` providing up to three arguments:
- `-i` : (required) path to CSV file used to generate the virtual keyboard (sep must be `,`!).
- `-auth` : (opt) allows you to add a value to the "author" field in the final JSON file.
- `-k` : (opt) allows you to specify a value for the "name" field in the final JSON file.
## Examples
``` sh
$ python cook.py -i test/test.csv
>>> ...
"version": "0.1",
"name": "test",
"author": "Virtual Kabbage",
"characters": [
...
```
```sh
$ python cook.py -i test/test.csv -auth "Jane Doe "
>>> ...
"version": "0.1",
"name": "test",
"author": "Virtual Kabbage & Jane Doe ",
"characters": [
...
```
```sh
$ python cook.py -i test/test.csv -auth "Jane Doe " -k "my nice keyboard"
>>> ...
"version": "0.1",
"name": "my nice keyboard",
"author": "Virtual Kabbage & Jane Doe ",
"characters": [
...
```
## Expected mapping
Input: `my_kbd.csv`
``` csv
a,b,c
d,,
```
Output: `my_kbd.json`
``` json
{
"version": "0.1",
"name": "my_kbd",
"author": "Virtual Kabbage",
"characters": [
{
"row": 0,
"column": 0,
"character": "a",
"keyboard_code": null
},
{
"row": 0,
"column": 1,
"character": "b",
"keyboard_code": null
},
{
"row": 0,
"column": 3,
"character": "c",
"keyboard_code": null
},
{
"row": 1,
"column": 0,
"character": "d",
"keyboard_code": null
}
]
}
```