RECENT TOPICS » View all
nest0r wrote:
Apparently there's already a Rikaisan, Rikaisama, and Rikaidono on github/sourceforge, for various interpretations of Rikaisan, but there doesn't seem to be much there.
Rikai-sensei isn't taken!
Rikai-sama sounds the best (or at least to me)
thanks for the help cb, working on that... In the meantime I had the real-time import working perfectly on my windows computer for a while...but after restarting once the cards aren't loading correctly and this is my problem:
I have two 'japanese' models in my anki sentence deck, in order to be able to use the furigana feature... one for subs2srs and one for normal sentences. rikaisama is now loading the cards into the wrong model and it comes out all weird and apparently you can't change the information to a different model after the card is created.
I had previously deleted the 'meaning' field in my subs2srs model, and tried mapping a rikaisama field to 'meaning' in the hope that it would find the sentences model, but to no avail. it just stubbornly insists on putting the information into the wrong model now.
any ideas? again thanks for all the help with this amazing plug-in...
dtcamero wrote:
thanks for the help cb, working on that... In the meantime I had the real-time import working perfectly on my windows computer for a while...but after restarting once the cards aren't loading correctly and this is my problem:
I have two 'japanese' models in my anki sentence deck, in order to be able to use the furigana feature... one for subs2srs and one for normal sentences. rikaisama is now loading the cards into the wrong model and it comes out all weird and apparently you can't change the information to a different model after the card is created.
I had previously deleted the 'meaning' field in my subs2srs model, and tried mapping a rikaisama field to 'meaning' in the hope that it would find the sentences model, but to no avail. it just stubbornly insists on putting the information into the wrong model now.
any ideas? again thanks for all the help with this amazing plug-in...
Thanks for the bug report!
I'll have to investigate this issue. My own vocab deck only has a single model and I never thought of testing a deck with more than one model. Version 15.0 (I'm just about to post 14.0) will be more focused on the Real-Time Import feature.
I have just uploaded version 14.0 of the Rikaisama Firefox extension.
Download version 14.0 via MediaFire
I know I said that I wouldn’t be able to work on this for a while... but I just couldn't help myself.
What's New?
● Added fallback options for EPWING mode. I really should have added this feature ages ago as it makes EPWING mode so much nicer to use. In previous versions, if the highlighted word wasn't found in the currently active dictionary, you would get a rather unpleasant “Entry not found.” message. Now, you have 3 options (in the options dialog) on how this situation should be handled:
1) Use the next available EPWING dictionary. So if you have 3 dictionaries and the active dictionary is dictionary 2, if the entry was not found, search dictionary 3, if the entry was still not found, search dictionary 1. If none of the EPWING dictionaries contain the word, use the default rikaichan JMDICT dictionary.
2) Ignore any other EPWING and just use the default rikaichan JMDICT dictionary.
3) Display the “Entry not found.” message (in case you actually liked that behavior).
● The number of the currently active EPWING dictionary is now shown in the top-right corner of the popup. (Thanks nest0r!). This is especially handy if the search has to fall back to another EPWING dictionary.
● Added a slot for a 4th EPWING dictionary (Thanks dtcamero!)
● Fixed the way search works for EPWING and Sanseido modes. Searches will now use the kana for a word where it makes sense (specifically, if the kana lookup matches the highlighted word, search with the kana and not the kanji). This fixes things like searching for 乃 when の is highlighted, or searching for 米 when メートル is highlighted. (This is another one that I should have added ages ago).
● You can know remap almost every key. Just be careful not to map 2 things to the same key (it won't hurt anything, but one of the things won't function unless you remap it).
● If the popup is blank as result of the user-specified EPWING regex, ignore it and display the full results.
● Added tool tips to the Rikaisan-specific items in the options dialog. This includes tool tips for the save format tokens.
● Fixed a bug that prevented the EPWING lookup from being parsed correctly for single kanji that aren’t standalone words. You would see something like “{HITS: 1} rest of definition...” when this happened.
● In EPWING mode, reduced the size of the superscript text.
● Added UTF-8 replacements for some of the more common gaiji in the Meikyo J-J dictionary. Also added a couple for Kenkyusha 5th.
Please let me know if I broke something. Thanks!
Also, rikai-sensei has a nice ring to it. Well, can't change the name for EVERY version.
cb4960
Last edited by cb4960 (2011 September 04, 10:52 pm)
heh yeah 14.0 is pretty slick ;D
ok so I installed an updated python on my mac and now I don't get the socketserver error any longer... but also no import. just nothing happens. being that the same thing happens in a successful scenario (minus the missing card) maybe some message like 'information loaded,' or a way to debug would be helpful in knowing what's going on.
my vista pc is the one which worked fine right away except for the model issue (which I fixed by making the first field rikaisama looks for the Meaning field, which only the sentences model uses)
my mac also virtualizes win7 ultimate, and that pc doesn't seem to work with the real-time import either. no socketserver error, again just nothing happens. I tried manually installing python to no avail.
on all rigs the text loads perfectly into the separate text file though, so that's a backup to do it the old-fashioned way ;P
thanks again for the help... cheers,
dtcamero wrote:
heh yeah 14.0 is pretty slick ;D
ok so I installed an updated python on my mac and now I don't get the socketserver error any longer... but also no import. just nothing happens. being that the same thing happens in a successful scenario (minus the missing card) maybe some message like 'information loaded,' or a way to debug would be helpful in knowing what's going on.
You can turn on the debugging/logging feature by:
1) In Anki, Settings -> Plugins -> Open Plugin Folder...
2) Open Real-Time Import.py in a text editor.
3) Change line 36 from "DEBUG = False" to "DEBUG = True"
4) Restart Anki and try again.
5) A log file named RealTimeImport.log will be placed in the plugins folder.
Great, thanks for the update. When did you add the Heisig link stuff? Never noticed that.
ok... on the mac (osx 10.6.5), this is the error log I get...
-----------------------------------------------------------
RealTimeImport.__init__: START
ServerManager.__init__: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doInit: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerManager.stop: Thread does not exist.
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerManager.stop: Thread does not exist.
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doQuit: START
ServerManager.stop: START
ServerThread.stop: START
and on the mac's virtual win7 pc, this is the message I get:
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
UdpMessageHandler.handle: START
UdpMessageHandler.handle: filename = C:\Users\oremactd\AppData\Local\Temp\~rikai_anki_rti.txt
MessageCommand.__init__: START
MessageCommand.parseHeader: command = add
MessageCommand.parseHeader: version = 1
MessageCommand.performCommand: START
MessageCommand.doAdd: START
MessageCommand.parseFieldNames: fieldNames = [u'expression']
MessageCommand.parseTags: tags = "PriorityVeryHigh rikaisama"
MessageCommand.doAdd: line = スピードと効率を兼ね備えたソウルのインターネットは、誰もが動く必要などないほどに、その利便性を高めている。 (1/1) <span class="w-conj">(< -tai < -sou)</span><span class="epwing-dic-name">2</span> かね‐そな・える【兼ね備える】<sub>‥ソナヘル</sub> ⦅他下一⦆[文]かねそな・ふ(下二) 二つ以上の性格や特徴などを一緒に持っている。「知性と勇気とを―・える」
MessageCommand.addLineToDeck: ankiFieldInfo = {u'expression': u'\u30b9\u30d4\u30fc\u30c9\u3068\u52b9\u7387\u3092\u517c\u306d\u5099\u3048\u305f\u30bd\u30a6\u30eb\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306f\u3001\u8ab0\u3082\u304c\u52d5\u304f\u5fc5\u8981\u306a\u3069\u306a\u3044\u307b\u3069\u306b\u3001\u305d\u306e\u5229\u4fbf\u6027\u3092\u9ad8\u3081\u3066\u3044\u308b\u3002 (1/1) <span class="w-conj">(< -tai < -sou)</span><span class="epwing-dic-name">2</span> \u304b\u306d\u2010\u305d\u306a\u30fb\u3048\u308b\u3010\u517c\u306d\u5099\u3048\u308b\u3011<sub>\u2025\u30bd\u30ca\u30d8\u30eb</sub> \uff5f\u4ed6\u4e0b\u4e00\uff60\uff3b\u6587\uff3d\u304b\u306d\u305d\u306a\u30fb\u3075(\u4e0b\u4e8c) \u4e8c\u3064\u4ee5\u4e0a\u306e\u6027\u683c\u3084\u7279\u5fb4\u306a\u3069\u3092\u4e00\u7dd2\u306b\u6301\u3063\u3066\u3044\u308b\u3002\u300c\u77e5\u6027\u3068\u52c7\u6c17\u3068\u3092\u2015\u30fb\u3048\u308b\u300d'}
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
on both platforms my anki decks are unaffected...
thanks for the help! cheers
Last edited by dtcamero (2011 September 05, 3:18 pm)
cb4960 wrote:
● Added a slot for a 4th EPWING dictionary (Thanks dtcamero!)
Yes! Thank you so much!! ☆彡
dtcamero,
From the Win7 log, it looks like your "Field names" box is set to "expression". Is this correct?
What is in the "Save format" box that you are using? This will allow me to make better sense of the log.
For reference, here is what happens when I save 兼ね備える to my Anki deck with "$d" in my "Save format" box and "Expression" in the "Field names" box, and then close the deck.
-----------------------------------------------------------
RealTimeImport.__init__: START
ServerManager.__init__: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doInit: START
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
UdpMessageHandler.handle: START
UdpMessageHandler.handle: filename = C:\Users\chris\AppData\Local\Temp\~rikai_anki_rti.txt
MessageCommand.__init__: START
MessageCommand.parseHeader: command = add
MessageCommand.parseHeader: version = 1
MessageCommand.performCommand: START
MessageCommand.doAdd: START
MessageCommand.parseFieldNames: fieldNames = [u'Expression']
MessageCommand.parseTags: tags = "PriorityVeryHigh rikaisama"
MessageCommand.doAdd: line = 兼ね備える
MessageCommand.addLineToDeck: ankiFieldInfo = {u'Expression': u'\u517c\u306d\u5099\u3048\u308b'}
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doQuit: START
ServerManager.stop: START
ServerThread.stop: START
--------------------------------------
As for the Mac log,
RealTimeImport.__init__: START
ServerManager.__init__: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doInit: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerManager.stop: Thread does not exist.
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerManager.stop: Thread does not exist.
It appears that the startup sequence is a bit different on Macs. The doInit hook is being called before Anki has completed "checking" decks on startup (on Windows/Linux, the doInit hook is called after the "checking" phase). When the doInit hook is called, RTI sets a flag that allows the server to be stopped when the next deckClosed hook is called. Since the flag isn't set when the next deckClosed hook is called, the "Thread does not exist" message is displayed.
But I don't think that matters too much.
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
This is showing that the loadDeck hook is finally called and the server is initialized.
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doQuit: START
ServerManager.stop: START
ServerThread.stop: START
Wait, what? Why are there 2 more deckClosed hooks being called after the deck has loaded? Not sure what to make of this yet.
Last edited by cb4960 (2011 September 05, 3:37 pm)
Ok, I found the problem with the virtual pc version: I had the field names input as "expression" instead of "Expression"... caps sensitive apparently.
all's good on that front now...
as for mac, I made a new deck with one japanese model. I set the field name input to "Expression" and the save format to "$d"
I checked the log at several points and this is the chronology:
(opened deck:)
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
(highlighted word, pressed 'r')... no log entry
(close deck)
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
(quit anki)
RealTimeImport.doQuit: START
ServerManager.stop: START
ServerThread.stop: START
thanks again for the help. cheers
Last edited by dtcamero (2011 September 05, 5:14 pm)
We can try a test to see which isn't working properly: Rikaisama or the Anki plugin:
1) Open your Anki deck as usual.
2) Save the following script in a file called RealTimeImport_UDP_Client.py:
#!/usr/bin/env python2 import socket import sys HOST = "localhost" port = int(sys.argv[1]) textMsg = sys.argv[2] sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(textMsg, (HOST, port))
3) Open a terminal, navigate to the directory of the script and run the script like this:
python RealTimeImport_UDP_Client.py 49600 dummy.txt
4) If all goes well, Anki will give you an error message: "IOError: [Errno 2] No such file or directory: u'dummy.txt'"
ok i did it and this is the error message anki displayed:
An error occurred in a plugin. Please contact the plugin author.
Please do not file a bug report with Anki.
Traceback (most recent call last):
File "SocketServer.pyc", line 284, in _handle_request_noblock
File "SocketServer.pyc", line 310, in process_request
File "SocketServer.pyc", line 323, in finish_request
File "SocketServer.pyc", line 639, in __init__
File "/Volumes/master/dtcamero/Library/Application Support/Anki/plugins/Real-Time Import.py", line 193, in handle
File "/Volumes/master/dtcamero/Library/Application Support/Anki/plugins/Real-Time Import.py", line 108, in __init__
File "codecs.pyc", line 881, in open
IOError: [Errno 2] No such file or directory: u'dummy.txt'
Excellent! This means that the Anki plugin is receiving socket messages and that Rikaisama is the culprit.
Do you have bash installed? If so, where is it installed? Type "whereis bash" to find out. This may come in handy later.
ok i entered "whereis bash" into terminal and got:
/bin/bash
I just started using this recently but I've already found it to be very useful.
I especially like the 三省堂 mode, except there is a noticeable lag as definitions are loaded. This is probably unavoidable considering their source, but I also noticed the lag is repeated every time a word is highlighted - as though the search is being repeated every time. Surly search results can be cached during a session to speed repeated lookups?
The live Anki export is outstanding too. probably my favorite feature.
Thanks for your work!
Is it possible to save the audio files like: Kanji - Reading - Translation.mp3 ? I'd like to listen to the audio on the ipod or while playing games as I add vocab. It would be a great help to have the translation in the filename.
I have just uploaded version 14.1 of the Rikaisama Firefox extension.
Download version 14.1 via MediaFire
(Deposit Files mirror)
What Changed?
Nothing new, just added Firefox 8/9/10 compatibility.
cb4960
I have to admit I can't get the Anki Import function to work.
I've set everything up according to the instructions - Rikaisama works fine for the definitions and dictionaries. However, if I create a new deck in Anki with the plug-in activated (checked) and then scroll over a word and hit R...
Nothing happens.
Where have I gone wrong?
Kyuusu2u2 wrote:
I have to admit I can't get the Anki Import function to work.
I've set everything up according to the instructions - Rikaisama works fine for the definitions and dictionaries. However, if I create a new deck in Anki with the plug-in activated (checked) and then scroll over a word and hit R...
Nothing happens.
Where have I gone wrong?
Which operating system do you use? Thanks to dtcamero, I've learned that it doesn't run on Mac OSX. It should run fine on Windows though.
The next step would be to turn on the debugging/logging feature:
1) In Anki, Settings -> Plugins -> Open Plugin Folder...
2) Open Real-Time Import.py in a text editor.
3) Change line 36 from "DEBUG = False" to "DEBUG = True"
4) Restart Anki and try again.
5) A log file named RealTimeImport.log will be placed in the plugins folder.
6) Try using the RealTimeImport feature a couple of times and then paste the contents of RealTimeImport.log here. This will help me to diagnose the problem. Also, it would helpful if you posted the contents of the Save format and Field names boxes from the Clipboard & Save tab of the Rikaisama options dialog.
Last edited by cb4960 (2011 November 25, 6:13 pm)
Hi, I've been having the same problem as Kyuusu2u2. Here's the debug text:
-----------------------------------------------------------
RealTimeImport.__init__: START
ServerManager.__init__: START
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
RealTimeImport.doInit: START
I'd appreciate any help.
Last edited by Splatted (2011 December 22, 4:35 pm)
Hi! First of all, congrats on the amazing job done with Rikaisama. However, I also have the same problem as Kyuusu2u2 and Splatted, I simply cannot import anything to Anki.
Here's my debug info (BTW, my OS is Windows XP):
-----------------------------------------------------------
RealTimeImport.__init__: START
ServerManager.__init__: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doInit: START
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
ServerThread.run: Unable to open socket
Last edited by franciscobc84 (2011 December 22, 8:07 pm)
I'd like to add my voice.
I'm trying to get the Anki Real-Time Import thing to work, and it's, well, not working.
This is all I ever get when I turn on debugging:
-----------------------------------------------------------
RealTimeImport.__init__: START
ServerManager.__init__: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doDeckClosed: START
RealTimeImport.doInit: START
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doLoadDeck: START
ServerManager.start: START
ServerThread.__init__: START
ServerThread.run: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doDeckClosed: START
ServerManager.stop: START
ServerThread.stop: START
RealTimeImport.doQuit: START
ServerManager.stop: START
ServerThread.stop: START
I set it up according to the instructions, but I'm simply not getting anything. I run Linux. Ideas?
Last edited by gnyffel (2012 January 06, 2:07 pm)
I'm sad because there's nothing this awesome on Opera. not even vanilla rikaichan!
I hate this browser, why do I keep using it...
@cb: (Happy New Year!) Not sure if you're reading this, but here a small wishlist of mine:
* URL-shortening: Perhaps you could implement some tiny url-shortener (like bit.ly) when having the option "saving urls" activated
* Other dictionaries: If possible, saving monolingual definitions from other files (Kenkyusha etc), too
Thank you :)

