Migration des wikis : Différence entre versions

De Wicri Base 1.28
imported>Jacques Ducloy
imported>Jacques Ducloy
Ligne 12 : Ligne 12 :
 
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Musique/en
 
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Musique/en
  
WIKI=http://ticri.univ-lorraine.fr/wicri-tools.en
+
WIKI=http://ticri.univ-lorraine.fr/wicri-meta.en
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Outils/en
+
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Meta/en
  
 
WIKI=http://ticri.univ-lorraine.fr/wicri-saarland.de
 
WIKI=http://ticri.univ-lorraine.fr/wicri-saarland.de

Version du 15 juin 2017 à 09:54

Cette page est un recueil de notes pour la migration des wikis.

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-lothringen.de
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/France/Lorraine/de

WIKI=http://ticri.univ-lorraine.fr/wicri-gr.de
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/GrandeRegion/de

Vérifications

Pour obtenir la liste des espaces de nom.

curl "$WIKI/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
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