Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: szkiba/mdcode

v0.2.0

11 Jan 19:36
@szkiba szkiba
1426bec
This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
GPG key ID: 4AEE18F83AFDEB23
Expired
Verified
Learn about vigilant mode.

Choose a tag to compare

mdcode v0.2.0 is here 🎉!

The main feature of this release is the run subcommand.

mdcode run

Run shell commands on markdown code blocks

Synopsis

Extract code blocks to the file system and run shell commands on them

The code blocks are written to the file named in the file metadata.

The code block may include region metadata, which contains the name of the region. In this case, the code block is written to the appropriate part of the file marked with the #region comment.

The optional argument of the mdcode run command is the name of the markdown file. If it is missing, the README.md file in the current directory (if it exists) is processed.

This can be followed by a double dash (--) and then the shell command line to be executed (even a complex command, such as for).

Alternatively, the commands to be executed can be embedded in a code block in the document. In this case, the language must be sh and it is necessary to name the code block with the metadata name. The name of the code block containing the commands can be specified with the --name flag (if not, the first code block containing the sh language and name metadata will be executed).

Code blocks are extracted to a temporary directory. This directory will be the current directory when running the commands. The temporary directory is deleted after executing the commands (deletion can be prevented by using the --keep flag). Instead of a temporary directory, the name of the directory to be used can be specified with the --dir flag. In this case, of course, the directory is not deleted after executing the commands.

Assets 10
Loading

v0.1.0

08 Jan 20:50
@szkiba szkiba

Choose a tag to compare

mdcode v0.1.0 is here 🎉!

This is the first public release. Currently, mdcode is still in a relatively early stage of development, but it is already usable.

Loading

AltStyle によって変換されたページ (->オリジナル) /