DailyJapaneseThread

Firefox Auto-scrolling Rikai VN Texthooking Setup

Feb 26th, 2016
13,414
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - Firefox Auto-scrolling Rikai VN Texthooking Setup Guide -
  2.  
  3. NOTE - This assumes you already have Rikaisama set up and know how to use Rikaisama's Anki Real-time Import function. If you don't, then refer to Rikaisama's site to see how to set up the import function:
  4. http://rikaisama.sourceforge.net/#realtime_import_help
  5. (Tip: if you want audio, use "[sound:$a]" in the save format instead of just "$a" and set the save location for audio to your collection.media folder)
  6.  
  7.  
  8. 1. Install ITHVNR (or any texthooker that allows automatically copying each new line to clipboard)
  9. http://www.hongfire.com/forum/showthread.php/438331-ITHVNR-ITH-with-the-VNR-engine
  10.  
  11. 1b. In ITHVNR's options, enable Auto copy to clipboard.
  12.  
  13. 2. Install the Clipboard Inserter Firefox extension.
  14. https://addons.mozilla.org/en-US/firefox/addon/clipboard-inserter/
  15.  
  16. 3. Save one of the following as an HTML file (Right click -> Save Page As... -> save it as a .html file with whatever name you want). It's a blank page that will automatically scroll down as new stuff is added to it, will stop auto-scrolling if you scroll up, and will resume auto-scrolling if you scroll back down to the bottom.
  17. - Plain (no styling or extras; only auto-scroll): http://pastebin.com/raw/VMBAnawh
  18. - Styled 1 (easy to edit): http://pastebin.com/raw/DRDE075L
  19. - Styled 2 (easy to edit), a character/line counter, and an undo button: http://pastebin.com/raw/HxjV6YrB
  20.  
  21. 4. Open your VN, ITHVNR, and the HTML file
  22.  
  23. 5. Hook ITHVNR to the VN (Process -> Select the VN's process -> Attach)
  24.  
  25. 6. Start the VN / proceed to the next line if you've already started it. Go to the dropdown on ITHVNR and select whichever one is correctly grabbing the line. If none of them are correct but there's one that has double of every character, then enable "Auto suppress repetition" in ITHVNR's options and try again.
  26.  
  27. 7. When you've found the correct one in the drop down, copy the line to clipboard (you won't have to do this for future lines, it just only copies to clipboard automatically when new lines pop up in the texthooker)
  28.  
  29. 8. Go to the HTML file's tab in Firefox and press Clipboard Inserter's icon to toggle it on.
  30.  
  31. The line you just copied to clipboard should pop up on the page once you toggled Clipboard Inserter on. Now each line that you see on the texthooker automatically gets copied to clipboard and passed to the HTML page for easy use with Rikai to import/look up new words.
  32.  
  33. End result: http://i.imgur.com/aknu5RR.png
  34.  
  35.  
  36. -- Troubleshooting & FAQ --
  37.  
  38. Q: The auto-scrolling is broken, how do I fix it?
  39. A: There are 3 common problems/solutions:
  40. 1. You're blocking scripts on the page with NoScript or a similar extension. Allow scripts for that page.
  41. 2. The line being added to the page was taller than 200 pixels (or 40 on an older version), so the page didn't remain latched to the bottom. Edit the HTML file and increase the number in "var LEEWAY = 200" in the html file, save it, and reload the page.
  42. 3. Firefox probably enabled requiring signatures for extensions to be enabled. Go to "about:config" (type it in your address bar and hit enter), go to xpinstall.signatures.required and set it to false.
  43.  
  44. Q: The text is too small / I don't like the font / I don't like the colors. How do I fix the page to look how I want it to look?
  45. A: Use the alternate HTML link (http://pastebin.com/raw/DRDE075L) and edit that. Look at the card styling in your Anki decks or look up how to do CSS if you're confused and need more examples on how to modify it.
  46.  
  47. Q: I want the character name and line to display together rather than just the dialogue with no name showing up in the texthooker, but they're in different threads. Can I link them together somehow?
  48. A: In the dropdown for the threads, there's a 4 digit value at the beginning of the thread name. Take that, remove the 0s at the beginning of it (i.e. 0013 becomes 13, 001B becomes 1B, etc). Get that value for both the thread containing the speaker's name and the thread containing the dialogue line. Then you want to go to the textbox next to the name of the process you're hooked into on the main window and you want to type ":LNameThread-DialogueThread". As an example, if the name thread is 13, and the dialogue thread is 4, you want to type :L13-4. After you do this, if you go back to the thread where the dialogue is showing up in the texthooker, the names should be showing up right before the dialogue for any future dialogue lines.
  49.  
  50. Q: Can I import an entry other than the first entry in Rikai?
  51. A: A lot of the time you can enable sticky mode and mouseover the entry you want and import that (though you'll have to fix the sentence on the card when doing this), but for cases where the entry you want has the same spelling as the main entry, you'll have to import the incorrect one and manually fix the card. If the word has different audio (same spelling but different pronunciation), check if Rikai has audio for it with http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kana=&kanji= (example url http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kana=はしる&kanji=走る). If it doesn't have audio, you can also check Forvo.
  52.  
  53. (OLD) Q: Furigana Inserter is displaying furigana and I don't want it to. How do I disable it? (The Guide used to use Furigana Inserter instead of Clipboard Inserter. Question kept for those still using Furigana Inserter who haven't switched over yet.)
  54. (OLD) A: As stated in the instructions, Furigana Inserter relies on Mecab to generate the furigana, so uninstall/disable Mecab if you want to get rid of it. Alternatively, you can install Clipboard Inserter instead of Furigana Inserter. https://addons.mozilla.org/en-GB/firefox/addon/clipboard-inserter/
  55.  
  56. -
  57. Last updated 2016-05-14 (Added 3rd HTML)
RAW Paste Data