Page MenuHomePhabricator

DBQ-139 Create interlanguage links for entire Wikipedia
Closed, ResolvedPublic

Description

This issue was converted from https://jira.toolserver.org/browse/DBQ-139.
Summary: Create interlanguage links for entire Wikipedia
Issue type: Task - A task that needs to be done.
Priority: Major
Status: Done
Assignee: Hoo man <hoo@online.de>


From: Thomasmp <tm.petzold@gmail.com>

Date: Tue, 03 May 2011 13:34:24

Please repeat query #DBQ122 (Create interlanguage links for entire Wikipedia) with the latest available data. Many thanks! Thomas

Code used in #DBQ122 for running at SGE

#! /bin/bash
#$ -N DBQ-122
#$ -hard
#$ -l sqlprocs-s1=1
#$ -l sqlprocs-s2=1
#$ -l sqlprocs-s3=1
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-122.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-122.txt
done

Version: unspecified
Severity: major

Details

Reference
bz59396

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:28 AM
bzimport set Reference to bz59396.

From: Hoo man <hoo@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

This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: hoo@online.de
CC list: hoo@online.de