IMPORTANT: For now it works on linux systems, this is due to regular expressions, in other operating systems it works differently, for example, In Windows, lines in text files are terminated with a carriage return (CR, \r
) followed by a line feed (LF, \n
) character ("\r\n"). In the near future I am planning an improved version that does not have these problems.
Warning: it's all broken, it barely works and when it works it breaks something else haha, it's a script I made in 10 minutes so I wouldn't have to pass all the cards by hand and avoid complications, worried about Big O? Pfff... keep your fingers crossed that your computer doesn't hang up.
It works in conjunction with Obsidian and the plugin to convert markdown files to flashcards, aka Pseudonium/Obsidian_to_Anki
You should have a file similar to mine, for example this one README.md
node ./script.js <file-name>.md
e.g.
node ./script.js Master-the-Coding-Interview-Data-Structures-Algorithms/anki/README.md
nodemon -x "clear;node --inspect" ./script.js Master-the-Coding-Interview-Data-Structures-Algorithms/anki/README.md