Page MenuHomePhabricator

DBQ-82 Special:WantedPages on ar.wikisource.org
Closed, ResolvedPublic

Description

This issue was converted from https://jira.toolserver.org/browse/DBQ-82.
Summary: Special:WantedPages on ar.wikisource.org
Issue type: Task - A task that needs to be done.
Priority: Major
Status: Done
Assignee: merl <mewikipedia@to.mabomuja.de>


From: Obayd <obayd3@gmail.com>

Date: Fri, 04 Dec 2009 19:12:39

I would appreciate either receiving or getting Special:WantedPages on ar.wikisource.org updated.
Thanks in advance.


Version: unspecified
Severity: major

Details

Reference
bz59336

Event Timeline

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

From: merl <mewikipedia@to.mabomuja.de>

Date: Fri, 18 Dec 2009 00:59:12

We cannot updated a special page (for that you have to ask the sys admins). We can create a list with the some content as the special page.

There is also a tool which maybe can help you: http://toolserver.org/~magnus/missingtopics.php?language=ar&project=wikisource&notemplatelinks=1&nosingles=1&limitnum=3&depth=15

If that is not enough we can execute the same query as used by the special page. This special page list the count of red links to a title from any namespace except Mediawiki. Only links to the user and user talk namespace are ignored.

Or do you want this original query modified? E.g. only links from and to article namespace.


From: Obayd <obayd3@gmail.com>

Date: Fri, 18 Dec 2009 07:25:53

If you can make a list with the same query as used by the special page (here or somewhere under my userpage on Arabic Wikisource http://ar.wikisource.org/wiki/user:Obayd/List) please without modification.


From: merl <mewikipedia@to.mabomuja.de>

Date: Sun, 20 Dec 2009 17:28:27

I extended the original query so that links to file namespace are filted out if there is an page on commons. (e.g. File:Sura1.pdf)

#! /bin/sh
#$ -N DBQ-82
#$ -m e
#$ -hard
#$ -l sqlprocs-s3=1
SQL="SELECT CONCAT('# [[:{{subst:ns:',pl_namespace,'}}',if(pl_namespace,':',''),REPLACE(pl_title,'_',' '),']] ',"
SQL="$SQL  '([[{{subst:#special:WhatLinksHere}}/',REPLACE(pl_title,'_',' '),'|',COUNT(*),' Links]])') AS value"
SQL="$SQL FROM pagelinks"
SQL="$SQL  LEFT JOIN page AS pg1 ON pl_namespace = pg1.page_namespace AND pl_title = pg1.page_title"
SQL="$SQL  LEFT JOIN commonswiki_p.page AS pgc ON pl_namespace = pgc.page_namespace AND pl_title = pgc.page_title AND pgc.page_namespace=6"
SQL="$SQL  LEFT JOIN page AS pg2 ON pl_from = pg2.page_id"
SQL="$SQL WHERE pg1.page_namespace IS NULL AND pgc.page_namespace IS NULL"
SQL="$SQL  AND pl_namespace NOT IN (2,3)"
SQL="$SQL  AND pg2.page_namespace != 8"
SQL="$SQL GROUP BY pl_namespace, pl_title"
SQL="$SQL HAVING COUNT(*) > 1"
SQL="$SQL ORDER BY COUNT(*) DESC"
mysql -wBN -harwikisource-p.db arwikisource_p -e "$SQL" > DBQ-82.txt

From: merl <mewikipedia@to.mabomuja.de>

Date: Sun, 20 Dec 2009 17:56:37

Done. Wallclock time < 1 min.
But i have some problems with the output format because of rtl direction with titles starting with latin characters. Perhaps you can correct that or give me some hints how the source code of a single line should look like.

BTW: If you would list all wanted pages and not only with a least two links there would be 5323 results.


From: DaB. <dab@ts.wikimedia.org>

Date: Sun, 20 Dec 2009 21:54:00

Done.

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: bugreporter@to.mabomuja.de
CC list: bugreporter@to.mabomuja.de, wikimedia-bugzilla@dabpunkt.eu, obayd3@gmail.com