| Filename | Latest commit message | Latest commit date |
|---|---|---|
| export.py | ||
| README.md | ||
wagotabi data
some notes on looking at wagotabi's data while trying to export my dictionary.
this assumes you're looking at a unity project export of wagotabi from AssetRipper
words
each word has a key assigned to it, in the format K00000 or B00000. they are all in JapaneseWordsData.asset, which is a YAML file that has arrays for the keys and their values respectively. the value for a word is each property, but separated with tabs. like so:
MonoBehaviour:
_header:
- conjugation index
- kanji index
- word
- ...
_keys:
- K00001
- ...
_content:
- "[conjugation index]\t[kanji index]\t[word]\t..."
- ...
please see the file itself for all the fields in _header.
this also matches the sound clips in Audio/Words, the files are named after the aforementioned keys.
examples
the example sentences are in ExempleSentencesData.asset (duh) and i am not really bothered to look into it too much. it should be self explanatory
your dictionary
i made a script that uses the word data to export your dictionary. after getting the word data with AssetRipper, find your save data. on linux it's likely in:
~/.config/unity3d/WagotabiLimited/Wagotabi/UserSave~/.var/app/com.valvesoftware.Steam/config/unity3d/WagotabiLimited/Wagotabi/UserSave/
take the path to your save and add D to the end, resulting in a path like ~/.config/unity3d/WagotabiLimited/Wagotabi/UserSave/[long UUID]/D - your dictionary!
now you can run the script:
python export.py JapaneseWordsData.asset ~/path/to/wagotabi/save/D output.json
you should find a JSON export of your dictionary in output.json.
notes on structure
the dictionary is made of base64 encoded json files, so if you're on linux you can do this:
base64 -di d_1.data | jq
and get this:
{
"W": [
{
"K": "K00001",
"I": 63925959420,
"T": [
155,
355560,
1188926
],
"S": [
true,
true,
true
]
},
{ insert data for next word here }
]
}
so, to get all of the word IDs (as in Kxxxxxx) in your dictionary, you could run this in the D directory:
cat * | base64 -di | jq -r .W[].K
i don't know what the other fields are