linanwx / aosr

Aosr is Another Obsidian plugin for Spaced Repetition.
Other
67 stars 6 forks source link

[FEAT] Multiline flashcard with empty lines #33

Open ZhymabekRoman opened 7 months ago

ZhymabekRoman commented 7 months ago

Concept syntax:

#Qstart
...
#Qend
#Qstart
AOSR for Obsidian
?
The Aosr plugin is a Spaced Repetition tool for Obsidian, allowing users to create flashcards for review within their notes. It supports various types of learning, including single line, multi-line, and cloze deletion. The plugin also includes a Deck feature, which allows users to manage their flashcards based on custom rules. The Deck feature can be used to include or exclude cards from a specific path or filter cards with specific tags. Decks can be created by defining rules within the Obsidian notes.

Aosr supports rich text formats, including audio, and features a separate review window for reviewing cards while making changes in the editor. It also provides minute-level review intervals for precise scheduling.

Cards in Aosr begin with #Q and end with an empty line. They can contain multiple patterns, such as :: style patterns for vocabulary lists. Cards can also be split into sub-cards using ***. A unique feature of Aosr is the use of Range Cards or Scope Cards, which begin with #Q and end with #/Q. These cards support formats that include empty lines, offering flexibility for various content types.
#Qend
ZhymabekRoman commented 7 months ago

I Implemented some basic RegEx, but there is like one limitation: beetwen multiple cards should be two empty line

RegEx itself: /^((?:(?!\? ?).+\n)+)\?( #.+)?\n((?:.+\n?\s?(?:\s\?)?)+)?/gm To get work paste this into MultiLineParser class.

My fork with some minor code changes: https://github.com/ZhymabekRoman/aosr