Mochi Documentation


Mochi

n. (餅) A Japanese rice cake made from glutinous rice.

n. (持ち) having; holding; possessing; durability


Mochi is an app to help you remember things. It uses a flash card system called spaced repetition. This system will automatically schedule cards based on how well you already know them. Cards you know well will appear less often, and cards you don't know well will appear more frequently.


Decks

All cards are stored in a deck. Decks can also be stored in other decks to create hierarchies. Decks can have custom review settings, or inherit settings from their parent, or the global settings if they have no parent.

Decks can be displayed in a few different ways. Grid view, List view, Column view, and Notebook view are all available depending on your needs. You can change the view in the upper left-hand corner of the deck page.

Sharing

Decks can be shared in a couple of different ways. Either by exporting a copy of your deck and sending it to a friend so that they can import. Or by publishing it to the web and sharing it with a link.

Exported .mochi files are just zip archives with a collection of attachments and a JSON text file. If you want to edit an export, or create one manually, simply rename the .mochi file to a .zip file to extract it.

Publishing

Decks can be published to the web. Anyone with a link to the published deck can view that deck in the browser or in the Mochi app. They can also clone the deck to their own collection and start reviewing or editing without affecting your deck.


Cards

Cards are really the heart of Mochi. They are formatted using markdown and can have one or more discrete "sides" separated by three dashes (---). The sides act sort of like the answer/question of traditional flash cards. When you review a card you can gradually reveal each side. You can see examples of multi-sided cards in this deck: [[Japanese / Vocab|N2HNExxMI268Txa]]

Cards can either be used as flash cards with the spaced repetition system, or simply as note cards in an archived deck. Mochi works particularly well as a zettelkasten notebook.

Templates

Templates speed up card creation by allowing you to re-use the same layout for all of your cards. There are two important concepts to understand when it comes to using templates:

Templates Templates look like normal markdown notes. You can use all of the same markdown features including HTML in your templates. The content of the template will be applied to any card that uses that template. The difference is that templates can access field values in a card. You can add field values to your template by using this syntax: << My Field >>>. Templates use Mustache to render fields, so you can also use conditional tags like << #My Field >> foobar << /My Field>> to only display "foobar" when My Field is populated.

Fields Fields add structured data to your cards. Instead of writing free-form text, you'll add content to your cards through fields. For example a template might have two fields: Question and Answer. Another example might have three fields: French word, English word, Example sentence. The fields you use depend on the material you're studying.

Fields also support all of the same markdown that you can use in a non-templated card (including attachments).

Custom components

Custom components are very powerful and mostly useful in templates. They provide automated actions / transformations based on text. For example you can include a component in your template that takes some text and returns an audio clip of the text being spoken. Or another component that provides pronunciation hints for Japanese words.

Custom components take the form of custom HTML elements that looks like this:

<speech lang="en">Hello, world!</speech>

The component will operate on whatever text is inside the opening and closing tag. Some components also come with attributes that you can use to tweak the results.

Custom components become very useful when used in conjunction with fields within a template. Using custom components you can automatically generate content for a card from a single field, such as a field representing a vocab word.

## << Vocab >>
----
<furigana> << Vocab >> </furigana>


<translate from="ja" to="en"> << Vocab >> </translate>


<speech lang="ja"> << Vocab >> </speech>

You can access a list of components by typing / when editing a template.

<speech lang="">Phrase to speak</speech>

The value for the lang attribute should be a two-character language code. Some languages are available in more than one country. For example english can be U.S. (en-US), British, (en-GB), Austrailian (en-AU), etc. For the full list of available languages, see: https://cloud.google.com/text-to-speech/docs/voices

<furigana>例えば</furigana>

The text in the should be some Japanese text with at least one kanji character to display phonetics above it.

<translate from="en" to="es">Text to translate</translate>

The from and to attributes should contain a two character language code.

<image moderate="true">Dog</image>

Uses image search to search for an image using the enclosed text. The moderate attribute may be omitted, and if it is will default to true.

<dictionary from="es" to="en">rojo</dictionary>

Uses a dictionary to look up the term enclosed. The from attribute should be a two character language code representing the word to look up, while the to attribute should be the language to use for the definition (if different from the target language). A list of available dictionaries is listed below.

  • ar Arabic

    • to en English
  • en English

    • to ar Arabic
    • to fr French
    • to de German
    • to ja Japanese
    • to ko Korean
    • to pt Portuguese
    • to ru Russian
    • to zh_s Chinese (Simplified)
    • to zh_t Chinese (Traditional)
    • to es Spanish
  • fr French

    • to en English
  • de German

    • to en English
  • el Greek

    • to en English
  • he Hebrew

    • to en English
  • it Italian

    • to en English
  • ja Japanese

    • to nl Dutch
    • to en English
    • to fr French
    • to de German
    • to hu Hungarian
    • to ru Russian
  • ko Korean

    • to en English
  • la Latin

    • to en English
  • pt Portuguese

    • to en English
  • ru Russian

    • to en English
  • zh_s Chinese (Simplified)

    • to zh_s Chinese (Simplified)
    • to en English
  • zh_t Chinese (Traditional)

    • to zh_t Chinese (Traditional)
    • to en English
  • es Spanish

    • to en English
  • th Thai

    • to en English

Markdown

