Page MenuHomePhabricator

Scale: add articles to test Wikipedia so that users can try SuggestedEdits
Closed, ResolvedPublic

Description

At the moment, we only have 26 articles in Suggested Edits on https://test.wikipedia.org/

More articles are welcomed to populate Suggested Edits. Could be done both by importing pages that have the right templates, or by adding the right templates to existing articles en masse.

We would like to import 1,000 new articles.

Event Timeline

MMiller_WMF renamed this task from Add articles to test Wikipedia so that users can try SuggestedEdits to Scale: add articles to test Wikipedia so that users can try SuggestedEdits.May 25 2020, 8:13 PM
MMiller_WMF added subscribers: Catrope, Tgr, kostajh and 3 others.

There are 39 ORES topics and 5 difficulty levels, so that's five articles per level per topic.

#!/bin/bash
set -e

TOPICS=$( curl -s 'https://en.wikipedia.beta.wmflabs.org/w/api.php?action=paraminfo&format=json&modules=query+growthtasks' \
	| jq --raw-output '.paraminfo.modules[0].parameters[] | select(.name == "topics") | .type[]' \
)
for TOPIC in $TOPICS; do
	curl -s "https://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&format=json&list=growthtasks&gtlimit=25&gttasktypes=copyedit%7Clinks%7Creferences%7Cupdate%7Cexpand&formatversion=2&gttopics=$TOPIC" | jq --raw-output '.query.growthtasks.suggestions[].title'
done

python pwb.py transferbot -family:wikipedia -lang:en -tofamily:wikipedia -tolang:test -file:tasks.txt

list of created pages

Templates:

curl -s 'https://test.wikipedia.org/wiki/MediaWiki:NewcomerTasks.json?action=raw' | jq --raw-output '.[].templates[] | "Template:" + .' > templates.txt
python pwb.py transferbot -family:wikipedia -lang:en -tofamily:wikipedia -tolang:test -file:templates.txt -putthrottle:0

In hindsight using Special:Export would have been easier. Oh well.

In double hindsight it wouldn't. Some articles make testwiki time out, even when saved on their own. With mass import, that would have been much worse.

Done (39*5*5=975 articles). Caveats:

Checked - testwiki wmf.39 has been populated with SE articles (there is no ORES topics as per @Tgr comments above.

Re-opening so that @Trizek-WMF can use this task to do the last step: adding to Mediawiki.org the instructions so that future communities can use Test Wikipedia to try out our features.