Projets:Transfert : Différence entre versions
De Médici
imported>Jacques Ducloy (→Outils shell) |
imported>Jacques Ducloy (→Pages) |
||
(10 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 6 : | Ligne 6 : | ||
<source lang="sh"> | <source lang="sh"> | ||
WIKI=http://medici.in2p3.fr/fr | WIKI=http://medici.in2p3.fr/fr | ||
+ | WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/France/Medici/fr | ||
curl "$WIKI/api.php5?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent | curl "$WIKI/api.php5?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent | ||
+ | curl "$WIKI_TARGET/api.php5?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent | ||
</source> | </source> | ||
+ | |||
+ | ==Divers== | ||
+ | ( | ||
+ | curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=100&apnamespace=1" 2>/dev/null | ||
+ | ) |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | ||
+ | |||
+ | |||
+ | ( | ||
+ | curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=100&apnamespace=2" 2>/dev/null | ||
+ | ) |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | ||
+ | |||
+ | ==Fichiers== | ||
+ | <source lang="sh"> | ||
+ | |||
+ | ( | ||
+ | curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=100&apnamespace=6" 2>/dev/null | ||
+ | ) | head -4 |SxmlSelect -s api/query/allpages/p/attribute::title -p "wget http://medici.in2p3.fr/fr/images//@s1" | ||
+ | </source> | ||
+ | |||
+ | ==Pages== | ||
+ | Pour obtenir la liste des pages de l'espace principal | ||
+ | |||
+ | <source lang="sh"> | ||
+ | |||
+ | curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=500" \ | ||
+ | 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | wc | ||
+ | |||
+ | curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500" \ | ||
+ | 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | wc | ||
+ | |||
+ | |||
+ | </source> | ||
+ | |||
+ | ===Pour comparer=== | ||
+ | |||
+ | <source lang="sh"> | ||
+ | curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=500" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > pagesOld | ||
+ | |||
+ | curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > pagesTarget | ||
+ | |||
+ | diff pagesOld pagesTarget | grep "<" | ||
+ | |||
+ | diff pagesOld pagesTarget | grep "<" | cut -b 2- | ||
+ | |||
+ | |||
+ | </source> | ||
+ | |||
+ | ==Installation des modèles== | ||
+ | |||
+ | Pour vérifier la Job Queue | ||
+ | https://lorexplor.istex.fr/Wicri/Europe/France/Medici/fr/api.php?action=query&meta=siteinfo&siprop=statistics | ||
+ | |||
+ | Pour traiter : | ||
+ | php maintenance/runJobs.php |
Version actuelle datée du 27 mai 2019 à 12:54
Sommaire
Faits
- Sidebar OK
Outils shell
WIKI=http://medici.in2p3.fr/fr
WIKI_TARGET=https://lorexplor.istex.fr/Wicri/Europe/France/Medici/fr
curl "$WIKI/api.php5?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent
curl "$WIKI_TARGET/api.php5?action=query&meta=siteinfo&siprop=namespaces&format=xml" | SxmlIndent
Divers
( curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=100&apnamespace=1" 2>/dev/null ) |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
( curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=100&apnamespace=2" 2>/dev/null ) |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1
Fichiers
(
curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=100&apnamespace=6" 2>/dev/null
) | head -4 |SxmlSelect -s api/query/allpages/p/attribute::title -p "wget http://medici.in2p3.fr/fr/images//@s1"
Pages
Pour obtenir la liste des pages de l'espace principal
curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=500" \
2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | wc
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500" \
2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | wc
Pour comparer
curl "$WIKI/api.php5?action=query&list=allpages&format=xml&aplimit=500" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > pagesOld
curl "$WIKI_TARGET/api.php?action=query&list=allpages&format=xml&aplimit=500" 2>/dev/null |SxmlSelect -s api/query/allpages/p/attribute::title -p @s1 | sort -u > pagesTarget
diff pagesOld pagesTarget | grep "<"
diff pagesOld pagesTarget | grep "<" | cut -b 2-
Installation des modèles
Pour vérifier la Job Queue
https://lorexplor.istex.fr/Wicri/Europe/France/Medici/fr/api.php?action=query&meta=siteinfo&siprop=statistics
Pour traiter :
php maintenance/runJobs.php