Dear all, Hello, I am Gabriel Chi Hong Lee from Hong Kong, I would like to ask that where is the correct place to learn how to make an pywikipedia-bot? I have a own wiki that I can try it on there. Please give me some advise. Thank you! Gabriel Lee
2013/3/13 pywikipedia-l-request@lists.wikimedia.org
Send Pywikipedia-l mailing list submissions to pywikipedia-l@lists.wikimedia.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l or, via email, send a message with subject or body 'help' to pywikipedia-l-request@lists.wikimedia.org
You can reach the person managing the list at pywikipedia-l-owner@lists.wikimedia.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Pywikipedia-l digest..."
Today's Topics:
- Table of contents for scripts and fixes (Bináris)
- Renaming of some German-specific fixes (Bináris)
Message: 1 Date: Wed, 13 Mar 2013 11:38:05 +0100 From: Bináris wikiposta@gmail.com To: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Subject: [Pywikipedia-l] Table of contents for scripts and fixes Message-ID: < CAD0L+c8WZhWt7qmKKWR-61knaoYQz6CSTV86ri82jvvtT2kikw@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Hi gurus,
I have suffered for a long time because I have quite a lot of fixes and I can hardly find my way in this jungle and keep a logical order and find old ones. So I decided to write a script that creates a table of contents int fixes.py/user-fixes.py.
Then I thought it should also list main-level variables and functions (Python is very good at dissolving main-level things from others :-)). As I already wrote earlier, I use several own functions for my fixes ([1]). And also header lines of some predefined format. All this script needs a place to insert the TOC which should be a predefined constant line, e.g. # *** CONTENTS *** # (If the script finds the corresponding END CONTENTS line, it clears the previous TOC from between these two.)
But then I realized that enhanced with classes this would be useful for any kind of scripts without extra work. For example in wikipedia.py which is now long, long, and hard to overview. Of course, there would be a possibility to leave some kind of data (e.g. "no variables please, only functiions and classes"), and two approaches for ordering (everything in original order, or fisrt the variables, then functions, then fixes...). Unfortunately, in some rare cases the length of a line may excced the 80 characters, which may cause PEP8 and/or Xqt beiing sad. :-)
How does this concept sound?
I will anyhow write it for my own purposes. It is just about community use for complicated scripts such as fixes.py or wikipedia.py.
[1]
http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes_and_function...
Bináris
I would suggest
1. going to http://www.mediawiki.org/wiki/Manual:Pywikipediabot , downloading and installing the bot
2. reading source code of smaller bots in the collection, and documentation of bigger ones
3. trying things out on your wiki.
Jarek T.
User:jarekt
From: pywikipedia-l-bounces@lists.wikimedia.org [mailto:pywikipedia-l-bounces@lists.wikimedia.org] On Behalf Of Chi Hong Lee Sent: Wednesday, March 13, 2013 6:58 PM To: pywikipedia-l@lists.wikimedia.org Subject: Re: [Pywikipedia-l] Pywikipedia-l Digest, Vol 68, Issue 12
Dear all,
Hello, I am Gabriel Chi Hong Lee from Hong Kong, I would like to ask that where is the correct place to learn how to make an pywikipedia-bot? I have a own wiki that I can try it on there. Please give me some advise. Thank you!
Gabriel Lee
2013/3/13 pywikipedia-l-request@lists.wikimedia.org
Send Pywikipedia-l mailing list submissions to pywikipedia-l@lists.wikimedia.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l or, via email, send a message with subject or body 'help' to pywikipedia-l-request@lists.wikimedia.org
You can reach the person managing the list at pywikipedia-l-owner@lists.wikimedia.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Pywikipedia-l digest..."
Today's Topics:
1. Table of contents for scripts and fixes (Bináris) 2. Renaming of some German-specific fixes (Bináris)
----------------------------------------------------------------------
Message: 1 Date: Wed, 13 Mar 2013 11:38:05 +0100 From: Bináris wikiposta@gmail.com To: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Subject: [Pywikipedia-l] Table of contents for scripts and fixes Message-ID: <CAD0L+c8WZhWt7qmKKWR-61knaoYQz6CSTV86ri82jvvtT2kikw@mail.gmail.com mailto:CAD0L%2Bc8WZhWt7qmKKWR-61knaoYQz6CSTV86ri82jvvtT2kikw@mail.gmail.com > Content-Type: text/plain; charset="iso-8859-1"
Hi gurus,
I have suffered for a long time because I have quite a lot of fixes and I can hardly find my way in this jungle and keep a logical order and find old ones. So I decided to write a script that creates a table of contents int fixes.py/user-fixes.py.
Then I thought it should also list main-level variables and functions (Python is very good at dissolving main-level things from others :-)). As I already wrote earlier, I use several own functions for my fixes ([1]). And also header lines of some predefined format. All this script needs a place to insert the TOC which should be a predefined constant line, e.g. # *** CONTENTS *** # (If the script finds the corresponding END CONTENTS line, it clears the previous TOC from between these two.)
But then I realized that enhanced with classes this would be useful for any kind of scripts without extra work. For example in wikipedia.py which is now long, long, and hard to overview. Of course, there would be a possibility to leave some kind of data (e.g. "no variables please, only functiions and classes"), and two approaches for ordering (everything in original order, or fisrt the variables, then functions, then fixes...). Unfortunately, in some rare cases the length of a line may excced the 80 characters, which may cause PEP8 and/or Xqt beiing sad. :-)
How does this concept sound?
I will anyhow write it for my own purposes. It is just about community use for complicated scripts such as fixes.py or wikipedia.py.
[1] http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes_and_function... -- Bináris