Mochi support most standard markdown features in addition to some special extensions like $\LaTeX$, {振}(ふ)り{仮}(が){名}(な), ==highlighted text==, and {{cloze deletions}}. You can take a look at this guide for more help on makdown generally, or click the keyboard icon (desktop only) on the bottom right for more hints.

Adding Sides

Like traditional flash cards, Mochi cards can have one or two sides. You can separate "sides" in a card by adding three dashes on its own line: --- The content above the line will be the first side, and the content below will be on the second side. When reviewing cards, only the first side will be shown, and you can press the space bar to reveal the next side. But why stop at two sides? With Mochi you can add as many "sides" as you want, and they will be revealed on at a time.

References

You can make references to other cards or decks using MediaWiki syntax:

[[My card|the-card-id]] or just [[the-car-id]]

The text before the pipe | character will be displayed as the title of the link, and the text after the pipe is the card or deck ID. If no title is provided then the title of the card will be pulled dynamically based on the contents of the card.

You can open the referenced card in editing mode by holding command on Mac or control on Windows/Linux and clicking the reference text.

Cards that link to another card will be back referenced by the card that was linked to. You can see an example of this in the [[Kanji|FSMl7EpIZbagcIF]] deck, where each kanji card will show a list of vocab words that link to it.

You can also embed one card inside of another using this variation:

[[the-card-id:embed]]

Attachments

Media can be attached by dragging and dropping a file onto the editing area, or pasting an image that's been copied to the clipboard. The media will be stored locally and displayed using standard markdown syntax.

![Some Image](@media/image-name.jpg)

The above syntax will work for audio and video files as well. If the card is deleted, the associate media will be deleted as well.

HTML

If markdown isn't enough, you can also add HTML to your cards. For example, to change the color of a word you can write: <span style="color:red">foo</span> which will look like this: foo.


Spaced repetition

Spaced repetition is a very powerful flash card scheduling system. It exploits something called forgetting curve, which describes the fact that it takes longer to forget something if you are reminded of it right before you forget it.

Mochi's spaced repetition algorithm is very simple. Each time you remember a card, the time it takes before it's reviewed again doubles. When a card is forgotten that time is cut in half. These settings can be tweaked in the settings, and different decks can have their own settings.

Learning new cards

New cards are not immediately placed in the review schedule. That is what the New cards button is for. This is useful in case you want to add a lot of cards up front, or are importing a deck form somewhere else and want to gradually add cards to your review schedule.

You can learn all new cards in your collection by clicking "New cards" in the left side bar. Or you can learn new cards for a single deck by clicking the "New cards" button at the top of the deck page.

You can limit the number of new cards that will be shown each day in the review settings. The setting can be adjusted for the entire app, or for individual decks.

Tip: If you want to use a deck as a notebook, you can limit the new cards to 0, or archive it.

Reviewing cards

When a card is due, it will show up in the "Due today" screen. The cards will be presented in random order, and cards that are past due (due yesterday or earlier) will be shown first. If you miss a card, you'll have an opportunity to re-review it at the end.

Reverse reviews

Normally when reviewing a card, the first side is revealed, followed by the second side (and so on if there are more than two sides). When the "reverse reviews" option is enabled, the card will also be shown with the last side revealed, followed by the side before it, and so on.

This allows you to, for example, test recognition and recognition with a single card. There will be two separate review histories for each direction.

Reverse reviews can be enabled globally, per deck, or per card.

Cramming

In addition to the other two modes, you can also review your cards outside of the spaced repetition schedule. The "Cram" button allows you to review all of the cards in your deck regardless of whether they're due. Reviews. in this mode will not affect the standard spaced repetition scheduling.

Additionally, if any filters or search terms are applied to the deck, the Cram mode will only show cards from the filter / search results. For example, you can filter for cards that have a retention rate less than 80%, and do a cram on just those cards.

Archiving

Cards and decks can both be "archived." When a card is archived, it will not show up in the "New cards" section, or in the "Due today" section. Its review history will remain unchanged.

When a deck is archived, all of the cards in that deck will be effectively archived.


Import and export

Mochi supports various import and export options to maximize portability of data, and allow users to easily share decks with each other.

.mochi format

Decks can be exported as .mochi files. This format will export all cards within a particular deck as well as various metadata such as review history, card order, etc.

Anki .apkg format

Mochi supports importing Anki .apkg files. Because of the differences between Mochi and Anki, however, Anki cards will not necessarily import exactly as they appear in Anki. For best results, consider editing the templates of your Anki decks to remove extraneous HTML and remove all CSS and Javascript before exporting. When imported into Mochi, the CSS and Javascript will be removed, and the HTML will be converted to markdown, so the cards should work in Anki without any CSS or Javascript.

Markdown format

You can also choose to export your decks as a collection of markdown files. At the moment this export format does not preserve metadata like review history, card order, etc.

You can also import individual markdown files and each file will be imported as its own Mochi card.


Keyboard shortcuts

Mochi is designed to get out of your way so that you can learn as quickly and easily as possible. To that end almost every action on every screen has keyboard shortcuts. For example d will delete a note or card, space will reveal the next side of a card, e will edit a note or card, etc.

You can press ? at any time, or click the keyboard icon in the bottom right to see a list of keyboard shortcuts for the current screen.