ospalh / anki-addons Goto Github PK
View Code? Open in Web Editor NEWA collection of Anki 2.1 addons in different states of bugginess, up-to-dateness and usefulness.
Home Page: http://ospalh.github.io/anki-addons/
A collection of Anki 2.1 addons in different states of bugginess, up-to-dateness and usefulness.
Home Page: http://ospalh.github.io/anki-addons/
Steps to reproduce the error:
This error only occurs when the cursor is in the audio field when the toolbar button is clicked.
@MiaoBlubb has suggested:
I have an korean(class)101.com account, would this help to add a Korean audio-download function? Their data-base is not as good as japanesepod101.com, though.
Apparently there is no close_fds for windows.
Since 1st January your addon can't find audio files from japanesepod.
I think they've changed the paths or something else.
download_audio plugin
Pronunciations from Oxford Advanced American Dictionary for “en-us” are not available anymore. Over sources of sounds seem to work fine. For example, for the word “book” I receive pronunciations from Merriam-Webster, HowJSay, Wiktionary and Google TTS, but not OAAD.
Thanks in advance.
Anki Version 2.0.28
Qt 4.8.2 PyQt 4.9.3
Debian GNU/Linux Stable (7.6)
Latest version of download_audio (I presume it's 2.10.0 at the moment).
I sometimes notice that the Add Notes window shows fields from the wrong type, not the one I created the note with (now it's the one I use most, but never for this deck, and it's the one the first button of the add-on is for). The button shows the right one, different from the fields.
I use NoScript, so the page was displayed without the use of JavaScript, and thus without LESS. That makes the images appear before the section headers.
It seems that in the HTML code that's OK, but it looks confusing. When styled, the images appear to the right of the section title. Can they be moved under the title in the code?
Thanks.
"unsprprisingly"
"An exceptions is Wiktionary."
@MiaoBlubb suggested:
Hm, I think nciku.com would provide a better source than leo.org...
Some people like to use ・ (中黒) as a separator for the kana. I learned a small bit of python and ended up adding this to get_fields.py.
text = text.replace(u'・', u'')
Maybe this should be standard?
pysox
seems to have been abandoned in alpha phase. pyDub a) is called stable and b) seems to be able to load a lot of formats, and normalize files and save a lot of formats. That should be good enough.
I am using a Surface Pro 3 PC with zoom. Unfortunately, the text is so small it is impossible to read on it since the screen is high resolution. Your zoom helps with reviews, etc. But when adding/editing cards through the "browser" the text fields are impossibly small (as are the buttons, actually), see image below. I contacted Anki support and they referred me to your plugin. I still can't really use the browser to add/edit cards, though. Any chance I you could modify size there, too?
I make a custom userstyle with Local CSS plugin. On desktop looks just like i need. But nothing changes on AnkiDroid.
Is there a special workflow to make it work there, or local styles doesn't work on AnkiDroid? Maybe there is special classname for mobile, or something else.
My current dirty custom styles - https://gist.github.com/aledoroshenko/b1c30de7420aa59b3ac1
Use the good/close/bad value of Scalar.py’s comparison to set the default ease answer button.
Suggested by Gabriel Holmes
The problem
mw.reviewer._bottomCSS += ".stat {display:none;}"
The solution (one of possible ones)
mw.reviewer._bottomCSS += ".stat {visibility: hidden;} #time {visibility: visible;}"
The Wiktionary downloader does not accept OGG file URLs with upper case letters.
Example: The french word "bisou":
Wiktionary page: http://fr.wiktionary.org/wiki/bisou
Audio URL in page: //upload.wikimedia.org/wikipedia/commons/e/e9/Fr-Bisou-fr-Paris.ogg
To solve this problem, "flags=re.IGNORECASE" could be added to the re.search(). calls in wiktionary.py.
BTW: I noticed that the first r.search() call uses "u_word" and the others use "word" to replace "{word}" within the regex. Is this on purpose?
Hello
I found new site to download audio.
http://www.diki.pl/
It's english-polish dictionary but very easy to download sound
http://www.diki.pl/images/en/mp3-ame/My_Word.mp3
for example for word "check", URL is:
http://www.diki.pl/images/en/mp3/check.mp3
Keen demand ---> keen_demand
http://www.diki.pl/images/en/mp3/keen_demand.mp3
Do you not support forvo.com?
https://github.com/ospalh/anki-addons/blob/master/quick_note_and_deck_buttons.py#L71
List of dictionaries defining the model buttons to use.
The rules are identical to those for the model buttons, "name" must
name an existing deck.
The manual does not explain that the add-on kind of expects to find the output of the Japanese Support add-on in the reading field.
When learning several languages, with different languages set in different option groups, the wrong group may be chosen when downloading through the card browser.
See the Google groups complaint.
Make Scalar.py count the number of correct and wrong letters.
Suggested by Gabriel Holmes.
An error occurred in an add-on. Please contact the add-on author.
Traceback (most recent call last):
File "/usr/share/anki/aqt/downloader.py", line 57, in run
con = httpCon()
File "/usr/share/anki/libanki/anki/sync.py", line 34, in httpCon
assert 0
AssertionError
Traceback (most recent call last):
File "/usr/share/anki/aqt/addons.py", line 155, in accept
ret = download(self.mw, self.form.code.text())
File "/usr/share/anki/aqt/downloader.py", line 32, in download
return thread.data, thread.fname
AttributeError: 'Downloader' object has no attribute 'data'
openSUSE 12.2
XFCE 4.10
Linux 3.4.11-2.16-desktop
Provide at least English (with plurals) and German translations for the more popular add-ons
Hey, I'm having a bit of a problem with the Download Audio window. For some reason its auto filling the first text box for the reading which should be "The Kanji of the request" from kanji into hiragana.
I poked around in your code and everything looks right (in get_fields.py at line 106 the line" base = furigana.kanji(text)" it looks like it should be setting the kanji into variable which is called in update_gui.py line 130 "bedit = QLineEdit(base)").
I thought furigana.kanji() might be screwing up, but what's really bizarre is when I change "base = text" in get_fields, the same conversion from kanji to hiragana occured. I even tried "bedit = QLineEdit(text)" in update_gui, but the same hiragana issue occurred.
This isn't a show stopper because you can easily copy the Expression text into the Reading entry, but its annoying and prevents getting anything but tts from Edit>Media>Note audio while in the middle of studying.
Hopefully you guys can reproduce this, I tried grabbing the latest "Japanese Support" plug-in in case this is a case of old libraries being cross referenced, but no luck there either.
PS it would be nice if a user could easily manually set the field used for audio (I put my audio and pictures in the reading field, and I'm up to over 14000 cards, so moving those sound clips to a new field is a little too daunting). It's not hard to go and change get_fields to "audio_field_keys = ['reading', 'sound']", but I feel a little dirty doing it.
PSS It was a pleasure poking around your code, nice and readable with good commenting. Keep it up :)
This is a repeat of a question here:
https://anki.tenderapp.com/discussions/add-ons/251-download-audio-howjsay
I know you said no more EN dictionaries. But the ones that are used now have very limited vocabularies. Can we have a larger one added? This one seems bigger, with OK pronunciations and is free:
I looked at the downloader files but creating a new one is above me I fear. If there was a tutorial for one, then it would be easier to replicate and contribute.
Cheers.
urllib.quote() should be used instead of urllib.quote_plus() in forvo.py / build_query_url().
Example URLs:
"+" does not work:
http://apifree.forvo.com/action/word-pronunciations/format/json/key/____KEY____/word/gros+bisou
"%20" does work:
http://apifree.forvo.com/action/word-pronunciations/format/json/key/____KEY____/word/gros%20bisou
Seems to be forvo downloader cant work (downloaders/forvo.py from forvo-branch).
I guess it crash when make request by urllib2. Strange very...
I try to run it in terminal and request will work, but when anki call this downloader it crash at this point.
Help please.
File names are word.ogg, word.mp3, word.wav… Do they easily overwrite each other?! If so, that's dangerous, and needs to be fixed.
Maybe add a checksum of the file contents, or of the URL, to the name.
"eSpeak is a … speech synthesizer for English and other languages, for Linux and Windows. … ported to other platforms … Can produce speech output as a WAV file."
Can speak English almost as good as Google TTS, and is local and configurable.
The “look up selection at NN” of “Nachschlagen“ (see also#60) should be the context menu for the selection.
Also, #19 could be done this way.
I use Anki to study Mandarin Chinese vocabulary. I have been away from Anki for some months, so when I decided to return to my study of Chinese, I downloaded the latest version for Mac and updated my add-ons to the latest versions.
Now I find that when I add new notes to my deck, the first field (that is, Note ID) stays the same after I click the Add button of each new note. That is, a new, unique Note ID gets created as soon as the Note ID field of the first new note loses focus. But when I click the Add button at the bottom of the window, all the fields are blanked except the Note ID field and the tags field. The value in the Note ID field persists there and is highlighted with a pink background -- presumably to indicate that it duplicates the value in the Note ID field of the note just created a moment ago. Changing the focus to the second field does not produce a new value in the Note ID field. In order to get a new value for the second new note (and for subsequent new notes), I have to select the existing value in the Note ID field, delete it, and then change the focus to the second field.
This is not how I recall that Anki worked previously. Is my memory wrong? Am I doing something wrong? Has a bug crept in with the updated versions of Anki or of the add-ons?
The add-on could keep track of copyright licenses, especially for files downloaded from Wiktionary.
Maybe by adding the license and author to an extra field and by tagging the note as free (only Wiktionary) or non-free (downloaded audio from somewhere else).
Hello
I really love your downloader but is it possible to disable few dictionaries?
For eample for deutsch I'd like to download audio just from Duden.
I've tried to delete dictionaries from folder "downloaders" but after that I have an error.
How to disable few dictionaries?
I have problems fetching the audio from JapanesePod for words that are usually written in Kana only. For example putting とても in the Kana field of the reading line (or in both the Kanji and Kana field), doesn't find the audio. If you look up the Kanji writing (which is 迚も), it works.
It would be nice, if 'download audio' could automate this as much as possible. An obvious source would be WWWJDIC, which has sort of an API. There are two modes: raw and html.
The advantage of the raw mode is that it is easy to parse, but the html mode has direct links to the audio URL if available.
Obviously one cannot continue when there are multiple words with the same reading, as they are sometimes pronounced differently.
I would have a go at this, but I'm unsure how to integrate it. Maybe first do the normal lookup and when it fails, try more fancy methods (without any additional GUI or notifications)?
With the current Anki version (2.0.12), language.py cannot get the language code from the deck options anymore. The problem already started a while ago with one of the previous Anki versions. I can change default_audio_language_code in language.py, but we have decks with different languages...
The site icons for the different audio source sites are not shown on Macs.
This happens only with the standard version, not when running from source
My idea is that the standard version does not bring the ico file plugin along.
Hi, I have this problem with all files that Download Audio creates for Spanish and which happen to contain accented characters. For example: relatión - when Download Audio saves the sound, the file is also named relatión.mp3. I eventually sync it with my Android device, which, I suspect, does some strange conversion to the file names and causes them not to match what's stored in the Anki database. When I sync back, the sound effectively disappears.
My desktop, from which I usually create Anki cards, is Ubuntu 13.04. I don't remember seeing this issue before I upgraded my phone to Android 4.2, so, maybe, something changed in that version of the OS in the file system layer. My phone is Samsung Galaxy SIII, CM10.2
Some potential ways to fix it:
The play button doesn’t work in the preview window.
Sometimes there is more than one audio file on an OALD page, see for example “dictionary”.
At the moment, the add-on downloads only one.
No longer find Merriam Wester audio files.
Hi ospalh
Regarding to the zoom add on, it resets after Undo, opening the note editor, opening option etc
Can you make it so that it does not reset itself?
in play_button.py
the button is not shown. Instead a “no image” question mark place holder appears.
On the latest Anki I am getting this error message:
Traceback (most recent call last):
File "/path/to/user-home/Anki/addons/unnormalize.py", line 71, in unnormalize_files
media_in_col = mw.col.media.allMedia()
AttributeError: 'MediaManager' object has no attribute 'allMedia'
Hi,
I've just downloaded this addon and I have come across problem with a deck I imported: It always ignores what is written in the back of the card and only scans the front (which is unfortunate, because it is the only side I would ever need to use audio.)
The deck is "Advanced English Vocabulary - 2000 sentences". Maybe somebody has come across the same problem. I got to be honest: I'm not very technically apt and my fidgeting only brought me as far as adding an audio track to the back template. I'd love some advice. Thank you in advance.
Each time I want to download JapanesePod audio I have go to the manual option and type the kanji into the left side "Reading" box. Is there a way to make it download this audio automatically and ignore the TTS audio?
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.