Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dim0x69/mdx
https://github.com/dim0x69/mdx
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dim0x69/mdx
- Owner: dim0x69
- License: gpl-3.0
- Created: 2024-10-16T05:58:56.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2024-10-24T04:48:58.000Z (21 days ago)
- Last Synced: 2024-10-24T21:50:26.066Z (20 days ago)
- Language: Go
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mdx - Execute your Markdown Code Blocks
Imagine you have the following Markdown file to document your commands:
# demo.md
## [simple_echo]() - Simple echo in shell```sh
echo "hello world"
```With `mdx` you execute the `sh` code block:
```
% mdx simple_echo
hello world
```🚀 In a nutshell:
* Pass arguments into your code block. âž” [Example](https://github.com/dim0x69/mdx/wiki/Examples#ldap-spn-find-account-by-spn)
* Define dependencies âž” [Example](https://github.com/dim0x69/mdx/wiki/Examples#docker)
* supports shebangs in code block âž” [Example](https://github.com/dim0x69/mdx/wiki/Examples#venv-shebang-shebang-support)* parses all .md files in the CWD for potential commands
* list all commands using `-list` or `-l`âž” [Usage](https://github.com/dim0x69/mdx/wiki/Usage)
## Getting started
### Installation
You can simply download a binary which fits your operating system and achitecture from the [releases page](https://github.com/dim0x69/mdx/releases).
Then just use the demo.md from above to execute `simple_echo`.
### Build
Go should be installed on your system: Follow [this guide](https://go.dev/doc/install) to install go in your PATH.
```sh
$ git clone https://github.com/dim0x69/mdx
$ go build
$ go install
```## Resources
The idea for this project came from [Makedown](https://github.com/tzador/makedown).