`makedown` allows you to organise your shell scripts in one or several markdown
files, by mix and matching different scripting languages for various commands
and needs.<p>zsh/bash/sh, python, javascript or anything else available on your system.<p>Handy for replacing one-line-based package.json scripts or shell-based
Makefiles.<p>One can also write documentation and explanations to various commands in the same
`.md` file.<p>Most editors highlight correctly most languages in the markdown code blocks,
even when you use several scripting languages.<p>Here is a demo .md file <a href="https://github.com/tzador/makedown/blob/main/DEMO.md">https://github.com/tzador/makedown/blob/main/DEMO.md</a><p>More information available in the
<a href="https://github.com/tzador/makedown/blob/main/README.md">https://github.com/tzador/makedown/blob/main/README.md</a><p>Provided the following `example.md` in the root of your project,
the defined commands are available to run from any of the projects subfolders:<p><pre><code> --- Start of example.md ---
# hello
Prints "Hello" to `stdout` using Zsh.
```zsh
echo "Hello"
```
# world
Just prints "World" to `stdout` using JavaScript.
```js
console.log("World");
```
# weather-tomorrow
Prints the weather for tomorrow to `stdout` using Zsh.
```zsh
curl wttr.in/tomorrow
```
# generate-password
Prints a random password to `stdout` using Python.
```python
import random
import string
length = 16
characters = string.ascii_letters + string.digits + string.punctuation
password = ''.join(random.choice(characters) for _ in range(length))
print(password)
```
--- End of example.md ---
</code></pre>
You can run any of the commands from anywhere in the project,
just by typing `makedown a-command-name` or a shorter `m a-command-name`.<p><pre><code> $ makedown --help
hello - Prints "Hello" to `stdout` using Zsh.
world - Just prints "World" to `stdout` using JavaScript.
weather-tomorrow - Prints the weather for tomorrow to `stdout` using Zsh.
generate-password - Prints a random password to `stdout` using Python.
$ makedown hello
Hello
$ makedown world
World
$ m weather-tomorrow
Sunshine # prints more details actually
$ m generate-password
4444444444444444
$ m generate-password --help
Prints a random password to `stdout` using Python.
</code></pre>
The commands have simple syntax, they start with a header with a link and stop
when the next header starts.<p>Like so:<p><pre><code> # [a-command-name]() A short description.
Some documentation.
```bash
some command
```
</code></pre>
You can use other interpreters, like `python`, `node`, `ruby`, etc.<p>You can also use a custom interpreter specified using hashbang, like:<p><pre><code> # [run-deno-script]() Runs a script using the Deno interpreter.
Deno has to be installed on your system.
```typescript
#!/usr/bin/env deno run
const message: string = "hello, world";
console.log(message);
```
</code></pre>
All the .md files in the current directory and all the parents are examined
when looking for commands.<p>Would be very grateful for any suggestions or other feedback.<p>Thank you.