coolmule0 / jlpt-n5-n1-japanese-vocabulary-anki Goto Github PK
View Code? Open in Web Editor NEWScript to generate Japanese JLPT Anki deck used in https://ankiweb.net/shared/info/1550984460
License: GNU General Public License v3.0
Script to generate Japanese JLPT Anki deck used in https://ankiweb.net/shared/info/1550984460
License: GNU General Public License v3.0
Hello,
I tried to run your scripts, but somehow all of them seem to crash:
2023-09-27 22:20:32,172 INFO ---------- Converting jlpt-n5
Traceback (most recent call last):
File "/home/jnnk/build/git/JLPT-N5-N1-Japanese-Vocabulary-Anki/createJLPTDeck.py", line 459, in <module>
download_and_generate(N, args.type)
File "/home/jnnk/build/git/JLPT-N5-N1-Japanese-Vocabulary-Anki/createJLPTDeck.py", line 415, in download_and_generate
pddata = pd.read_json(json_file, orient="split", encoding="utf-8")
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 804, in read_json
return json_reader.read()
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1014, in read
obj = self._get_object_parser(self.data)
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1040, in _get_object_parser
obj = FrameParser(json, **kwargs).parse()
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1173, in parse
self._parse()
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1376, in _parse
for col in decoded["columns"]
KeyError: 'columns'
$ pipenv shell
Warning: Python 3.9 was not found on your system...
Would you like us to install CPython 3.9.18 with Pyenv? [Y/n]: y
Installing CPython 3.9.18 with /usr/bin/pyenv (this may take a few minutes)...
✔ Success!
⠙ Installing python...
Creating a virtualenv for this project...
Pipfile: /home/jnnk/build/git/JLPT-N5-N1-Japanese-Vocabulary-Anki/Pipfile
Using /home/jnnk/.pyenv/versions/3.9.18/bin/python3.9 (3.9.18) to create virtualenv...
⠙ Creating virtual environment...created virtual environment CPython3.9.18.final.0-64 in 114ms
creator CPython3Posix(dest=/home/jnnk/.local/share/virtualenvs/JLPT-N5-N1-Japanese-Vocabulary-Anki-CPLiNN8i, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/jnnk/.local/share/virtualenv)
added seed packages: pip==23.2.1, setuptools==68.2.0, wheel==0.41.2
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Virtualenv location: /home/jnnk/.local/share/virtualenvs/JLPT-N5-N1-Japanese-Vocabulary-Anki-CPLiNN8i
Launching subshell in virtual environment...
. /home/jnnk/.local/share/virtualenvs/JLPT-N5-N1-Japanese-Vocabulary-Anki-CPLiNN8i/bin/activate
Found pyenv, but it is badly configured (missing pyenv shims in $PATH). pyenv might not
work correctly for non-interactive shells (for example, when run from a script).
To fix this message, add these lines to the '.profile' and '.zprofile' files
in your home directory:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
You'll need to restart your user session for the changes to take effect.
For more information go to https://github.com/pyenv/pyenv/#installation.
$ pip install pandas
$ pip install bs4
python createJLPTDeck.py -v --type extended
2023-09-27 22:20:01,124 DEBUG Searching https://jisho.org/api/v1/search/words?keyword=%23jlpt-n5&page=1
2023-09-27 22:20:02,648 DEBUG Found 20 results
...
2023-09-27 22:20:31,434 DEBUG Found 17 results
2023-09-27 22:20:31,434 DEBUG Searching https://jisho.org/api/v1/search/words?keyword=%23jlpt-n5&page=34
2023-09-27 22:20:32,133 DEBUG Found 0 results
2023-09-27 22:20:32,133 INFO Found 33 pages
2023-09-27 22:20:32,172 INFO ---------- Converting jlpt-n5
Traceback (most recent call last):
File "/home/jnnk/build/git/JLPT-N5-N1-Japanese-Vocabulary-Anki/createJLPTDeck.py", line 459, in <module>
download_and_generate(N, args.type)
File "/home/jnnk/build/git/JLPT-N5-N1-Japanese-Vocabulary-Anki/createJLPTDeck.py", line 415, in download_and_generate
pddata = pd.read_json(json_file, orient="split", encoding="utf-8")
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 804, in read_json
return json_reader.read()
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1014, in read
obj = self._get_object_parser(self.data)
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1040, in _get_object_parser
obj = FrameParser(json, **kwargs).parse()
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1173, in parse
self._parse()
File "/home/jnnk/.pyenv/versions/3.9.18/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1376, in _parse
for col in decoded["columns"]
KeyError: 'columns'
Extract sonkeigo (e.t.c) tags (i.e. formality) of definitions and additional definitions and present them appropriately.
Currently only uses Jisho. There are many other locations available with high quality audio that could be used to fill in audio gaps
Jisho provides a grammar point "usually written with kana". Use kana instead of Kanji for the main reading when this is the case.
Brought up by houseclearout on Reddit
Have a column/section of columns containing a sentence/example sentences.
Could potentially also have audio for these sentences, if there is a resource of them
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.