Migration des wikis : Différence entre versions
De Wicri Base 1.28
imported>Jacques Ducloy (→Pour les wikis français) |
imported>Jacques Ducloy (→Pour les wikis français) |
||
Ligne 59 : | Ligne 59 : | ||
===Pour les wikis français=== | ===Pour les wikis français=== | ||
<source lang="sh"> | <source lang="sh"> | ||
− | curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | + | ( |
+ | curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | ||
− | curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > | + | curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apfrom=L&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 |
+ | ) | sort -u > templateOld | ||
+ | |||
+ | ( | ||
+ | curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | ||
+ | |||
+ | curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apfrom=L&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | ||
+ | ) | sort -u > templateOld | ||
diff templateOld templateTarget | grep "<" | diff templateOld templateTarget | grep "<" |
Version du 16 juin 2017 à 13:30
Cette page est un recueil de notes pour la migration des wikis.
Sommaire
Variables shell
WIKI=http://ticri.univ-lorraine.fr/wicri-base.de
WIKI=http://ticri.univ-lorraine.fr/wicri.de
WIKI=http://ticri.univ-lorraine.fr/wicri-europa.de
WIKI=http://ticri.univ-lorraine.fr/wicri-base.pt
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/de
WIKI=http://ticri.univ-lorraine.fr/wicri-music.en
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Musique/en
WIKI=http://ticri.univ-lorraine.fr/wicri-meta.en
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Meta/en
WIKI=http://ticri.univ-lorraine.fr/wicri-saarland.de
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/Allemagne/Sarre/de
WIKI=http://ticri.univ-lorraine.fr/wicri-asia.en
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Asie/en
WIKI=http://ticri.univ-lorraine.fr/wicri-gr.de
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/GrandeRegion/de
WIKI=http://ticri.univ-lorraine.fr/wicri-outils.fr
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Outils/fr
Vérifications
Pour obtenir la liste des espaces de nom.
curl "$WIKI/api.php?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent
curl "$WIKI_TARGET/api.php?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent
Pour obtenir la liste des pages de l'espace principal
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100" \
2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
Les modèles
Pour les wikis anglais
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > templateOld
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > templateTarget
diff templateOld templateTarget | grep "<"
Pour les wikis français
(
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apfrom=L&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
) | sort -u > templateOld
(
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apfrom=L&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
) | sort -u > templateOld
diff templateOld templateTarget | grep "<"
Suite à améliorer
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 > tmpListOrg
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 > tmpListTarget
(
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10&apfrom=L" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10&apfrom=N" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10&apfrom=W" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
) | sort -u > templateOld
(
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10&apfrom=L" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10&apfrom=N" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=10&apfrom=W" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
) | sort -u > templateNew
(
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=1" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=2" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=3" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=4" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=5" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=8" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=9" 2>/dev/null
) |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
(
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=11" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=12" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=13" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=14" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=15" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=102" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=103" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=104" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=105" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=106" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=107" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=108" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=109" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=500" 2>/dev/null
curl "$WIKI/api.php?action=query&list=allpages&format=xml&aplimit=100&apnamespace=501" 2>/dev/null
) |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1