User:GreenC/data/interwikicounts

=Count of Interwiki links on Enwiki= Source: https://meta.wikimedia.org/wiki/Interwiki_map

Date updated: 10 November 2018

Script
Instruction for creating table 

Given this table:

https://meta.wikimedia.org/wiki/Interwiki_map

Copy-paste it into a textfile named 'iw.txt'

So it looks like this:

acronym 	https://www.acronymfinder.com/$1.html Advisory 	https://advisory.wikimedia.org/wiki/$1 Advogato 	http://www.advogato.org/$1 etc..

Run these commands to regex search and print output (takes a while):

awk -ilibrary '{print strip($1) " = " sys2var("wikiget -a \"insource:/" strip(tolower($1)) "[:]/i\" | wc -l ") }' iw.txt > table.txt awk -ilibrary 'BEGIN{c=splitn("table.txt",a);splitn("iw.txt",b);for(i=1;i<=c;i++){split(a[i],a1," ");split(b[i],b1," ");print "|-\n| " b1[1] "\n| " a1[3] "\n| " b1[2] }}' > out.txt

Copy-paste out.txt into this page.

To count instances on a different language wiki (for example Norway), change "wikiget -a" --> "wikiget -l no -a"