To use these templates, you'll need to create a new Anki "note type" with the following fields:
- Sound
- Time
- Source
- Image
- Target: line
- Base: line
- Target: line before
- Base: line before
| #!/usr/bin/ruby | |
| require 'cgi' | |
| require 'uri' | |
| require 'net/http' | |
| input = File.read("./query.txt") | |
| #inputhtml = CGI::escapeHTML(input) | |
| #puts inputhtml | |
| #lookup = %Q^&query=Kittens+are+sometimes+born+with+defects.+People+who+receive+cats+as+gifts+are+recommended+to+get+it+examined+for+its+health.+Some+birth+defects%2C+like+heart+problems%2C+require+urgent+vet+attention.+Others+are+harmless%2C+like+polydactyly.+Polydactyly+means+many+digits%2C+or+many+%22fingers%22+from+poly+%28many%29+and+dactyl+%28digit%29.+Sometimes%2C+there+is+a+mutation+%28change%29+in+cat+families.+Most+cats+have+only+four+to+five+toes+per+paw%2C+depending+on+whether+it+is+the+front+or+back+paw.+These+mutated+cats+have+six%2C+seven%2C+and+in+rare+cases+even+more.+All+of+these+cats+are+called+polydactyl+cats.+They+can+also+be+called+Hemingway+cats+because+author+Ernest+Hemingway+owned+many+of+these+cats.&parserSelect=English&parse=Parse^ | |
| lookup = %Q^&query=^+input+%Q^&parserSelect=English&parse=Parse^ |
| step 1 go to | |
| http://furigana.sourceforge.net/cgi-bin/index.cgi | |
| put in the japanese you want to read | |
| step 2 | |
| copy the source code of the response to a file | |
| step 3 | |
| snip out bits you dont need | |
| step 4 sorry about the cat | |
| cat furigana.large.html | sed 's/<ruby>/\n&/g'| sed 's/<rp>[()]<\/rp>//g' | awk -F'[\<\>]' '{cmd = "/usr/local/bin/trans -brief " $5$13"";cmd |getline out; print "<ruby><ruby><rb>"$5"</rb><rt>"$9"</rt></ruby>"$13"<rt>"out"</rt></ruby>"$14$15$16$17$18$19$20; close(cmd)}' > some file .html | |
| step 5 |
| #! /bin/bash | |
| # function to create all dirs til file can be made | |
| function mkdirs { | |
| file="$1" | |
| dir="/" | |
| # convert to full path | |
| if [ "${file##/*}" ]; then | |
| file="${PWD}/${file}" |
| var app = angular.module('flapperNews', ['ui.router','chart.js','ngResource']) | |
| app.config([ | |
| '$stateProvider', | |
| '$urlRouterProvider', | |
| function($stateProvider,$urlRouterProvider){ | |
| $stateProvider | |
| .state('home',{ | |
| url: '/home', | |
| templateUrl: '/home.html', |
| file = File.open("klist.txt") | |
| conts = file.read | |
| #Fs | |
| re = /(フェ)|(ファ)|(フォ)|(フー)|(フィ)/ | |
| subst = {'フェ' => 'fェ', 'ファ'=> 'fァ', 'フォ' => 'fォ', 'フー' => 'fー', 'フィ' => 'fィ'} | |
| result = conts.gsub(re, subst) | |
| # the following two lines give a two-line status, with the current window highlighted | |
| hardstatus alwayslastline | |
| hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
| # huge scrollback buffer | |
| defscrollback 5000 | |
| # no welcome message | |
| startup_message off |
| #! /bin/bash | |
| # streaming on Ubuntu via ffmpeg. | |
| # see http://ubuntuguide.org/wiki/Screencasts for full documentation | |
| # see http://www.thegameengine.org/miscellaneous/streaming-twitch-tv-ubuntu/ | |
| # for instructions on how to use this gist | |
| if [ ! -f ~/.twitch_key ]; then | |
| echo "Error: Could not find file: ~/.twitch_key" | |
| echo "Please create this file and copy past your stream key into it. Open this script for more details." |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| .axis text { | |
| font: 10px sans-serif; | |
| } | |
| .axis path, .axis line { | |
| fill: none; |
To use these templates, you'll need to create a new Anki "note type" with the following fields: