Hi all,
I had mentioned this in the rewrite roadmap, and noticed it came up on IRC
as well, so I'd like to run this by the mailing list:
User:The Earwig has written a pure-python (with optional C-speedups)
MediaWiki text parser named mwparserfromhell[1]. Currently we have the
textlib library and some various regexes that implement this in a
non-perfect way. From my experience using mwparser (over 400k successful
edits with no issues) I believe it is ready to be bundled with the
framework. I think it would still be a good idea to keep textlib in as a
fallback or for users who are currently using it and don't need to migrate.
As for actually adding it, in the rewrite branch we can just add it as a
dependency in setup.py, and then convert various methods over.
In trunk, I'm guessing we would need to add it as an external. (I'm not
sure how that's actually done.)
[1] https://github.com/earwig/mwparserfromhell
-- Legoktm
In #pywikipediabot today, Pyfisch pointed out that User.contributions and
Page.getVersionHistory are returning the MediaWiki timestamp format
(example: 20130427104527). I've gone ahead and modified both methods to
return pywikibot.Timestamp formats, which are much easier to use.
I've noted this in the README-conversion.txt file, since this is a breaking
change from trunk.
I doubt these two are the only methods that needed changing, so I will try
and convert everything else over soon.
-- Legoktm
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_functio…
--
Bináris
I saw the request below only ;-)
Xqt
----- Ursprüngliche Nachricht -----
Von: Bináris
Gesendet: 24.04.2013 16:57
An: Pywikipedia discussion list
Betreff: Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score
No, this is similar to syntaxhighlight because of <score foo bar> ... </score> syntax.
2013/4/24 <info(a)gno.de>
This sort of html like tags are already implemented.Just use 'score' in the exception list.
greeting
xqt
Von: legoktm
Gesendet: 24.04.2013 12:54
An: WikiMedia Mailing Lists
Betreff: Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score
I'm guessing this was intended for the Pywikipedia-l list? :)
-- Legoktm
On Wed, Apr 24, 2013 at 1:38 AM, Bináris <wikiposta(a)gmail.com> wrote:
Hi,
<score> blahblah </score> or <score foo bar> ... </score> is introduces for music notes as written below. See also http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Grin/lilypond&act… for live use. Anyone to add a new exceptcion to textlib?
Not a big deal, I am just far from my own computer now where I could solve it. It should be handled in the way as syntaxhighlight in line 121 here: http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/pywikibot/tex…
---------- Forwarded message ----------
From: MZMcBride <z(a)mzmcbride.com>
Date: 2013/4/23
Subject: [Wikitech-l] Bug 189: "Add a music wikimodule" resolved/fixed
To: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>
Hi.
https://bugzilla.wikimedia.org/show_bug.cgi?id=189
Congrats to all involved in getting bug 189 resolved! :-)
Bug 189 was one of the oldest unresolved and one of the better known bugs
in Bugzilla involving a request to add a music module to Wikimedia wikis.
Quick stats about the bug:
* Opened: 2004-08-22
* Votes: 48
* Comments: 123
The bug filer is still around and left a nice note on the bug
(<https://bugzilla.wikimedia.org/show_bug.cgi?id=189#c123>):
---
Congratulations to all !
It makes my dream comes true today !
Thanks million times!
---
<https://en.wikipedia.org/wiki/Note> seemed like an easy target for
demoing the newly deployed Score extension
(<https://www.mediawiki.org/wiki/Extension:Score>) on a production site,
if anyone's interested. I tried looking around for a point and click
lilypond or ABC code generation tool (preferably Web-based), but a lot of
these tools quickly went over my head.
MZMcBride
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Bináris
--
Bináris
_______________________________________________
Wikidata-l mailing list
Wikidata-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
--
Bináris
This sort of html like tags are already implemented.Just use 'score' in the exception list.
greeting
xqt
----- Ursprüngliche Nachricht -----
Von: legoktm
Gesendet: 24.04.2013 12:54
An: WikiMedia Mailing Lists
Betreff: Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score
I'm guessing this was intended for the Pywikipedia-l list? :)
-- Legoktm
On Wed, Apr 24, 2013 at 1:38 AM, Bináris <wikiposta(a)gmail.com> wrote:
Hi,
<score> blahblah </score> or <score foo bar> ... </score> is introduces for music notes as written below. See also http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Grin/lilypond&act… for live use. Anyone to add a new exceptcion to textlib?
Not a big deal, I am just far from my own computer now where I could solve it. It should be handled in the way as syntaxhighlight in line 121 here: http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/pywikibot/tex…
---------- Forwarded message ----------
From: MZMcBride <z(a)mzmcbride.com>
Date: 2013/4/23
Subject: [Wikitech-l] Bug 189: "Add a music wikimodule" resolved/fixed
To: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>
Hi.
https://bugzilla.wikimedia.org/show_bug.cgi?id=189
Congrats to all involved in getting bug 189 resolved! :-)
Bug 189 was one of the oldest unresolved and one of the better known bugs
in Bugzilla involving a request to add a music module to Wikimedia wikis.
Quick stats about the bug:
* Opened: 2004-08-22
* Votes: 48
* Comments: 123
The bug filer is still around and left a nice note on the bug
(<https://bugzilla.wikimedia.org/show_bug.cgi?id=189#c123>):
---
Congratulations to all !
It makes my dream comes true today !
Thanks million times!
---
<https://en.wikipedia.org/wiki/Note> seemed like an easy target for
demoing the newly deployed Score extension
(<https://www.mediawiki.org/wiki/Extension:Score>) on a production site,
if anyone's interested. I tried looking around for a point and click
lilypond or ABC code generation tool (preferably Web-based), but a lot of
these tools quickly went over my head.
MZMcBride
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Bináris
--
Bináris
_______________________________________________
Wikidata-l mailing list
Wikidata-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l
I'm guessing this was intended for the Pywikipedia-l list? :)
-- Legoktm
On Wed, Apr 24, 2013 at 1:38 AM, Bináris <wikiposta(a)gmail.com> wrote:
> Hi,
>
> <score> blahblah </score> or <score foo bar> ... </score> is introduces
> for music notes as written below. See also
> http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Grin/lilypond&act… live use. Anyone to add a new exceptcion to textlib?
> Not a big deal, I am just far from my own computer now where I could solve
> it. It should be handled in the way as syntaxhighlight in line 121 here:
> http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/pywikibot/tex…
>
> ---------- Forwarded message ----------
> From: MZMcBride <z(a)mzmcbride.com>
> Date: 2013/4/23
> Subject: [Wikitech-l] Bug 189: "Add a music wikimodule" resolved/fixed
> To: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>
>
>
> Hi.
>
> https://bugzilla.wikimedia.org/show_bug.cgi?id=189
>
> Congrats to all involved in getting bug 189 resolved! :-)
>
> Bug 189 was one of the oldest unresolved and one of the better known bugs
> in Bugzilla involving a request to add a music module to Wikimedia wikis.
> Quick stats about the bug:
>
> * Opened: 2004-08-22
> * Votes: 48
> * Comments: 123
>
> The bug filer is still around and left a nice note on the bug
> (<https://bugzilla.wikimedia.org/show_bug.cgi?id=189#c123>):
>
> ---
> Congratulations to all !
>
> It makes my dream comes true today !
>
> Thanks million times!
> ---
>
> <https://en.wikipedia.org/wiki/Note> seemed like an easy target for
> demoing the newly deployed Score extension
> (<https://www.mediawiki.org/wiki/Extension:Score>) on a production site,
> if anyone's interested. I tried looking around for a point and click
> lilypond or ABC code generation tool (preferably Web-based), but a lot of
> these tools quickly went over my head.
>
> MZMcBride
>
>
>
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
>
> --
> Bináris
>
>
>
> --
> Bináris
> _______________________________________________
> Wikidata-l mailing list
> Wikidata-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata-l
>
>
How to use interwiki.py now for wikipedia?
I use http://www.wikidata.org/wiki/User:Reza1615/BOT/new_interwiki.py
but i want to use classical interwiki.py too, because of posibilities
like -hint:20, -neverlink:foo, -ignore:en:bar etc
It should mininimally remove incorrect links from wikipedia and add
pages to wikidata
When I run
interwiki.py dinotopie -neverlink:hu
Getting 1 page from wikipedia:cs...
...
WARNING: wikipedia: [[cs:Dinotopie]] links to incorrect [[hu:Dinotópia
(film, 2002)]]
WARNING: wikipedia: [[el:Deinotopía]] links to incorrect
[[hu:Dinotópia (film, 2002)]]
WARNING: wikipedia: [[de:Dinotopia]] links to incorrect [[hu:Dinotópia
(film, 2002)]]
But no page is changed
When I run
interwiki.py dinotopie -repository
Getting 1 page from wikipedia:cs...
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[de:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[el:Deinotopía]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[en:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[es:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[fr:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[hu:Dinotópia
(film, 2002)]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[it:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[nl:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[pl:Dinotopia]]
[[cs:Dinotopie]]: [[cs:Dinotopie]] gives new interwiki [[pt:Dinotopia]]
Getting 1 page from wikidata:wikidata...
Traceback (most recent call last):
File "D:\Py\pagegenerators.py", line 1234, in __iter__
for loaded_page in self.preload(somePages):
File "D:\Py\pagegenerators.py", line 1253, in preload
pywikibot.getall(site, pagesThisSite)
File "D:\Py\wikipedia.py", line 5464, in getall
_GetAll(site, pages, throttle, force).run()
File "D:\Py\wikipedia.py", line 5081, in run
data = self.getData()
File "D:\Py\wikipedia.py", line 5251, in getData
pagenames = u'\r\n'.join(pagenames)
TypeError: sequence item 0: expected string or Unicode, NoneType found
sequence item 0: expected string or Unicode, NoneType found
Dump cs (wikipedia) appended.
Traceback (most recent call last):
File "D:\Py\interwiki.py", line 2678, in <module>
main()
File "D:\Py\interwiki.py", line 2652, in main
bot.run()
File "D:\Py\interwiki.py", line 2370, in run
self.queryStep()
File "D:\Py\interwiki.py", line 2343, in queryStep
self.oneQuery()
File "D:\Py\interwiki.py", line 2339, in oneQuery
subject.batchLoaded(self)
File "D:\Py\interwiki.py", line 1391, in batchLoaded
(skip, alternativePage) = self.disambigMismatch(page, counter)
File "D:\Py\interwiki.py", line 1158, in disambigMismatch
elif not self.originPage.isDisambig() and page.isDisambig():
File "D:\Py\wikipedia.py", line 1570, in isDisambig
self.templates())
File "D:\Py\wikipedia.py", line 2830, in templates
get_redirect=get_redirect)]))
File "D:\Py\wikipedia.py", line 2853, in templatesWithParams
extract_templates_and_params(thistxt, asList=True)]
File "D:\Py\pywikibot\textlib.py", line 899, in extract_templates_and_params
thistxt = removeDisabledParts(text)
File "D:\Py\pywikibot\textlib.py", line 272, in removeDisabledParts
return toRemoveR.sub('', text)
TypeError: expected string or buffer
--
JAnD
Hello all,
API is one of the most important features of MW and it has been used
on WMF wikis since 2009 If I recall correctly
I want to use API on everything remained (in PWB codes) in order to
reduce pressure on servers but this idea of supporting non-API wikis
is really annoying and unreasonable in my opinion
I think we must end supporting non-API wikis, If you're not agree with
me, tell me why not
Best
--
Amir
Hello everyone-
My name is Randall Livingstone, and I am an en.wikipedian and faculty
member at Endicott College (Beverly, Massachusetts, U.S.) I have spent the
last two years researching bots on WP/WM projects (primarily en.wikipedia),
and I have recently been chatting with bot operators who work on
non-English language versions of the encyclopedia and other WM projects.
Thank you to everyone who has given his or her time and expertise on bots,
bot policies, and bot communities on the sites.
I am still looking for more participants to chat with about their work and
experiences with bots and automated tools on WP/WM (IRC, Skype, Gchat,
email, or whatever works for you). If you operate a bot, contribute to the
approval of bots on your local project, participate in discussions and
policy-making around bots, or have any similar experiences, I'd love to
chat with you. Online chats usually last between 30-60 minutes and can be
scheduled at a time convenient for you. Please note, I am only able to
correspond in English.
If you are interested in participating, feel free to email me directly (
rlivings(a)endicott.edu) or leave a message for me on my en.wp Talk
page<http://en.wikipedia.org/wiki/User_talk:UOJComm>.
Thank you in advance for your consideration.
Randall Livingstone
School of Communication
Endicott College
WP User: UOJComm
You can learn more about me and download my dissertation
here<http://commtechtheorysociety.com/about/>
.
This research has been approved by the Institutional Review Boards at both
the University of Oregon and Endicott College. (Feel free to request a copy
of those protocols).
Hello! Is there a bot or extension that can generate stubs of template
descriptions by template wikitext? It should be pretty simple: the bot will
just grab all template parameters {{{PARAMETER}}} and lists those
parameters.
If no such extensions exists could anybody tell how to programaticaly get
the parameters of a given template?
Sincerely yours,
-----
Yury Katkov