Update
This commit is contained in:
parent
4533fde60c
commit
8fbedc9460
39 changed files with 1945 additions and 1823 deletions
|
|
@ -1,14 +1,20 @@
|
|||
#!/bin/sh
|
||||
# Outputs a list of most wanted pages. Takes a while to finish.
|
||||
|
||||
cat ./*.md | sed -n 's/.*\[.*\](\([^\)\(]*\)).*/\1/p' | sort | uniq -c | sort -nr | sed -n "s/.* \([^ ]\)/\1/p" > tmp.txt
|
||||
cat ./*.md | sed -n 's/.*\[.*\](\([^\)\(]*\)).*/\1/p' | sort | uniq -c | sort -nr > tmp.txt
|
||||
|
||||
rm tmp2.txt
|
||||
touch tmp2.txt
|
||||
|
||||
while read -r line; do
|
||||
if ! [ -f $line ]; then
|
||||
echo "$line" >> tmp2.txt
|
||||
fname=`echo "$line" | grep -o "[^ ]*\.md" -`
|
||||
|
||||
if ! [ -f $fname ]; then
|
||||
printf -- "- [" >> tmp2.txt
|
||||
printf $fname | sed "s/^\([^ ]*\)\.md/\1](${fname}) (/g" >> tmp2.txt
|
||||
echo $line | sed "s/^ *\([0-9]*\).*$/\1)/g" >> tmp2.txt
|
||||
fi
|
||||
done < tmp.txt
|
||||
|
||||
cat tmp2.txt | head -n 20
|
||||
rm tmp.txt tmp2.txt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue