I'm creating a simple bash tool that uses various flags/arguments from the user, and I'm using an
org file for the documentation. I have several examples and I'd like to include some explanation of each. Instead of copying the code from each example into the file, I'd like to create a link to the file and display the contents in the org file. Something like
This example does such and such... [[/path/to/ex-file-1.sh]] my-tool -f "user-input" # these are the contents of ex-file-1.sh While this example does this and that... [[/path/to/ex-file-2/sh]] my-tool -r "user-input # these are the contents of ex-file-2.sh
This way, I don't have to modify the
README.org if I modify the individual example files. I'd also like to do the same thing with the contents of the tool's help (which is activated with the
-h flag). Basically I want modifying the documentation to be less tedious.
I know that images can be embedded into
org files (and are even visible within the file before exporting), so I would assume the same is possible with text? What do I need to use for this? Or I am I just being too lazy with my documentation?