Utilisateur:Phe/À faire à intervalle régulier

Une page de Wikipédia, l'encyclopédie libre.

pas automatique[modifier | modifier le code]

à chaque dump[modifier | modifier le code]

#export LANG=$LANG.utf-8 && unicode_start
export WLANG=fr
export BASE_FILE=20160601
export FAMILY=wikisource
export WIKI=$WLANG$FAMILY
export FILE=$WIKI-$BASE_FILE-pages-meta-current.xml.bz2
cd ~/wiki
curl -L http://dumps.wikimedia.org/$WIKI/$BASE_FILE/$FILE -C - -o dump/$WIKI/$FILE
md5sum dump/$WIKI/$FILE
fusermount -u ~/wiki/file/$WIKI
cd /usr/src/phe/wiki
rm -rf fuse.$WIKI.old && mv fuse.$WIKI fuse.$WIKI.old && mkdir fuse.$WIKI
for f in *.$WIKI.txt; do mv $f $f.old; done
mv article_links.$WIKI.idx article_links.$WIKI.idx.old
lbzip2 -d -n4 < ~/wiki/dump/$WIKI/$FILE | src/xml_dump_fuse --lang $WLANG --family $FAMILY
cd /usr/src/phe/fuse_wmdump/
mv data_index.$WIKI data_index.$WIKI.old
src/build_index
src/fuse_wmdump_ll -s ~/wiki/file/$WIKI &
cd ../wiki
src/create_link_list ~/wiki/file/$WIKI/Article/ $WLANG $FAMILY > links_error.$WIKI.txt
src/pack_article_links
src/dist_edit ~/wiki/file/$WIKI/Article/ $WLANG $FAMILY > dist_edit.$WIKI.txt
python links_stats.py $WLANG $FAMILY -most-broken
python links_stats.py $WLANG $FAMILY -bad-links
cd ../botpywi
rm -f cache/cat_list cache/check_interwiki cache/homonymie cache/default_sort cache/anchor_cache
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 $FAMILY
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
python self_redirect.py # Dumper ça qq part
mv cache/ref_stats cache/ref_stats.old
python check_reference.py
find ~/wiki/file/$WIKI -type f -size 0c | python candidate_for_deletion.py
find ~/wiki/file/$WIKI/Article -type f -print0 | xargs -0 grep -c "[vV]oir[ _]homonymes" | grep ":2"
# redirect vers des pages d'homonymies, utiles ?
find ~/wiki/file/$WIKI/Article/ -type l -name "*homonymie*"
# pages d'homonymies mal nommé
find ~/wiki/file/$WIKI/Article/ -name "*[Hh]omonyme*"
find ~/wiki/file/$WIKI/Article/ -name "*[Hh]omonymies*"
python stats_size.py $WLANG $FAMILY
python check_homonymie.py
python redirect_from_main.py
python search_fr.py -without_lang_link > Sisyph_iw.txt # uploader à http://dl.free.fr/ et mettre un mot à [[Discussion Utilisateur:Sisyph]]
# Tant que la page spécial double redirect n'est pas mise à jour
find ~/wiki/file/$WIKI/Article -type l | python check_symlink.py
python check_stub_template.py 
find ~/wiki/file/$WIKI -type l -follow | python broken_redir.py
python default_sort.py -add
python normalize_links.py
python translate_state.py
python check_external_link.py $WLANG $FAMILY
python check_project_link.py $WIKI
# wikisource
rm cache/check_index
python check_index.py -all

semi-automatique[modifier | modifier le code]

Mise à jour une fois par jour.


python src/fb_links.py $WLANG $FAMILY -longest-link 150 5000
python src/fb_links.py $WLANG $FAMILY -invalid-link
python src/fb_links.py $WLANG $FAMILY -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 $FAMILY # trouver ou dumper ces informations