sbseltzer / ja-srs-utils Goto Github PK
View Code? Open in Web Editor NEWFormatting better Japanese SRS cards
License: MIT License
Formatting better Japanese SRS cards
License: MIT License
Furigana may also be useful for not non-kanji characters, such as katakana (and perhaps other things?) as well. Much like Japanese toddlers, I learned hiragana before katakana, so it's a legit use-case in my eyes.
In any case, a quick solution would be "if furigana braces are encountered and the character before is a non-kanji, seek backwards to the next space" or something. It may be worth considering the merits of making this the general case, since it's a necessary workaround when you only want to specify furigana for a few particular kanji. The spaces could be trimmed after the fact.
JS Booster breaks when your Anki User directory path contains non-ASCII characters. For AJATTers who have switched their OS to Japanese, such as I have, this leads to breakage when their Documents folder (which is where Anki stores its media) has been renamed to a Japanese counterpart. Such is the case on my Ubuntu partition.
I see three potential solutions:
Number 2 is attractive since it's the most hands-off approach, but the others still deserve attention.
See if there's a solution for this that doesn't involve manually installing the font on the OS.
Some users may prefer hovering over clicking to activate things. Some may want to make a button separate than target content to activate stuff.
Example: font cycling could happen on click of its element, hovering over the element, or clicking some other element. Doing the same for showing/hiding furigana would also be useful.
Combining/compressing the JS and CSS will be more important as this project grows. See if there's a nice way to do that locally.
While reviewing cards, the javascript appears to stop functioning after the first view, that is:
And so on...
This does not seem to occur when in edit or preview mode.
There is code laying around the stylesheet that was ripped from jisho.org to support furigana displaying similarly to <ruby> tags, which are not supported on all HTML browers. They appear to be available in Linux and Windows versions of Anki, but it may be a good idea to support the CSS replacement in card.js.
jQuery is pretty big. See if a suitable replacement can be found.
Cloze cards surround your cloze deletion with <span class="cloze"></span>
which interferes with furigana parsing.
Doing text{{c1::kanji(furi)}}text
works.
Doing text{{c1::kanji(furi)::placeholder}}text
works.
Doing text{{c1::kanji(furi)::placeholder(furi)}}text
does NOT work.
Doing text{{c1::kanji::placeholder}}(furi)text
does NOT work.
Doing text{{c1::kanji}}(furi)text
does NOT work.
ja-srs-utils is pretty dry and doesn't make for nice prefixes. Come up with something better before people start actually using this.
After some initial testing, it looks like Mnemosyne is a definite go.
Media directory on Windows: %APPDATA%/Mnemosyne/default.db_media
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.