Back

Anki 2.0 Plugin: Sentence Gloss Ported

#1
This plugin never got a lot of downloads on Anki 1.0 (~100) but I found it extremely useful since I don't use a furigana'ed field for my sentences. I merely use a 10-12point font gloss field generated using this plugin.

Sentence Gloss (Code: 951200721 )

Since I originally didn't write this plugin, I'm not feeling very much urge to support it. (FYI, my other plugins, "Failed Mature Cards" "Maturing Cards" and "Answer Key Cascade" are now being supported on Github projects). Feel free to report any bugs if you see them, here. And I might get around to fixing them or if overture2112 wants to do it. I've never had any issues with it though.
Reply
#2
Hi Vix,

Thanks for porting this plugin. I was surprised to see how few people are using it. I think it is really useful.

A note to OSX users, if you get an error when glossing complaining about encoding (see below), there is a quick fix. Simply open up "Sentence_Gloss.py" and comment out line number 22 (put a hash character [#] before the word "print").

The error:

An error occurred in an add-on. Please contact the add-on author.
Code:
Traceback (most recent call last):
  File "/Users/Johnny/Documents/Anki/addons/Sentence_Gloss.py", line 61, in regenGlosses
  File "/Users/Johnny/Documents/Anki/addons/Sentence_Gloss.py", line 39, in glossNote
  File "/Users/Johnny/Documents/Anki/addons/Sentence_Gloss.py", line 22, in gloss
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128)
Reply
#3
Does anyone still have the code? / Any method at all for regenerating glosses.
I'm guessing this (https://ankiweb.net/shared/info/951200721) is for Anki 1, tried it, doesn't work.
I desperately need it, thanks.
Edited: 2015-12-19, 3:59 am
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
Works for me with the change mentioned in the review:

Quote:In Aug 2015, WWWJDIC changed their site URL. To get this plugin working again, edit line 18 in the plugin code to

def url( term ): return 'http://nihongo.monash.edu/cgi-bin/wwwjdic?9ZIH%s' % urllib.quote( term.encode('utf-8') )
Edited: 2015-12-19, 7:32 am
Reply
#5
(2015-12-19, 7:31 am)Vempele Wrote: Works for me  with the change mentioned in the review:

Quote:In Aug 2015, WWWJDIC changed their site URL. To get this plugin working again, edit line 18 in the plugin code to

def url( term ): return 'http://nihongo.monash.edu/cgi-bin/wwwjdic?9ZIH%s' % urllib.quote( term.encode('utf-8') )

Seems like I had a buggy installation when I tried this workaround, it's fine now, thanks.
Reply