~relex-dev/relex/trunk

« back to all changes in this revision

Viewing changes to src/perl/wiki-clean-fr.sh

  • Committer: Linas Vepstas
  • Date: 2013-12-21 19:44:19 UTC
  • Revision ID: linasvepstas@gmail.com-20131221194419-8fyk9f2rgxp0zf42
more article cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# Delete unwanted article types from the wikipedia article space.
 
4
# We won't be parsing these; they (mostly) don't contain any valid
 
5
# French-language sentences.
 
6
#
 
7
# Copyright (c) 2008, 2013 Linas Vepstas <linas@linas.org>
 
8
 
 
9
Catégorie
 
10
Wikipédia
 
11
Fichier:
 
12
Modèle
 
13
 
 
14
echo "Category:"
 
15
find . -name 'Category:*' -print | wc
 
16
find . -name 'MediaWiki:*' -print | wc
 
17
find . -name 'Help:*' -print | wc
 
18
echo "File:"
 
19
find . -name 'File:*' -print | wc
 
20
find . -name 'Image:*' -print | wc
 
21
echo "Template"
 
22
find . -name 'Template:*' -print | wc
 
23
find . -name 'Wikipedia:*' -print | wc
 
24
find . -name '"List of "*' -print | wc
 
25
find . -name '"Lists of "*' -print | wc
 
26
 
 
27
# Must use "find" to accomplish this, since using "rm Category:*"
 
28
# leads to an overflow of the command line.
 
29
 
 
30
echo "Category:"
 
31
time find . -name 'Category:*' -exec rm {} \;
 
32
time find . -name 'MediaWiki:*' -exec rm {} \;
 
33
time find . -name 'Help:*' -exec rm {} \;
 
34
# File: includes mp3's, ogg's, many different image types
 
35
echo "File:"
 
36
time find . -name 'File:*' -exec rm {} \;
 
37
time find . -name 'Image:*' -exec rm {} \;
 
38
echo "Template"
 
39
time find . -name 'Template:*' -exec rm {} \;
 
40
time find . -name 'Wikipedia:*' -exec rm {} \;
 
41
time find . -name '"List of "*' -exec rm {} \;
 
42
time find . -name '"Lists of "*' -exec rm {} \;