Utilisateur:Phe/À faire à intervalle régulier

Un article de Wikipédia, l'encyclopédie libre.

Sommaire

[modifier] pas automatique

[modifier] à chaque dump

export LANG=$LANG.utf-8 && unicode_start
export WLANG=fr
export BASE_FILE=20080614
export FILE=${WLANG}wiki-$BASE_FILE-pages-meta-current.xml.bz2
# optionnel, pour mettre à jour la liste des exceptions
# cd /usr/src/phe/botpywi && python line_links.py
cd ~/wiki
curl http://dumps.wikimedia.org/${WLANG}wiki/$BASE_FILE/$FILE -C - -o ${WLANG}wiki/$FILE
md5sum ${WLANG}wiki/$FILE
fusermount -u ~/wiki/${WLANG}
cd /usr/src/phe/wiki
rm -rf fuse.${WLANG}.old && mv fuse.${WLANG} fuse.${WLANG}.old && mkdir fuse.${WLANG}
for f in *.${WLANG}.txt; do mv $f $f.old; done
cp lang_list.txt.old lang_list.txt
bzcat ~/wiki/${WLANG}wiki/$FILE | src/xml_dump_fuse 
cd /usr/src/phe/fuse_wmdump/
mv data_index.${WLANG} data_index.${WLANG}.old
src/build_index
src/fuse_wmdump_ll -s ~/wiki/${WLANG} &
cd ../wiki
src/create_link_list ~/wiki/${WLANG}/Article/ ${WLANG} > links_error.${WLANG}.txt
src/pack_article_links
src/dist_edit ~/wiki/${WLANG}/Article/ ${WLANG} > dist_edit.${WLANG}.txt
python links_stats.py ${WLANG} -most-broken
python links_stats.py ${WLANG} -bad-links
python src/fb_links.py ${WLANG} -longest-link 150 5000
python src/fb_links.py ${WLANG} -invalid-link
python src/fb_links.py ${WLANG} -http-link > http-link.txt
cd ../pywikipedia && python replace.py -file:/usr/src/phe/wiki/http-link.txt -regex "\[\[http:(.*?)\]\]" "[http:\\1]" && cd -
src/interwiki ${WLANG} ${WLANG} # trouver ou dumper ces informations
cd ../botpywi
rm -f cache/${WLANG}_file_list_* cache/cat_list cache/check_interwiki cache/homonymie
python red_links_to_except.py -lang:${WLANG} -force
python red_links_filter.py -lang:${WLANG}
python line_links.py -lang:${WLANG} # facultatif s'il restait des liens rouges
python mostwanted.py ${WLANG}
python article_without_cat.py -create
python article_without_cat.py # update_all_page_from_wiki() si nécessaire
mv cache/anchor_list cache/anchor_list.old
python anchor.py -to_exception
python anchor.py
python anchor.py # oui deux fois, les exceptions obsolètes sont supprimés
cd ../pywikipedia && sh ../botpywi/anchor_change.sh && cd - # virer les modifs idiotes d'abord
python cat_cycle.py
mv cache/ref_stats cache/ref_stats.old
python check_reference.py
find ~/wiki/${WLANG} -size 0c | python candidate_for_deletion.py
find ~/wiki/${WLANG}/Article -type f -print0 | xargs -0 grep -c "[vV]oir[ _]homonymes" | grep ":2"
# redirect vers des pages d'homonymies, utiles ?
find ~/wiki/${WLANG}/Article/ -type l -name "*homonymie*"
# pages d'homonymies mal nommé
find ~/wiki/${WLANG}/Article/ -name "*[Hh]omonyme*"
find ~/wiki/${WLANG}/Article/ -name "*[Hh]omonymies*"
python stats_size.py
python check_homonymie.py 
# Tant que la page spécial double redirect n'est pas mise à jour
find ~/wiki/${WLANG}/Article -type l | python check_symlink.py
python check_stub_template.py 
python normalize_links.py
python translate_state.py
find ~/wiki/${WLANG} -type l -follow | python broken_redir.py

[modifier] semi-automatique

Mise à jour une fois par jour.

[modifier] Automatique

  • python tor-block.py, toutes les 30 minutes