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

--- Comment #6 from Bugzilla Bug Importer (valhallasw) 
<wmf.bugconver...@gmail.com> ---
-------------------------------------------------------------------------------
From: Hoo man <h...@online.de>
Date: Tue, 02 Oct 2012 00:05:01
-------------------------------------------------------------------------------

I've did it as suggested now, so that only images that are linked less than 5
times are taken into account.  
Script:

    #!/bin/bash
    wikilist=$(mysql -wBN -h sql -e "SELECT dbname FROM toolserver.wiki WHERE
domain IS NOT NULL AND family = 'wikiquote';");
    SQL="SELECT DATABASE(), COUNT(DISTINCT page_id) FROM page JOIN (SELECT
il_from FROM imagelinks GROUP BY il_from HAVING COUNT(*) < 5) AS img_links ON
il_from = page_id WHERE page_namespace = 0";
    echo -e "wiki\tarticle_count" > dbq-191.txt;
    for runwiki in $wikilist
    do
        echo "querying $runwiki"
        sql -r $runwiki "$SQL" | tail -n +2 >> dbq-191.txt
    done

Result:  
http://toolserver.org/~hoo/dbq/dbq-191.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