Update
This commit is contained in:
parent
ef91bbba67
commit
f850c6c59b
7 changed files with 104 additions and 3 deletions
26
make_stats.sh
Executable file
26
make_stats.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
# Auto generates stats article.
|
||||
|
||||
echo "making stats"
|
||||
|
||||
FILE_NAME="wiki_stats.md"
|
||||
|
||||
printf "# LRS Wiki Stats\n\nThis is an auto-generated article holding stats about this wiki.\n\n" > $FILE_NAME
|
||||
|
||||
printf -- "- number of articles: " >> $FILE_NAME
|
||||
ls *.md | wc -l >> $FILE_NAME
|
||||
|
||||
printf -- "- total size of all texts in bytes: " >> $FILE_NAME
|
||||
cat *.md | wc -c >> $FILE_NAME
|
||||
|
||||
printf "\nlongest articles:\n\n\`\`\`\n" >> $FILE_NAME
|
||||
ls -1hSs *.md | head -n 10 >> $FILE_NAME
|
||||
printf "\`\`\`\n" >> $FILE_NAME
|
||||
|
||||
printf "\nlatest changes:\n\n\`\`\`\n" >> $FILE_NAME
|
||||
git log --name-only | head -n 50 | grep "Date:\|.*\.md" >> $FILE_NAME
|
||||
printf "\`\`\`\n" >> $FILE_NAME
|
||||
|
||||
printf "\n" >> $FILE_NAME
|
||||
|
||||
# TODO: most wanted links? i.e. most frequent links without article
|
Loading…
Add table
Add a link
Reference in a new issue