# Flashcard Writer Source: https://docs.janus.cards/flashcards/algorithm The core engine of Janus is the **flashcard writer** that creates **flashcards** for a single **highlight/snippet**. The writer has to solve the following problems: * **Content Selection**: What should the cards specifically test? * **Phrasing**: How should the information be broken down and expressed to best test you? * **Formatting**: What should the cards look like? Through prompting (and further customization soon), you can guide exactly how the writer thinks about making your flashcards. ## Prompting The writer is governed by the following parameters: * **User Prompt**: Prompts submitted by you in the [Generate](/workflow/notebook/generate) or [Highlight](/workflow/notebook/highlights) tabs. * **Best Practices**: A comprehensive document outlining what "good" and effective flashcards look like, and how to create them. *There will soon be support for you to specify your own best practices* The **user prompt** takes priority over **best practices** and allows you to give very specific instructions for what you want. Here are some examples: > Turn this quote into a cloze card. There should be multiple deletions, each about 3-4 words long, that partition the quote fully. Then, if you know the name of the author and/or the book add these names to the end of the quote like: "- Meditations, Marcus Aurelius" > Turn this vocab word into a Q\&A card. The front side should have just the word. The back side should have the definition, the part of speech and then an example in a sentence. You will soon be able to save and reuse prompts. ## Writing Tasks The same algorithm is used in multiple contexts. Below, you can find the tasks along with the user prompt. | Task | User Prompt | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | Generating new or additional flashcards for a single highlight in [highlights](/workflow/notebook/highlights) tab or [document reader](/workflow/notebook/document-reader). | **Prompt you input** | | Requesting to change or improve your flashcards for a single highlight | **Prompt you input** | | Running an [edit command](/workflow/notebook/highlights#edit-commands) | **Refinement prompt** | | Called by the **Highlighter** after running the [Generator](/workflow/notebook/generate) | **Part of the prompt you input.** The highlighter determines which parts of the original prompt are relevant for that particular highlight, and uses that. | # Card Formats Source: https://docs.janus.cards/flashcards/format ## Markdown All card types support most markdown features including: * **Bold text** with `**word**` * *Italicizing* with `*word*` * Inline maths, like $a^2 + b^2 = c^2$, by surrounding MathJax or LaTeX equations with `$...$` * Code blocks, like `print("Hello, world!")`, by surrounding with backticks. For a guide on markdown generally, you can take a look at this [guide](https://guides.github.com/features/mastering-markdown/) ## Card Types Currently, Janus supports two card types: **Question & Answer** (Q\&A) and **Cloze cards**. ### Q\&A You can make a Q\&A card by separating the front-side (question) and the back-side (answer) using three dashes (`---`). For example: ``` What is the capital of France? --- Paris ``` ### Cloze A cloze is a kind of **fill in the blank** card; the blank is referred to as the **deletion**. The front-side will show the text with blanks and then the back-side will fill in the blanks for you. ### Simple Deletions: To create a deletion, hide the text in two curly braces (i.e. `{{..}}`). For example: ``` The top three largest countries in the world are {{Russia}}, {{Canada}} and {{China}} ``` has **front-side** ``` The top three largest countries in the world are ______, ______ and ______ ``` and **back-side**: ``` The top three largest countries in the world are Russia, Canada and China ``` When a card only uses simple deletions, Janus automatically groups them together as group 1. ### Grouped Deletions Deletions may be grouped together. Each grouping will give a variation of the flashcard where the front-side hides **only that group**. To group deletions, specify the grouping by adding the index at the start, followed by two colons (i.e. `{{1::...}}`) For example ``` {{1::France}} had a population of {{2::68 million}} in {{3::2024}} ``` is a cloze card with 3 groups. When tested, you will see one of: * `_____ had a population of 68 million in 2024` * `France had a population of _____ in 2024` * `France had a population of 68 million in _____` # Anki Source: https://docs.janus.cards/workflow/export/integrations/anki ## Exporting to .apkg This is the simplest way to export flashcards to Anki. Exporting creates a `.apkg` file which can then be opened in Anki and imported. Anki already handles deduplication. Example exporting to anki with .apkg ## Exporting with AnkiConnect [AnkiConnect](https://ankiweb.net/shared/info/2055492159) is an Anki plugin that allows external applications to interact directly with your Anki collection. You are then able to export directly into an existing or new deck with one click. **Limitation**: Anki must be open with AnkiConnect installed on the same device Janus is running on. ### Setup * Follow the instructions to install AnkiConnect [here](https://github.com/amikey/anki-connect?tab=readme-ov-file#installation). * Give Janus permission to access your Anki collection: * Go to `Tools > Add-ons`, click `AnkiConnect`, and then `Config`. * Add `"https://app.janus.cards"` to the `webCorsOriginList`. Do not forget to add a comma between each element in the list, and do not add an extra `/` at the end of the URL. * Restart Anki if the add-on prompts you to apply the new configuration. # Mochi Source: https://docs.janus.cards/workflow/export/integrations/mochi This only works with the premium version of [Mochi](https://mochi.cards/). [Mochi](https://mochi.cards) is a modern flashcard app for both spaced repetition and note taking in markdown. ## Setup In order to connect Janus to Mochi, you need to share your Mochi API key. * In Mochi, click the username dropdown and then select `Account Settings`. * Scroll down to `API Keys` and click `Create API Key`. * Copy the API key into Janus via `Settings > Mochi > API Key`. Mochi Settings # Overview Source: https://docs.janus.cards/workflow/export/overview Once you're happy with the cards you've created, you're ready to export the deck to your favorite spaced repetition app. Example of exporting flashcards in Janus ## Supported Integrations ## Deck Name All flashcards get saved into a single deck in your collection. Most apps support **nested decks** or **sub-decks** where you can create a hierarchy of decks. Sub-decks can be defined by creating a slash (`/`) separated path from the outermost deck to the innermost deck: `//` For example, if you wanted to create a deck called `Anatomy` inside a parent deck `Medicine`, you need to name your deck `Medicine/Anatomy`. **All exported flashcards go in the sub-deck**. ## How Exporting Works ### Conversion Janus converts flashcards to whatever format the spaced repetition app needs. Common formats include markdown and html. ### Deck Deduplication Some integrations can export directly into an existing deck, as well as see what cards already exist. If you export multiple times to the same deck, Janus will **ensure that no duplicates are added**. # Creating Your First Deck Source: https://docs.janus.cards/workflow/first-deck Welcome to **Janus**! This guide goes through everything you need to know to create your first deck in minutes.