Learn R Programming

ankiR (version 0.6.0)

anki_search_enhanced: Enhanced Search for Anki Cards

Description

Advanced search functionality supporting additional search operators beyond the basic anki_search().

Usage

anki_search_enhanced(
  pattern,
  path = NULL,
  profile = NULL,
  case_sensitive = FALSE
)

Value

A tibble with matching cards

Arguments

pattern

Search pattern with support for advanced operators

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

case_sensitive

Whether search is case-sensitive (default FALSE)

Details

Supported search operators:

  • added:N - Cards added in last N days

  • rated:N - Cards rated in last N days

  • rated:N:ease - Cards rated with specific ease (1-4) in last N days

  • note:type - Cards with specific note type name

  • card:N - Card template number (0-indexed)

  • ivl:N - Cards with interval >= N days

  • ivl:<N - Cards with interval < N days

  • prop:ease>N - Cards with ease factor > N (e.g., prop:ease>2.5)

  • prop:lapses>N - Cards with lapses > N

  • prop:reps>N - Cards with reps > N

  • re:pattern - Regex search in card content

  • OR - OR operator between terms

  • Standard operators: deck:, tag:, is:, flag:

Examples

Run this code
if (FALSE) {
# Cards added in last 7 days
anki_search_enhanced("added:7")

# Cards rated "Again" in last 3 days
anki_search_enhanced("rated:3:1")

# Leeches with high lapses
anki_search_enhanced("is:leech prop:lapses>5")

# Regex search
anki_search_enhanced("re:^The\\s+")

# OR search
anki_search_enhanced("deck:German OR deck:Spanish")
}

Run the code above in your browser using DataLab