Created
November 21, 2014 11:21
-
-
Save magnusmanske/b5206189753ce2fb66ee to your computer and use it in GitHub Desktop.
MrMetadata: Get top 50 templates in failing files (example run in wikipedia/de; change path and replace "Datei" and "dewiki" for other languages)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( echo -n 'SELECT tl_title,count(*) AS cnt FROM page,templatelinks WHERE tl_from=page_id AND page_namespace=6 and page_title IN ("' ; cat *.html | grep 'Datei:' | sed -r 's|</a>.*||' | sed -r 's|^.+>Datei:||' | grep -v '"' | sed 's| |_|g' | sed ':a;N;$!ba;s/\n/","/g' ; echo -n '") GROUP BY tl_title ORDER BY cnt DESC' ) | sql dewiki_p | head -50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment