Back

Rikaichan: RevTK Community Edition

Roketzu Wrote:You and John Carmack are my 2 favorite programmers in the world. I salute you sir.
Someday we'll have to combine forces and create riftdoomsama2srs.
Reply
AsukaLangleyfag Wrote:Doesn't work with e10s (Electrolysis), like Rikaichan. In non-e10s tabs all works fine.
How to reproduce:
1. Install Nightly from http://nightly.mozilla.org/
2. Install Rikaisama
3. Try it with e10s
Rikaichan will require substantial revision in order to work under Electrolysis.
Reply
I'm hoping the author of Rikaichan will take the initiative on the Electrolysis port.
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
I'm loving Rikaisama + Real-time import. Why didn't I do this sooner??? It works really well with Pale Moon and http://shasetsu.ps.land.to

I have a feature suggestion for the Clipboard/Real-time import to Anki area; add a timestamp field, or some sort of UID field.

The problem I'm running into is this: say I run into a word, 占める, and I don't know what it means, so I hit the R key and add it and the sentence I'm studying into the deck. Well, if I'm going by vocab words, I can only add one occurrence of the word, and onc example sentence. (I usually like to have a few sentence examples of a word in a deck, maybe 2-3 cards.) If I'm going by sentences, I can't add the sentence more than once, and that means any other words I don't understand in the sentence go undefined.

If there's an "ignore-able" timestamp or UID field (based on whatever you want-- you could add the sums of all of the character values in the sentence + the dictionary form for all I care), then I don't have to worry about multiple 占めるs in my deck, or multiple sentences in my deck.

Or... am I missing a really simple solution? If there's an easier solution, I'd love to hear it! Big Grin
Edited: 2015-02-08, 10:35 am
Reply
By default, Real-Time Import will not add a duplicate note. To change this behavior, open the Anki add-ons folder and edit "Real-Time_Import_for_use_with_the_Rikaisama_Firefox_Extension.py". Find the line "ALLOW_DUPLICATES = False" and change it to "ALLOW_DUPLICATES = True". Now restart Anki.

Did that help? Otherwise, yeah, I can probably add a timestamp or something.
Edited: 2015-02-08, 12:34 pm
Reply
Ah, that'll probably do what I wanted. If it doesn't work, I'll let you know. Thanks!
Reply
Yeah, that works like a charm. Now I feel kind of dumb, because it was sitting right there in the code, right at the top.

I had convinced myself that it must be some kind of Anki thing, instead of a plugin thing, I guess.

Thanks again! I love this combination!
Reply
I have just uploaded version 20.5 of the Rikaisama Firefox extension.

Download version 20.5 via SourceForge

What's New?

● Now using Firefox's built-in APIs for playing audio. The audio feature should now work on Linux without additional setup. It should also work on Mac.

cb4960
Reply
Any idea why audio doesn't work for an unlucky few of us?

It worked fine a few months ago. I've tried running older versions of Firefox, older versions of Rikaisama, disabling all other addons, and booting into Linux among other things but the audio refuses to play. Yet it works on my crappy laptop with no problems. I don't get it.

I took a look at what source code was available but couldn't see where audio was implemented.
Edited: 2015-02-23, 8:52 am
Reply
FishHeads Wrote:Any idea why audio doesn't work for an unlucky few of us?

It worked fine a few months ago. I've tried running older versions of Firefox, older versions of Rikaisama, disabling all other addons, and booting into Linux among other things but the audio refuses to play. Yet it works on my crappy laptop with no problems. I don't get it.

I took a look at what source code was available but couldn't see where audio was implemented.
What version of Firefox are you using? What version of Rikaisama are you using? What operating system are you using?
Reply
Firefox 36.0 all the way back to 26.0, rikaisama from 20.5 to 20.0, Windows 7 and Ubuntu. I've tried pretty much every combination of these. I'm stumped.
Reply
FishHeads Wrote:Firefox 36.0 all the way back to 26.0, rikaisama from 20.5 to 20.0, Windows 7 and Ubuntu. I've tried pretty much every combination of these. I'm stumped.
Do you see a file called ~rikai_audio.mp3 in your %temp% folder?

Do you see any errors in the Browser Console (Ctrl-Shift-J)?.

For reference, I've tested Rikaisama 20.5 on Firefox 35.0.1 on both Windows 7 and Linux Mint.
Reply
Hi, I've had audio not working with rikaisama since aurora updated to 36 I believe. I also have a portable nightly version with the same situation.
The Browser Console shows the following error in nightly and aurora.

