Swipe Words

approved

by LeafChage

swipe words to remember - This plugin has not been manually reviewed by Obsidian staff.

52 downloadsUpdated 14d agoMIT

Swipe Words

A Tinder/Anki-style flashcard view for Obsidian. Point it at a folder of notes — each note becomes a flashcard — and swipe or tap through them with SM-2-style spaced repetition scheduling.

Usage

  1. Install the plugin and enable it.
  2. In plugin settings, Add deck and point it at a folder of notes. Add as many decks as you like — each is a separate folder with its own schedule and its own new cards budget.
  3. Run the "Open Swipe words view" command (Command Palette). With more than one deck configured it asks which to open; each deck opens in its own tab, so several can be studied side by side. Opening a deck that is already open just switches to it.
  4. Tap Show to flip a card and reveal its answer, then rate it Again / Hard / Good / Easy — this schedules when the card is next due. Again also puts the card at the back of the current stack, so it comes round once more before the session ends.

Which cards a session shows

  • Every card in that deck's folder that is due today or earlier.
  • Plus up to that deck's new cards count of cards you haven't learned yet.

A card counts as not-yet-learned until you rate it something other than Again — being failed doesn't get it out of that budget. Those cards are taken oldest-failure-first, and only once they run out are never-seen notes added, in the order they were created. So the backlog is worked through in stable batches; when you have time for more, reopen the view for the next one.

Note format

Each note in the quizz directory is one flashcard:

  • Front: the note's front frontmatter field. Write it as a list when the question needs more than one line — one entry per line, an empty entry for a blank line:

    ---
    front:
      - Fill in the blank:
      -
      - I ____ to the station every morning
    ---
    
  • Back: one row per back-<label> frontmatter key, shown in the order they're written in the file, e.g.:

    ---
    tags: [vocab]
    front: example
    back-meaning: "a thing characteristic of its kind, or illustrating a rule"
    back-synonyms: "instance / illustration / case"
    ---
    

    Repeated labels need unique key names (e.g. back-meaning①/ back-meaning②).

  • Scheduling: the plugin manages sw-due, sw-interval, sw-ease frontmatter automatically once you rate a card for the first time — don't edit these by hand.

Text-to-speech

The front value and any back-* value can mark a phrase as speakable with !tts[<text>](<lang>[, auto]). The bracketed text is what the card displays — tapping it (or the 🔊 next to it) reads it aloud in the given language:

---
front: '!tts[decision](en-US, auto)'
back-意味: '!tts[決断](ja-JP) (けつだん)'
back-例文: 'A conclusion reached after consideration. !tts[It was a hard decision.](en-US)'
---
  • <lang> is a BCP-47 tag (en-US, en-GB, ja-JP, …) and is required. A matching system voice is used when one is installed, otherwise the speech engine picks its own fallback for that language.
  • auto makes the phrase read itself as soon as its side becomes visible — the question when the card reaches the top of the stack, the answer when you flip it. Without it, the phrase only speaks when tapped. Write it bare and lower-case, like the language: "auto" and AUTO aren't recognised.
  • If a side has several auto phrases only the first one plays; tap the rest.
  • A value can mix plain text and several tags; only the tagged parts become tappable.
  • Anything that isn't a well-formed tag is left visible exactly as written, never silently dropped.
  • Because YAML reads a leading ! as a tag indicator, wrap the value in quotes ('…') whenever it starts with !tts.
  • Speech uses the Web Speech API and your OS's built-in voices: it works offline and nothing is sent anywhere.
  • Browsers refuse to speak until you've interacted with the page. Normally opening the view is interaction enough, but if the view is already open when Obsidian starts, the first card shows a Tap to enable sound button instead of playing. Tapping it plays that phrase and lifts the restriction for the rest of the session.

Development

  • bun install — install dependencies
  • bun run dev — watch build (writes to dist/)
  • bun run dev:web — browser-only dev environment (LocalRepository/ LocalUI, no real Obsidian needed) at http://localhost:3000
  • bun run build — one-off build (TS bundle + Tailwind CSS)
  • bun test — run the test suite (bun test <file> for a single file)

Release

Bump version in manifest.json, then run ./release.bash: it tags the commit with that version and pushes the tag, which triggers the Release GitHub Actions workflow. The workflow builds with bun run build:release and creates a draft GitHub Release with manifest.json, dist/main.js and dist/styles.css attached as loose files.

Roadmap / known limitations

  • Review history isn't persistedReviewLog (an ease/interval/due diff per review, src/core/log.ts) exists but nothing writes it anywhere yet.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.