Skip to content

Instantly share code, notes, and snippets.

@LennyPhoenix
Created April 9, 2022 13:46
Show Gist options
  • Save LennyPhoenix/2b76d9995058b819aa2c78844858c5f8 to your computer and use it in GitHub Desktop.
Save LennyPhoenix/2b76d9995058b819aa2c78844858c5f8 to your computer and use it in GitHub Desktop.
Setting up Obsidian for flashcards.

Setting up Flashcards

Start by downloading the Obsidian app (it's just on the Google play store), then open it up.

Select "Create" and choose a location to put it (you will probably want to note down where you choose because you'll need the location to be able to sync with your PC) then you'll have a blank new obsidian vault to work with.

Plugins and settings

In order to set up flashcards there are a few things you'll want to do, start by going to the settings menu (bottom of the left sidebar). Go to "Community Plugins", disable Safe mode, then click "Browse".

Search for "Spaced Repetition", then install and enable it, before pressing "Options". Under the "Flashcard tags" setting, remove "#flashcards" and replace it with whatever tag you want to use for your deck.1 Scroll down until you find "Save scheduling comment on the same line as the flashcard's last line?" and enable it. These are the only settings we will have to change, so next just exit the options menu.

Creating some cards

Lets create our first note, select the "New note" button in the file view or the "Create new file" button in the "No file is open" panel. Consider each note to be a category of flashcards: if you are creating some flashcards on the effects of natural hazards, you could call your note "Natural Hazards", then create a subheading for "Effects", however you can call the note whatever you want.

Next, we will need to label the note and add some headers. This will let Spaced Repetition detect the cards in the note and also give us some context about what each card is to do with when reviewing. Notes are written using a tool called "Markdown", which allows document formatting (headers, bold, links, italics, etc) to be applied through text directly:

Natural Hazards.md
---
tags: gcse-deck
---

# Natural Hazards

What is the definition of a natural hazard?::A natural event with the possibility of causing death, damage, or destruction.

What is the requirement for a hazard to become a disaster?
?
Must have actually occured, then caused damage, death, or destruction.

## Effects

A primary effect is ==an effect caused directly by the hazard==.

Lets break this down:

---
tags: gcse-deck
---

The ---s tell obsidian that the enclosed text is "Frontmatter", which is a fancy way of specifying information about the note itself. In this example we use tags: gcse-deck to show that this note should have the "gcse-deck" tag we specified earlier when setting up Spaced Repetition. There are other options that we can put here, but this is all we need for now.

# Natural Hazards

In Obsidian, document headers are specified with a number of #s and a space. Generally, the first header in your document should be the name of the document itself, but this is not enforced actively by Obsidian.

What is the definition of a natural hazard?::A natural event with the possibility of causing death, damage, or destruction.

This is the first card we have created. It is one line long, but has all the information Spaced Repetition needs to make a card out of it. We begin by asking the question we want to ask: "What is the definition of a natural hazard?". Next we use a double-colon ::, this tells Spaced Repetition that the following is the answer to the card. Next, we enter the actual answer to the card: "A natural event with the possibility of causing death, damage, or destruction."

What is the requirement for a hazard to become a disaster?
?
Must have actually occured, then caused damage, death, or destruction.

This card showcases another method of creating cards: multi-line cards. This is similar to the previous method, but allows questions and answers to span multiple lines. We use a single ? on a line in-between the question and answer to specify this type of card.

## Effects

This line specifies a sub-heading of depth 2 (notice the two #s).

A primary effect is ==an effect caused directly by the hazard==.

This line specifies a third type of card, called a "cloze deletion". The text within the ==s indicates the answer, and will be replaced with a […] when reviewing the card. This allows for a "fill in the blank" style card.

Reviewing our cards

On the left sidebar, press the "review" button:

Pasted image 20220409133246

You will be able to select the deck you want to test yourself from, in this case "#gcse-deck". It will give you a random card to review, then let you show the answer.

Pasted image 20220409133639

You can choose between "Hard", "Good" and "Easy" depending on how well you think you did, and Spaced Repetition will schedule the card to appear again accordingly.

Pasted image 20220409133655

The cards you can test yourself on will refresh on a daily basis depending on how Space Repetition has scheduled them, and gradually cards will become more and more spaced out as your memory improves.

Themes

You can choose a theme by heading to the Appearance section in Options, then pressing the "Manage" button near the bottom. I would personally recommend the "Yin and Yang" theme, but there are plenty to choose from so see what suites you best.

Syncing

Note that this will only work on Android, sadly

Sync will require a little bit more setup, but will be very useful once it is done. First download the Syncthing App on mobile, and open it to perform first-time setup. Next, download the Syncthing desktop client and run the program.

On Syncthing mobile go to the "Folders" tab and press the + at the top-right of the screen. Enter the name of your Obsidian vault as the label,2 and press the "Directory" button. This will prompt you to select a folder, make sure to choose the folder of your Obsidian vault (it should have the flashcard file you made earlier in it). Press the checkmark at the top-right of the screen.

On Syncthing desktop, expand the dropdown under "This Device" and click the string of text next to "Identification":

Pasted image 20220409142904

This will display a QR code. On mobile, go to the devices tab and press the + at the top-right. Press the QR code button and scan the QR code on your computer. Enter a name like "Desktop" and press the checkmark. On desktop you will need to accept the connection from your phone, so wait for a pop-up in the Syncthing window (this may take a few seconds to appear).

Finally, on mobile you may select the "Folders" tab, choose your Obsidian vault folder, and enable the device you just added. Once again, you will get a prompt on the desktop app to add the new folder. Choose any location on your computer to sync it to.

Congratulations, you now have two folders linked from your mobile to your desktop and vice-versa.

Obsidian Desktop

Head to https://obsidian.md/ to download the installer and run it. Once the installation is complete, you can choose "Open" to select the folder you just synced, and you should now have the vault open on your desktop too!

Changes will take a few seconds to fully sync between desktop and mobile, but it should be mostly seamless. Note that it will only be able to sync if both devices are on and connected to the internet.

There is also a "Demo & Help" vault available to explore what functionality Obsidian can provide in a more general note-taking setting.

Head to this Obsidian Markdown guide for some more details on using Markdown in Obsidian.

Footnotes

  1. I personally use "#gcse-deck"

  2. This can technically be anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment