commit af76e7e64ef14d33b661e1a2e38ea42a156eee90 parent b59f07a73741089c9608aca89ea5e51c59135f96 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Mon, 8 Jan 2024 23:36:02 +0100 wiki Diffstat:
wikimissing | | | 8 | ++++++++ |
wikistats | | | 14 | ++++++++++++++ |
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/wikimissing b/wikimissing @@ -0,0 +1,8 @@ +#!/bin/bash + +# in wiki folder collection FOLDER, find missing links + +FOLDER="$1" + +cat $1*/* | sed 's/\[/\n\[/g;s/\]/\]\n/g' | grep -F '[' | cut -d'[' -f2 | cut -d']' -f1 | sort | grep -vxf <(ls $1*/* | rev | cut -d '/' -f1 | rev | sed 's/^/\^/g') - | uniq -c | sort -n + diff --git a/wikistats b/wikistats @@ -0,0 +1,14 @@ +#!/bin/bash + +# in wiki folder collection FOLDER, find missing links + +FOLDER="$1" + +for a in $FOLDER* +do + B=$(echo $a | rev | cut -d '/' -f1 | rev) + ls "$a" | wc -l | sed "s/\$/ pages in $B/" +done +ls $FOLDER*/* | wc -l | sed 's/$/ pages total/' | sed 's/^/>> /' +wikimissing $FOLDER | wc -l | sed 's/$/ missing pages/' | sed 's/^/>> /' +