Comments (6)
Glad you like it.
Can you give me an example of an expected markdown output?
from bashly.
Given that bashly
supports nesting commands, the most convenient format for fully displaying documentation is to display it in a similar way as homebrew
does in man
(man brew
). Example in the attachment. Markdown here will help with lists, titles, and highlighting options/flags/environment variables.
Without strictly following the man
rules, can just make it a similar format.
from bashly.
It shouldn't be too difficult to implement, the question is - should it be a part of bashly or not.
For the most part, the --help
flag provides all the documentation you need. In the real world, you only need man pages or READMEs in case there is more information to share that is not available in the --help
usage text.
If we implement this in bashly, the information will be identical, only formatted differently.
In addition, if we already generate a markdown documentation, someone else might want to generate man pages, or HTML documentation. So I am a little hesitant to create a "feature creep".
Let me think about it some more, and if you have thoughts on the above, feel free to share.
from bashly.
I see two ways.
First: implement this in bashly, because bashly.yaml
an inseparable part of bashly and doc depends on it.
Second: make a plugin system for bashly, but I think for it is a large overhead. May be used a mixed solution: create an documentation
abstraction in bashly for generate different formats. Anyone can add a HTML/PDF doc format.
from bashly.
I have already tried several approaches, but ultimately, ended up with a complex structure that is essentially generating the same thing as the usage text (--help
) using different views.
Generating the script from the YAML today is a process that is done by using many small code snippets (see the views folder). This process needs to take into account many nuances, such as: Do we have subcommands or not? For each command, does it have flags? Default values? Required values? and many more.
from bashly.
I am closing this for now, the complexity of implementing it does not justify the benefits.
I am still open to be convinced otherwise.
from bashly.
Related Issues (20)
- Is there any security consideration for the "bash name"? HOT 4
- Provide a third state to `strict` which omits `set -e` HOT 10
- Support for Alternate Dependencies HOT 12
- bashly about “The goal is to generate a new file and fill it with many variables” HOT 2
- Do something when a root command's flag is set HOT 8
- The `initialize` file is not loaded when using `.bash` extension
- Treat `initialize.sh` like the `before` and `after` hooks
- Automatically execute bashly generate when file change HOT 3
- Support storing variable via yaml file HOT 4
- `allowed` incompatible with `required: false` HOT 6
- Flags should not be set to their default value if not explicitly used HOT 3
- Flags must have a long form if you specify a default value HOT 3
- Whitespace not respected in here documents HOT 1
- Decide whether to use `bashly-` prefix for YAML configs HOT 6
- `bashly` completions for Bash, Fish, Zsh HOT 17
- Private commands appear in completion suggestion
- Questions about generated scripts (set -e) HOT 2
- Color escape sequences are not correctly shown in terminal HOT 8
- Organize scripts in src dir in subdirectories HOT 8
- Pass bashly.yml through ERB HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bashly.