downloadAndPlayAudio() Exception:[Exception... "Not enough argum
ents [nsIWebBrowserPersist.saveURI]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: chrome://rikaichan/content/rikaichan.js :: rcxMain.downloadAndPlayAudio :: line 2962" data: no]
I do have a ~rikai_audio.mp3 in /temp/, with date modified just a couple of minutes ago presumably because of testing with ESR.

In Firefox ESR portable everything is still working as expected.
Edited: 2015-02-24, 6:37 am
Reply
cb4960 Wrote:
FishHeads Wrote:Firefox 36.0 all the way back to 26.0, rikaisama from 20.5 to 20.0, Windows 7 and Ubuntu. I've tried pretty much every combination of these. I'm stumped.
Do you see a file called ~rikai_audio.mp3 in your %temp% folder?

Do you see any errors in the Browser Console (Ctrl-Shift-J)?.

For reference, I've tested Rikaisama 20.5 on Firefox 35.0.1 on both Windows 7 and Linux Mint.
Yep, just as the guy above said:

downloadAndPlayAudio() Exception:[Exception... "Not enough arguments [nsIWebBrowserPersist.saveURI]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: chrome://rikaichan/content/rikaichan.js :: rcxMain.downloadAndPlayAudio :: line 2962" data: no]

// Download the audio file and save to a temporary location
downloader.saveURI(audioUrl, null, null, null, null, tempAudioFile, null);
}
catch (ex)
{
Components.utils.reportError("downloadAndPlayAudio() Exception:" + ex); <-- line 2962
}

}, /* downloadAndPlayAudio */

~rikai_audio.mp3 is there in temp and plays やめる.

Edit: I deleted the mp3 and hovered over a word, it simply creates an empty mp3 in its place.
Edited: 2015-02-24, 7:53 am
Reply
Well, I went ahead changed it to
downloader.saveURI(audioUrl, null, null, null, null, null, tempAudioFile, null);
and and jarred it up and like magic audio started playing again.... which makes no sense since it's feeding 8 arguments to a function that supposedly takes 7.

Goddamn Mozilla.
Edited: 2015-02-24, 8:31 am
Reply
nsIWebBrowserPersist.saveURI has added an 8th parameter as of Firefox 36.0.
Reply
balloonguy Wrote:nsIWebBrowserPersist.saveURI has added an 8th parameter as of Firefox 36.0.
Quote:As of Firefox 26, this method should no longer be used from add-on code. Please use Downloads.createDownload() instead.
So they deprecate a function and then add an extra, non-optional, add-on breaking parameter to it years later. What were they thinking?

Also, rikaisama's audio broke long before 36.0 for me.
Reply
Thanks for tracking this down. I'll release a fix later this week.
Reply
I have just uploaded version 20.6 of the Rikaisama Firefox extension.

Download version 20.6 via SourceForge

What's New?

● The audio feature now works with Firefox 36.

cb4960
Reply
audio playback still does not work for me with 20.6 - the import to anki still works though
Reply
Hi everyone,

I've compiled the EPWING binaries to Mac and Linux and packaged them into this XPI:
[[Links removed, now included in official v21.0]]

I've tested this on OSX 10.10 Yosemite and (partially) on Ubuntu 14.04 and it appears to work perfectly.
Note that this only fixes EPWING support right now - I'll get to fixing the Realtime Anki Import soon.

cb4960 - I'd be happy if you could integrate my fixes into the official version.
All the modified source is available on Github:
https://github.com/boazy/rikaisama
https://github.com/boazy/rikaisama-eplkup (the binaries)

Edit:
This version also supports Realtime Anki Import. Please tell me if it works:
[[Links removed, now included in official v21.0]]
Edited: 2015-03-08, 7:24 am
Reply
I have just uploaded version 21.0 of the Rikaisama Firefox extension.

Download version 21.0 via SourceForge

What's New?

● The EPWING feature now works on Linux and should also work on Mac. Contributed by Boaz Yaniv. I've tested this on Linux Mint. Boaz has tested this on OSX 10.10.

● The Real-Time Import feature should now work on both Linux and Mac. Contributed by Boaz Yaniv. Linux support is currently untested by me since I couldn't get Anki to install on Linux Mint. Boaz has tested this on OSX 10.10.

● Added Boaz Yaniv to the "about" dialog as a contributor. I'm sure Linux/Mac users will highly appreciate his efforts.

cb4960
Edited: 2015-03-08, 12:30 pm
Reply
That was fast! Thanks cb4960!

v21.0 works perfectly on my Mac.
I have to admit it might not work on older OS X versions and it's definitely not going to work on very old OS X versions (Tiger?) or Macs which can't run 64-bit apps (and PowerPC Macs, let's not forget those). If someone's having trouble on a very old Mac, please send send me a message and I'll try to compile a version that works. I just don't know if it's worth the effort if no one needs it.

The Linux version would also probably fail to work at least on some distributions. Definitely anything 32-bit or other architectures like ARM, but also very old Linux distros. It's probably impossible to make a binary that runs on both older and newer version of Linux, or at least it's not within my skills. Wink
Reply
The default keys for choosing the next/previous EPWING dictionaries wouldn't work for me. The keycodes were set to 107 and 109, respectively, which is the numpad add/minus, I guess. But laptop keyboards have no numpads and the +(=)/- keys on the number row emit 61 and 173.
I've added a fix that supports both types of keys to my github repo.
Reply
I have just uploaded version 21.1 of the Rikaisama Firefox extension.

Download version 21.1 via SourceForge

What's New?

● Fixed the key code mappings for the "= +" and "- _" keys. Added "NUMPAD +" and "NUMPAD -" key mappings. Thanks Boaz!

cb4960
Edited: 2015-03-08, 12:32 pm
Reply