Revision: 3962
Author: leogregianin
Date: 2007-08-03 23:28:35 +0000 (Fri, 03 Aug 2007)
Log Message:
-----------
docu :-)
Modified Paths:
--------------
trunk/pywikipedia/capitalize_redirects.py
Modified: trunk/pywikipedia/capitalize_redirects.py
===================================================================
--- trunk/pywikipedia/capitalize_redirects.py 2007-08-03 18:57:57 UTC (rev 3961)
+++ trunk/pywikipedia/capitalize_redirects.py 2007-08-03 23:28:35 UTC (rev 3962)
@@ -1,5 +1,39 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
+'''
+Bot to create redirects.
+
+Command-line arguments:
+
+ -file Work on all pages listed in a text file.
+ Argument can also be given as "-file:filename".
+
+ -cat Work on all pages which are in a specific category.
+ Argument can also be given as "-cat:categoryname".
+
+ -ref Work on all pages that link to a certain page.
+ Argument can also be given as "-ref:referredpagetitle".
+
+ -links Work on all pages that are linked from a certain page.
+ Argument can also be given as "-link:linkingpagetitle".
+
+ -start Work on all pages on the home wiki, starting at the named page.
+
+ -page Work on a single page.
+
+
+ -namespace Run over especific namespace.
+ Argument can also be given as "-namespace:100".
+
+ -always Don't prompt to make changes, just do them.
+
+
+p.e.: "python capitalize_redirects.py -start:B -always"
+
+"""
+
+
+'''
#
# (C) Yrithinnd
# Class licensed under terms of the MIT license
As time is passing MW is better and better editor. It is also a very
good system for version control...
I was writing everything except programs in my local MW. After I
realized that there is syntax highlighting extension (not JS, but, for
now good enough inside of preview), I decided to move all of my code
to MW, too.
I'll make a script which would be able to download and execute program
from MW installation. This means that I would be able to keep
everything inside of MW and to execute it from any place on the
system.
If we think further, we may realize that it is completely possible to
keep the code inside of MW and to generate nightly snapshots using
python script dedicated for that.
Personally, I think that MW is much better system for version control
because it is highly human readable and writable. And some group
should start to use it... And pywikipedia developers are the perfect
group to start to do that :)
The only problem which I heard in relation of MW usage instead of
CVS/SVN is that programmers like to update their repositories with one
command. Solutions for that may be:
- Generating CVS/SVN updates from MW using some script.
- Extending programs which use CVS/SVN for MW usage.
I didn't hear any other reason why not to use MW as version control
system. So, if there are some other problems, I would like to know for
them. AFAIK, everything which CVS/SVN may -- MW may it; as well as MW
with some scripts may some thing much better.
So, what do you think?
Revision: 3961
Author: valhallasw
Date: 2007-08-03 18:57:57 +0000 (Fri, 03 Aug 2007)
Log Message:
-----------
and danish deletion_reason_remove. Prizes will be awarded to the first person who tells me what the '?\195?\184' was called again.
Modified Paths:
--------------
trunk/pywikipedia/category.py
Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py 2007-08-03 18:48:04 UTC (rev 3960)
+++ trunk/pywikipedia/category.py 2007-08-03 18:57:57 UTC (rev 3961)
@@ -425,6 +425,7 @@
Does not remove category tags pointing at subcategories.
'''
deletion_reason_remove = {
+ 'da':u'Robot: Kategorien blev opløst',
'de':u'Bot: Kategorie wurde aufgelöst',
'en':u'Robot: Category was disbanded',
'he':u'רובוט: הקטגוריה פורקה',
Revision: 3958
Author: wikipedian
Date: 2007-08-03 03:31:06 +0000 (Fri, 03 Aug 2007)
Log Message:
-----------
sped up "blowing up" of templates by making sure that spaces are only
added inside the templates, not in unrelated wikilinks following it
Modified Paths:
--------------
trunk/pywikipedia/weblinkchecker.py
Modified: trunk/pywikipedia/weblinkchecker.py
===================================================================
--- trunk/pywikipedia/weblinkchecker.py 2007-08-03 00:24:24 UTC (rev 3957)
+++ trunk/pywikipedia/weblinkchecker.py 2007-08-03 03:31:06 UTC (rev 3958)
@@ -107,7 +107,7 @@
# might be a | or a } directly after a URL which does not belong to
# the URL itself.
# Blow up templates with spaces to avoid these problems.
- templateWithParamsR = re.compile(r'{{(.*?[^ ])\|([^ ].*?)}}', re.DOTALL)
+ templateWithParamsR = re.compile(r'{{([^}]*?[^ ])\|([^ ][^}]*?)}}', re.DOTALL)
while templateWithParamsR.search(text):
text = templateWithParamsR.sub(r'{{ \1 | \2 }}', text)