4 ms·
This is great. Now, there's quite a bit new to learn here. I use Markdown notes files with quoted commands and outputs as first exploratory documentation and b
by lazyant 6y ago
This is great. Now, there's quite a bit new to learn here.
I use Markdown notes files with quoted commands and outputs as first exploratory documentation and before it goes into Ansible/Dockerfile/Packer/Whatever. I can add links, images etc and anybody can easily follow and edit/PR since well, it's Markdown.
Seems to me what I'm doing is basically the same idea as this, with total flexibility (no schema), nothing new to learn only I can't run the .md file (how hard would it be to parse a md file and ignore everything except the triple ticks and execute that, in say Bash?).
- IggleSniggle 6y agoMaybe even make your code blocks language aware to pick the execution context, provide a language tidbit or even shebang, ie ```js console.log('yo, sup') ``` or ```#!/usr/bin/env node console.log('yo, sup') ``` That way, your md files could be both executable/interactive and be flexible in regards to their execution environment (as long as you are on a unix-like). Trying to resist the urge to go make a VSCode extension to do this right now.
- c6401 6y agoatom with hydrogen plugin can run these
- IggleSniggle 6y agothanks for this
- licebmi__at__ 6y agoWell, I consider org-mode friendlier than markdown, but besides the language differences you are mostly missing the Emacs goodies. - you can weave this file to one or several code files, even export the plain text parts as comment on the language if you decide so. - you can execute the code directly from your local machine into one, or different remote machines. - you can use the output from a previous block inside another block, even preprocess it on another language before executing in another block. - you can get the results recorded on the same file you're executing so you can also document what would the results be for executing x command. - if you use Emacs as another tool, you can easily send the results for example on email, slack, irc or whatever system you can interact with on Emacs. I think confluence made it harder on recent versions, but previously I was able to generate documentation pages and easily upload them to confluence without worrying about format or even upload.