https://bugzilla.wikimedia.org/show_bug.cgi?id=59396

--- Comment #1 from Bugzilla Bug Importer (valhallasw) 
<wmf.bugconver...@gmail.com> ---
-------------------------------------------------------------------------------
From: Hoo man <h...@online.de>
Date: Tue, 03 May 2011 17:28:59
-------------------------------------------------------------------------------

Code:

    #! /bin/bash
    wikilist=`mysql -wBN -hsql-toolserver toolserver -e "SELECT
GROUP_CONCAT(REPLACE(dbname,'wiki_p','') SEPARATOR ' ') FROM wiki WHERE
family='wikipedia' AND is_closed=0 AND is_meta=0 ORDER BY dbname"`
    SQL="SELECT ss_good_articles FROM site_stats INTO @articles;
         SELECT CONCAT('%WIKI%,', ll_lang, ',', count(*),',',@articles) AS csv
FROM langlinks GROUP BY ll_lang ORDER BY ll_lang";
                 echo "wiki,interwiki,interwiki_count,article_count" >
dbq-139.txt
                 for runwiki in $wikilist
                 do
                            echo "querying $runwiki"
                            runwiki2=`echo "$runwiki" | sed "s/_/-/g"`
                            SQL2=`echo "$SQL" | sed "s/%WIKI%/$runwiki2/g"`
                            mysql -wBN -h${runwiki2}wiki-p.rrdb
${runwiki}wiki_p -e "$SQL2" >> dbq-139.txt
                    done


Result:  
http://toolserver.org/~hoo/dbq/dbq-139.txt

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to