### Example of a Formatted Basic Note Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Note formatting An example of a 'Basic' note type, demonstrating the placement of the note content and tags. ```markdown START Basic This is a test. Back: Test successful! Tags: Testing END ``` -------------------------------- ### Python Script Configuration Example Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Header-paragraph-style Example of how to configure the 'Custom Regexps' section in the Python script's config file for header paragraph style. ```ini Basic = ^#+(.+)\n*((?:\n(?:^[^\n#].{0,2}$|^[^\n#].{3}(? END ``` -------------------------------- ### Example of Deleting a Note with ID Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Deleting-notes This example demonstrates how to delete a note with the identifier '123456789'. Proper separation with newlines is crucial. ```plaintext DELETE ID: 123456789 ``` -------------------------------- ### Example Markdown Content Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Question-answer-style Sample markdown content demonstrating various question and answer formats that can be parsed by the custom regex. Includes single-line, multi-line, and spaced Q&A pairs. ```markdown Q: How do you use this style? A: Just like this. Q: Can the question run over multiple lines? A: Yes, and So can the answer Q: Does the answer need to be immediately after the question? A: No, and preceding whitespace will be ignored. Q: How is this possible? A: The 'magic' of regular expressions! ``` -------------------------------- ### Per-File Tag Formatting Example (Line Break) Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Tag-formatting This format applies tags to all cards generated from a file. The '{File Tags Line}' should be 'FILE TAGS' by default, followed by the tag list on the next line. ```text FILE TAGS Maths School Physics ``` -------------------------------- ### Generic Block Note Structure Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Note formatting Format your 'block' notes using this structure. Ensure each section is correctly delimited by START and END. ```markdown START {Note Type} {Note Fields} Tags: END ``` -------------------------------- ### Default Delete Regex Example Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Regex This shows the default format for deleting notes using the script, including the 'DELETE' marker and the Anki ID. ```regex
DELETE  
<!--ID: 129414201900-->  
``` -------------------------------- ### Custom Syntax Example: Header Paragraph Style Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md This style uses a Markdown header as the front of the flashcard and the subsequent paragraph as the back. It's suitable for notes where the header provides context for the answer. ```markdown # Style This style is suitable for having the header as the front, and the answer as the back ``` -------------------------------- ### Glob Syntax Example: Ignore Excalidraw Files Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md This glob pattern ignores all files ending with '.excalidraw.md'. This is useful to prevent slow scanning of Excalidraw files. ```glob **/*.excalidraw.md ``` -------------------------------- ### Example Delete Regex Note Line with ID Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Regex This is an example of a delete regex line with a specific Anki ID. The ID is crucial for the script to identify the note. ```regex
{Delete Regex Note Line}  
<!--ID: 129840142123-->  
``` -------------------------------- ### Example Delete Regex Note Line Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Regex Use this regex to mark notes for deletion. Ensure the ID comment remains intact. ```regex {Delete Regex Note Line} ``` -------------------------------- ### Python Code Block Example Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/tests/defaults/test_vault_suites/markdown_test/markdown_test.md Showcases a basic Python print statement within a Github-flavoured markdown code block. Anki does not provide syntax highlighting for these blocks. ```python print("Hello world!") ``` -------------------------------- ### Python Script Cloze Regex Configuration Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Cloze-Paragraph-style This is the configuration line for the Python script to enable cloze paragraph detection. Set 'CurlyCloze = True' for this example to work. ```ini Cloze = (.*\{.*\n?) ``` -------------------------------- ### CurlyCloze: Simple Cloze with Multiple Gaps Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Cloze-formatting When 'CurlyCloze' is enabled, use simple curly braces for clozes. IDs are assigned sequentially starting from 1. ```markdown This is a {cloze} note with {two clozes} ``` -------------------------------- ### Glob Syntax Example: Ignore Template Folder Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md This glob pattern ignores all files within the 'Template' folder and its subdirectories. It's used to exclude specific directory structures from scanning. ```glob Template/** ``` -------------------------------- ### Glob Syntax Example: Ignore Private Folders Anywhere Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md This glob pattern ignores all files within any folder named 'private', regardless of its location in the vault. It helps in excluding sensitive or irrelevant private sections. ```glob **/private/** ``` -------------------------------- ### Custom Syntax Example: Ruled Style Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md The ruled style requires at least three hyphens ('---') to separate the front and back of a flashcard. This provides a clear visual distinction between the question and answer. ```markdown How do you use ruled style? --- You need at least three '-' between the front and back of the card. ``` -------------------------------- ### CurlyCloze: Mixed Cloze Styles Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Cloze-formatting Combine different cloze syntaxes, including automatic ID assignment and explicit IDs, when 'CurlyCloze' is enabled. IDs without explicit specification start from 1 and increment. ```markdown This is a {cloze} note with {multiple} non-id clozes, as well as {2:some clozes} with {c1|other styles} ``` -------------------------------- ### Custom Syntax Example: Cloze Paragraph Style Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md This style allows for cloze deletions within paragraphs, using curly braces '{}' to indicate the parts to be hidden. It's useful for creating flashcards from sentences with missing words. ```markdown The idea of {cloze paragraph style} is to be able to recognise any paragraphs that contain {cloze deletions}. ``` -------------------------------- ### Configuration for Basic Regex Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Markdown table style This is how the custom regex is configured in the tool's settings. Ensure the 'Regex' option is checked when running the plugin or script. ```ini Basic = ``` ```ini Basic = \|([^\n|]+)\|\n\|(?:[^\n|]+)\|\n\|([^\n|]+)\|\n? ``` -------------------------------- ### Obsidian Embedded Audio Syntax Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Audio-formatting Use Obsidian's standard embed syntax for audio files stored locally. ```markdown ![[embed]] ``` -------------------------------- ### Python Script Config - Basic Regex Placeholder Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/RemNote single-line style This is the default configuration line for the 'Basic' regex in the Python script's config file before customization. ```ini Basic = ``` -------------------------------- ### Web-hosted Image Embedding Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Image-formatting Use this format for web-hosted images. Copy the image address and use it as the URL. ```markdown ![alt-text](image_url) ``` -------------------------------- ### AnkiConnect Configuration Source: https://github.com/obsidiantoanki/obsidian_to_anki/blob/master/README.md Configure AnkiConnect settings for the Obsidian plugin. Ensure 'webBindAddress' is set to '127.0.0.1' and 'webCorsOriginList' includes 'app://obsidian.md'. ```json { "apiKey": null, "apiLogPath": null, "webBindAddress": "127.0.0.1", "webBindPort": 8765, "webCorsOrigin": "http://localhost", "webCorsOriginList": [ "http://localhost", "app://obsidian.md" ] } ``` -------------------------------- ### Run Python Script from Command Line Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Troubleshooting If the Python script fails to run, try executing it directly from your terminal. Ensure you replace `{PATH_TO_SCRIPT}` with the actual path to the script file. ```bash python3 {PATH_TO_SCRIPT} ``` -------------------------------- ### Python Script Configuration for Ruled Style Source: https://github.com/obsidiantoanki/obsidian_to_anki/wiki/Ruled-style This configuration snippet shows how to set the 'Basic' custom regex for ruled style in the Python script. Ensure the 'Regex' option is checked when running the script. ```ini Basic = ((?:[^\n][\n]?)+\n)-{3,}(?:\n(?:^.{1,3}$|^.{4}(?