Compare commits
3 Commits
b64d9de0c4
...
7e75763cee
Author | SHA1 | Date | |
---|---|---|---|
7e75763cee | |||
2d3961e0f5 | |||
72ad0786c8 |
2
Makefile
2
Makefile
@ -40,6 +40,8 @@ $(databases): .dbs/%.rec: %/ | .dbs/
|
||||
db.rec: $(databases)
|
||||
printf '%s\n' '%rec: guide' > $@
|
||||
printf '%s\n' '%key: title' >> $@
|
||||
printf '%s\n' '%type: requires rec guide' >> $@
|
||||
printf '%s\n' '%type: provides rec guide' >> $@
|
||||
printf '%s\n' '%type: wordcount int' >> $@
|
||||
printf '%s\n\n' '%sort: wordcount' >> $@
|
||||
cat $^ >> $@
|
||||
|
23
README.md
23
README.md
@ -4,23 +4,29 @@ title: "Linux Knowledge Base"
|
||||
|
||||
The Linux Knowledge-Base provides quick-start guides for working with terminal programs.
|
||||
|
||||
If you like this style of short articles with a miniature database, then join me in my quest to remove the nausea of poorly-written documentation.
|
||||
|
||||
# Setup
|
||||
|
||||
Install `make`, `recutils`, and any fuzzy-finder (i.e. `sk`, `fzy`, or `fzf`).
|
||||
|
||||
## Usage
|
||||
|
||||
Set up the database and try a few queries:
|
||||
|
||||
```sh
|
||||
make
|
||||
make database
|
||||
|
||||
recsel db.rec -m 3
|
||||
recsel db.rec -q database
|
||||
recsel db.rec -q gpg
|
||||
recsel db.rec -e "title = 'ssh'"
|
||||
recsel db.rec -e "title ~ 'ssh'"
|
||||
recsel db.rec -e "title ~ 'bash'" -R title,wordcount
|
||||
recsel db.rec -m 1 -P content | less -R
|
||||
|
||||
recsel db.rec -t guide -j provides -G title \
|
||||
-e "title = 'ssh'" \
|
||||
-p 'sum(provides_wordcount)'
|
||||
```
|
||||
|
||||
# Style
|
||||
@ -30,6 +36,14 @@ recsel db.rec -m 1 -P content | less -R
|
||||
- Nobody cares about how the project started.
|
||||
- Nobody wants to read what `ffmpeg` is, because anyone who wants to use it already knows what it is.
|
||||
|
||||
## State Knowledge Dependencies
|
||||
|
||||
Articles should state what you need to understand in order to read them *at the start*.
|
||||
They should not assume the reader knows much beyond common terminal commands, and should not provide a link to some other resource half-way through an article.
|
||||
|
||||
People should be able to read an article from the beginning, then keep going until the end, and then stop.
|
||||
Articles should not take a detour through a chain of other articles of unknown size.
|
||||
|
||||
## Be Opinionated
|
||||
|
||||
- Guides should not ask the reader to select options half-way through.
|
||||
@ -74,6 +88,11 @@ grep ls --color=always $HISTFILE | $PAGER
|
||||
|
||||
Now we can see what can be changed.
|
||||
|
||||
## Assume People Follow the Instructions
|
||||
|
||||
Articles should say what to type, not the output.
|
||||
If the command is `ls`, users will see files once they try the command, but the article does not need to provide an example list of files unless an important point has to be made about output.
|
||||
|
||||
# What's Wrong with Everything Else?
|
||||
|
||||
## Man pages
|
||||
|
Loading…
x
Reference in New Issue
Block a user