add wordcount to database

This commit is contained in:
Malin Freeborn 2025-02-11 20:38:45 +01:00
parent b81fd55a87
commit d92631c795
Signed by: andonome
GPG Key ID: 52295D2377F4D70F
2 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,7 @@ articles != find * -type f -name "*.md"
db.rec: $(articles)
printf '%s\n' '%rec: guide' > $@
printf '%s\n' '%type: wordcount int' >> $@
printf '%s\n\n' '%sort: title' >> $@
for x in $^ ; do \
sed -n '2,/^---$$/ {/^---$$/d; p}' "$$x" |\
@ -17,6 +18,9 @@ db.rec: $(articles)
tr -d '"' ;\
printf "file: %s\n\n" "$$x" ;\
done >> $@
for entry in $^; do \
recset $@ -e "file = '$${entry}'" -f wordcount --set-add="$$(wc -w < $${entry})" ;\
done
recsel $@ -e "requires != ''" -CR title,requires |\
while read title requires; do \
IFS=', ' && for provider in $$requires; do \

View File

@ -1,10 +1,8 @@
---
title: "Knowledge Base"
title: "Linux Knowledge Base"
---
# Linux Knowledgebase
This is a list of quickstart guides for Linux programs, designed to get the user up and running as fast as possible.
The Linux Knowledge-Base provides quick-start guides for working with terminal programs.
# Style
@ -79,12 +77,14 @@ ss -tr dst :$PORT
- Often presumes you know everything except that one program.
- Often written in the 80's, and it shows.
- Zero respect for your time.
- Often references `info` pages (yuck).
## curl cheat.sh/
- Doesn't have the programs I like.
- Too short to get you started on many programs.
- Poor understanding of priority (`git stash` is covered before `git commit`).
- Repetitive
# Current State