Giter VIP home page Giter VIP logo

mnemocards's Issues

Autogenerated cards misplace translations into wrong columns

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?

mnemocards doesn't work after installation due to idna version conflict and changes in anki

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 /docker/run.sh doesn't work.

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

Tags appear in content of generated markdown cards

When generating the example markdown cards in `examples/computer_science' I see the tags in the content of card like this:

Screen Shot 2020-04-29 at 13 35 18

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:

header = "*Tags: " + ", ".join(note_tags) + "*\n" + header

I changed this line to

header = "" + header

and that generated what I expected.

Mnemocards Logo

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.

Does the expression type support audio?

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"
                    }
                }
            ]
        }
    ]
}

Autogenerated cards put the card translation into the explanation field

As you can see in the screenshot, on Google Translate the box under the translated word features words in both languages.

image

Autogenerating fetchs the entire box, resulting in both translations appearing in the explanatory field.
image

image

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.

Use Poetry

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.

Improve way of reading files

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.

Error: "The 'None' distribution was not found and is required by mnemocards"

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.