Revision: 6922
Author: nicdumz
Date: 2009-05-26 10:55:29 +0000 (Tue, 26 May 2009)
Log Message:
-----------
Documentation (#2795933 by Ronga)
Modified Paths:
--------------
trunk/pywikipedia/add_text.py
Modified: trunk/pywikipedia/add_text.py
===================================================================
--- trunk/pywikipedia/add_text.py 2009-05-26 00:46:42 UTC (rev 6921)
+++ trunk/pywikipedia/add_text.py 2009-05-26 10:55:29 UTC (rev 6922)
@@ -2,8 +2,9 @@
# -*- coding: utf-8 -*-
"""
This is a Bot written by Filnik to add a text at the end of the page but above categories,
-interwiki and template for the stars of the interwiki.
+interwiki and template for the stars of the interwiki (default).
+Alternatively it may also add a text at the top of the page.
These command line parameters can be used to specify which pages to work on:
¶ms;
@@ -11,19 +12,21 @@
Furthermore, the following command line parameters are supported:
-page Use a page as generator
--text Define which text add. "\n" are interpreted as newlines.
+-text Define which text to add. "\n" are interpreted as newlines.
-summary Define the summary to use
--except Use a regex to understand if the template is already in the page
+-except Use a regex to check if the text is already in the page
-excepturl Use the html page as text where you want to see if there's the text, not the wiki-page.
-newimages Add text in the new images
-untagged Add text in the images that don't have any license template
-always If used, the bot won't ask if it should add the text specified
--up If used, put the text above and not below
+-up If used, put the text at the top of the page
--- Example ---
-
+1.
+# This is a script to add a template to the top of the pages with category:catname
python add_text.py -cat:catname -summary:"Bot: Adding a template" -text:"{{Something}}" -except:"\{\{([Tt]emplate:|)[Ss]omething" -up
+2.
# Command used on it.wikipedia to put the template in the page without any category.
# But warning! Put it in a line, otherwise it won't work correctly.
Revision: 6920
Author: cosoleto
Date: 2009-05-25 12:24:59 +0000 (Mon, 25 May 2009)
Log Message:
-----------
Site.getUrl(): Removed documentation for 'no_hostname' parameter, as this is a
blatant hack thus shouldn't be used.
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2009-05-25 12:19:31 UTC (rev 6919)
+++ trunk/pywikipedia/wikipedia.py 2009-05-25 12:24:59 UTC (rev 6920)
@@ -4689,7 +4689,6 @@
sysop - If True, the sysop account's cookie will be used.
data - An optional dict providing extra post request parameters.
cookie_only - Only return the cookie the server sent us back
- no_hostname - Open the URL given, don't add the hostname before.
Returns the HTML text of the page converted to unicode.
"""