guiferviz / mnemocards Goto Github PK
View Code? Open in Web Editor NEWIn addition to helping you memorise, this code helps you do other things that I don't remember...
Home Page: https://guiferviz.com/mnemocards
License: MIT License
In addition to helping you memorise, this code helps you do other things that I don't remember...
Home Page: https://guiferviz.com/mnemocards
License: MIT License
Hello, I'm trying to autogenerate cards from English to French. I've set the lang field in cards_config.json
"id": "29b15499-d339-4b1c-8b31-2d7466a29a2b",
"name": "French Vocabulary - English to French",
"src":
[
{
"type": "autogenerate",
"file": "words.txt",
"card_color": "#33AA33",
"show_tags": true,
"card_properties":
{
"tags": ["french", "vocabulary", "autogenerated"]
},
"header": false,
"pronunciation_in_reverse": false,
"lang":
{
"original": "en",
"translation": "fr"
},
"one_translation": false,
"audio": true
}
]
The words.txt file contains three words in English
car
January
Monday
The translations generated by mnemocards generate and mnemocards maketsv place the generated translations in wrong columns:
ID YourLanguageWord YourLanguageExplanation LanguageYouLearnWord LanguageYouLearnPronunciation LanguageYouLearnExplanation Tags
0c452564-88b7-c86e-8906-bdc1d505d5cd janvier January ˈjanyəˌwerē <div class="definitions"><div class="speechpart">Nom</div><div class="line_1">the first month of the year, in the northern hemisphere usually considered the second month of winter.</div><div class="line_2">Sophie was two in January</div></div>
1d686100-a3c0-c2c2-1d12-663c8e92706e auto <div class="synonyms"><div class="speechpart">Nom</div><div class="line_1">voiture</div><div class="line_2">['car', 'vehicle', 'carriage', 'coach', 'wagon', 'motor']</div><div class="line_1">car</div><div class="line_2">['car', 'bus', 'motor']</div><div class="line_1">wagon</div><div class="line_2">['car', 'wagon', 'coach', 'waggon', 'waggonload']</div></div> car kär <div class="definitions"><div class="speechpart">Nom</div><div class="line_1">a four-wheeled road vehicle that is powered by an engine and is able to carry a small number of people.</div><div class="line_2">she drove up in a car</div></div>
3c672ad7-8386-4ba3-29f9-1a0c5ca17138 Lundi <div class="synonyms"><div class="speechpart">Nom</div><div class="line_1">lundi</div><div class="line_2">['Monday']</div><div class="line_1">le lundi</div><div class="line_2">['Monday']</div></div> Monday ˈməndā <div class="definitions"><div class="speechpart">Nom</div><div class="line_1">the day of the week before Tuesday and following Sunday.</div><div class="line_2">I saw him on Monday</div></div>
As you can see, the words contained in YourLanguageWord are in French, when they are supposed to be in English. It seems to be that this is opposite of intended behavior. The field YourLanguageWord is supposed to be "The word you want to learn but in your mother tongue or in a known language."
Has anyone encountered this issue?
Currently, mnemocards don't work because it has version conflict in the requirements and updates in anki.
Both httpx
and requests
require idna
<3.* (psf/requests#5710) but idna==3.3
is installed via some other dependencies.
Anki changed one of the module names in the latest version, removing capitalization (from Collections
to collections
)
So mnemocards crashes if the previous version conflict is resolved.
This issue was open for visibility.
Solutions are provided within my pull request with a new feature #16
Script for docker doesn't work, because docker image doesn't have "latest" tag.
$ sudo ./run.sh
Unable to find image 'guiferviz/mnemocards:latest' locally
docker: Error response from daemon: manifest for guiferviz/mnemocards:latest not found: manifest unknown: manifest unknown.
You also can't pull image from docker hub with docker pull guiferviz/mnemocards
for the same reason.
Current workaround:
Rewrite line guiferviz/mnemocards
in run.sh
to guiferviz/mnemocards:v0.1.3
the script starts working.
Solution:
Add image with latest
tag https://hub.docker.com/r/guiferviz/mnemocards/tags
When generating the example markdown cards in `examples/computer_science' I see the tags in the content of card like this:
This does not match the screenshots in the Readme.
It seems like this line is combining this information which is then added to the content:
I changed this line to
header = "" + header
and that generated what I expected.
Implementation of the any2dict
module following the description on MEP02.
I think this library needs a nice logo. I'm still not sure what it could be and even if I knew, I don't have the artistic skills to be able to make it happen.
Configuration similar to the audio settings of vocabulary type would be nice. I tried adding copy the settings with no success.
{
"packages": [
{
"name": "english",
"decks": [
{
"id": "b698a07e-70eb-474b-82cb-f244a608b21e",
"name": "English",
"src": [
{
"type": "expression",
"file": "expressions.tsv",
"header": true,
"card_color": "#AA3333",
"card_properties": {
"tags": ["english", "expressions"]
}
}
],
"audio": {
"lang": "en",
"media_dir": "./media"
}
}
]
}
]
}
As you can see in the screenshot, on Google Translate the box under the translated word features words in both languages.
Autogenerating fetchs the entire box, resulting in both translations appearing in the explanatory field.
YourLanguageExplanation field should be purged of all references to the foreign language, else it is liable that the word you are supposed to translate will appear there.
Right now the installation process is a bit complicated due to the use of a custom version of Genanki. Using Poetry as package manager may make things easier, it would be nice to give it a try.
It would be great to read a cards_config file in any format, not just JSON. Code must search for cards_config.*
in any format and try to convert the file into a dictionary.
Also, instead of using only TSVs, we can accept CSVs, JSONs, *.cards
or any other format. Code must expect a dictionary as output, don't care about the format.
Doing this allow us to remove ugly thinks like:
note_id, ylw, yle, lylw, lylp, lyle, row_tags = row
that is forcing users to have exactly the same order in their files.
Was super excited to use your add-on but couldn't get it to work.
After installing it this is the error that I see.
➜ mnemocards git:(master) ✗ mnemocards
Traceback (most recent call last):
File "/Users/jyrodgers/.pyenv/versions/3.7.3/bin/mnemocards", line 6, in <module>
from pkg_resources import load_entry_point
File "/Users/jyrodgers/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3191, in <module>
@_call_aside
File "/Users/jyrodgers/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/Users/jyrodgers/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Users/jyrodgers/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/Users/jyrodgers/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/Users/jyrodgers/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'None' distribution was not found and is required by mnemocards
I'm running Python 3.7.3 and pip 20.1.
Thank you for any help that you can provide.
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.