codemd-0.2.1 is not a library.
codemd
Command line tool to extract code from markdown files.
Installation
# with npm
# with cargo
Check installation:
Usage
Options:
-l,--language <LANGUAGE>: Language tag to search for (e.g.pythonorpyfor Python,typescriptortsfor TypeScript..)-i,--input <INPUT>: Path to the input file (must be markdown)-o,--output <OUTPUT>: Path to the output file. If not provided, code will be printed to the console with syntax highlighting.-c,--command <COMMAND>: Command to execute in order to run the code. Can be used only when--outputis set.-h,--help: Print help information-V,--version: Print version information
[!NOTE]
When using the
--languageoption, be mindful of the fact that it means language tag:pythonandpyare two distinct tags, even if they refer to the same language.
Examples
Read code and rich-print it to stdout:
Read code and write the output to a file:
Read the code, write to a file and execute a command: