
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Interactively select and execute fenced code blocks in markdown files. Build complex scripts by naming and requiring blocks. Log resulting scripts and output. Re-run scripts.
Code blocks may be named. Named blocks can be required by other blocks.
The user-selected code block, and all required blocks, are arranged into a script in the order they appear in the markdown file. The script can be presented for approval prior to execution.
Executed scripts can be saved. Saved scripts can be listed, selected, and executed.
Output from executed scripts can be saved.
Install: $ gem install markdown_exec
::: mde --help
Displays help information.
::: mde
Process README.md
file in the current folder. Displays all the blocks in the file and allows you to select using [up], [down], and [return].
::: mde my.md
or mde -f my.md
Select a block to execute from my.md
.
::: mde my.md myblock
Execute the block named myblock
from my.md
.
::: mde .
or mde -p .
Select a markdown file in the current folder. Select a block to execute from that file.
::: mde --list-blocks
List all blocks in the all the markdown documents in the current folder.
::: mde --list-docs
List all markdown documents in the current folder.
::: mde --list-default-env
or mde --list-default-yaml
List default values that can be set in configuration file, environment, and command line.
::: mde -0
Show current configuation values that will be applied to the current run. Does not interrupt processing.
::: mde --save-executed-script 1
Save executed script in saved script folder.
::: mde --list-recent-scripts
List recent saved scripts in saved script folder.
::: mde --select-recent-script
Select and execute a recently saved script in saved script folder.
::: mde --save-execution-output 1
Save execution output in saved output folder.
./README.md
are presented.When executed, mde
reads the current environment.
export MDE_SAVE_EXECUTED_SCRIPT=1
.MDE_SAVE_EXECUTED_SCRIPT=1 mde
.~/.bashrc
or ~/.bash_profile
files..mde.yml
in the current folder. .e.g. save_executed_script: true
--config my_path/my_file.yml
mde --save-executed-script 1
Boolean values expressed as strings are interpreted as:
String | Boolean |
---|---|
empty string | False |
0 | False |
1 | True |
anything else | True |
E.g. opt1=1
will set option opt1
to True.
Boolean options configured with environment variables:
1
or non-empty value to save executed scripts; empty or 0
to disable saving.
e.g. export MDE_SAVE_EXECUTED_SCRIPT=1
e.g. export MDE_SAVE_EXECUTED_SCRIPT=
MDE_SAVE_EXECUTED_SCRIPT=1 mde
Append a command to load the completion script to your shell configuration file. mde
must be executable for the command to be composed correctly.
echo "source $(mde --pwd)/bin/tab_completion.sh" >> ~/.bash_profile
Press tab for completions appropriate to the current input.
mde <...> <prior word> <current word><TAB>
Completions are calculated based on the current word and the prior word.
-
, present matching options, eg --version
for the current word --v
..BOOL.
for the option --user-must-approve
.1
for the type .BOOL.
for the option --user-must-approve
.In the table below, tab is indicated by !
Input | Completions |
---|---|
mde ! | local files and folders |
mde -! | all options |
mde --! | all options |
mde --v! | mde --version |
mde --user-must-approve ! | mde --user-must-approve .BOOL. |
mde --user-must-approve .BOOL.! | mde --user-must-approve 1 |
When prompted, select either the awake
or asleep
block.
export TIME=early
export TIME=late
export ACTIVITY=awake
export ACTIVITY=asleep
echo "$TIME -> $ACTIVITY"
Execute tests for individual libraries.
bundle exec rake minitest
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the MarkdownExec project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that markdown_exec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.