在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ashlinchak/mdanki开源软件地址(OpenSource Url):https://github.com/ashlinchak/mdanki开源编程语言(OpenSource Language):JavaScript 90.0%开源软件介绍(OpenSource Introduction):MDAnkiConverts Markdown file(s) to the Anki cards. RequirementsNode.js v10.0+ Installnpm install -g mdanki UsageConvert a single markdown file: mdanki library.md anki.apkg Convert files from directory recursively: mdanki ./documents/library ./documents/anki.apkg Using all available options: mdanki library.md anki.apkg --deck Library --config config.json Import just generated Overriding default settingsTo override default settings use mdanki library.md anki.apkg --config faworite-settings.json The JSON file, for example, would look like the following if you were to change the mdanki card template to the default that Anki has: {
"template": {
"formats": {
"question": "{{Front}}",
"answer" : "{{FrontSide}}\n\n<hr id=\"answer\">\n\n{{Back}}",
"css" : ".card {\n font-family: arial;\n font-size: 20px;\n text-align: center;\n color: black;\n background-color: white;\n}"
}
}
} Supported filesMDAnki supports CardsBy default, MDAnki splits cards by
If you want to have multiple lines on the card's front side - use
When parsing only one markdown file, the title of the deck could be generated based on the top-level headline ( TagsCards can have tags in their markdown sources. For adding tags to cart it should follow some rules:
MDAnki uses The below example will generate a card with 3 tags: algorithms, OOP, and binary_tree.
Code and syntax highlightingCode blocks can be written with and without specifying a language name: ```java public static void main(String[] args) { System.out.println("Hello, World!"); } ``` ``` echo "Hello, World!" ``` The last code block will be treated by MDAnki as Bash code. The default language can be configured by specifying Note! Creating a block without language name is not fully supported and should be eliminated in usage. Take a look at this: echo "Code block with language name"
Supported languagesMDAnki supports code highlighting for these languages:
ImagesYou can use links to image files inside markdown, MDAnki will parse them and add those images to the import collection. It's allowed to use two styles for writing images: LaTeXMDAnki and Anki can support LaTeX. Install LaTeX for your OS and use the
Memory limitConverting a big Markdown file you can get a memory limit error like this:
For overcoming this error, replace cp node_modules/sql.js/js/sql-memory-growth.js node_modules/sql.js/js/sql.js More info here. LicenseMIT License, Copyright (c) 2020, Oleksandr Shlinchak. Changelog |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论