ebullient34 downloadsDefine card decks for activities, strategies, or any content you want to rotate through. Embed cards in your notes or browse them in a modal. Filter by tag hierarchies to narrow your selection.
Define card decks for activities, strategies, or any content you want to rotate through. Embed cards in your notes or browse them in a modal. Filter by tag hierarchies to narrow your selection.
#flashcards/* tags<vault>/.obsidian/plugins/deck-notes/Clone this repository into your vault's plugins folder:
cd <vault>/.obsidian/plugins
git clone https://github.com/ebullient/obsidian-flashcards.git deck-notes
cd deck-notes
Install dependencies and build:
npm install
npm run build
Reload Obsidian and enable the plugin
Cards are created from markdown files using H2 headings (##). Each heading becomes one card.
---
tags:
- flashcards/activities
---
#flashcards/activities/morning
## CARD 1: Morning Stretching Routine
Start your day with gentle movement:
1. Neck rolls - 5 each direction
2. Shoulder shrugs - 10 reps
3. Side stretches - hold 15 seconds each side
4. Forward fold - hold 30 seconds
Take your time and breathe deeply.
---
#flashcards/activities/creative
## CARD 2: Creative Writing Prompt
**Setting:** A library that only opens at midnight
**Challenge:** Write for 10 minutes about what books are found there and who visits.
---
#flashcards/activities/mindfulness
## CARD 3: Breathing Exercise
**Box Breathing:**
- Inhale for 4 counts
- Hold for 4 counts
- Exhale for 4 counts
- Hold for 4 counts
Repeat 4 times.
---
##) mark the start of each card---) mark the end of card content (optional)#flashcards are automatically stripped from display--- is ignored (use for notes, metadata, etc.)Open Settings → Deck Notes to configure:
List of folders or files to scan for cards (one per line, relative to vault root). This defines which files are scanned, not which cards are displayed.
Example:
Activities/Exercises
Daily/Prompts
Resources/Meditations.md
The default tag used by "Show Random Activity Card" command (e.g., activities or activities/morning). Leave empty to select from all cards with any #flashcards/* tag.
Enable tracking of when cards were last viewed. Required for "Least Recently Viewed" selection mode.
Opens a modal displaying a card from your default deck (or all cards if no default is set).
Modal Controls:
activities, activities/morning)Inserts a card as a collapsible callout at the cursor position.
Rescans all configured paths to pick up new or modified cards.
Cards are organized into decks using hierarchical #flashcards/* tags. Tags support hierarchy, so selecting activities will show cards tagged with activities, activities/morning, activities/creative, etc.
Tag inheritance:
Example structure:
Activities/stretches.md → All cards get #flashcards/activities from frontmatter
Card 1: Also tagged #flashcards/activities/morning
Card 2: Also tagged #flashcards/activities/evening
Journal/prompts.md → All cards get #flashcards/creative from frontmatter
Card 1: Also tagged #flashcards/creative/writing
Card 2: Also tagged #flashcards/creative/art
With "Track Views" enabled and "Least Recently Viewed" selection mode, the plugin ensures you see all cards before repeating. Perfect for:
Use hierarchical #flashcards/* tags to organize cards:
tags: [flashcards/activities] (applies to all cards in file)#flashcards/activities/morning (applies to single card)#flashcards are automatically stripped from card displayThe plugin exposes a JavaScript API at window.deckNotes.api:
// Get a random card embed
window.deckNotes.api.embedCard('activities')
// Get all discovered deck tags
window.deckNotes.api.getTags()
// Select cards by hash
window.deckNotes.api.selectCardsByHash(['card-hash-1', 'card-hash-2'])
// Get random card from hash list
window.deckNotes.api.selectCardByHash(['card-hash-1', 'card-hash-2'])
npm run build # Production build
npm run dev # Watch mode
npm run lint # Check for issues
npm run fix # Auto-fix linting issues
npm run format # Format code
src/
├── @types/
│ └── settings.d.ts # TypeScript interfaces
├── dn-Plugin.ts # Main plugin class
├── dn-CardParser.ts # Parse files into cards
├── dn-Modal.ts # Card display modal
├── dn-SettingsTab.ts # Settings UI
├── dn-Constants.ts # Default settings
└── main.ts # Entry point
MIT