Good morning (to whom it may concern in their time zone),
last night Merlijn had a maintenance day and closed so many bugs that I could not even read the mails in less than three sessions. :-) Thank you!
Merlijn copied "open in browser" from replace.py to add_text.py: http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10034 Just a day before I was to do the same with solve_disambiguation.py, but I had no time yet. What about rather introducing a browseropen() method to class Page?
I think any error message during this process shall appear in webbrowser, not the pywiki script, am I right?
Hi Bináris,
On 22 March 2012 07:08, Bináris wikiposta@gmail.com wrote:
Merlijn copied "open in browser" from replace.py to add_text.py: http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10034 Just a day before I was to do the same with solve_disambiguation.py, but I had no time yet. What about rather introducing a browseropen() method to class Page?
yes/no: we should indeed have a single function to open a browser for a certain Page object, but I think it shouldn't be a function /in/ the Page object, but rather a 'helper' function somewhere (as it doesn't actually do anything with the object except getting the url). So something like: pywikibot.utils.openbrowser(Page(...)).
I think any error message during this process shall appear in webbrowser, not the pywiki script, am I right?
I'm not sure what you mean with this. It just opens the url in a browser; if the url does not exist, this will give you an error message in the browser. But apart from the url, there is no communication between the bot and the browser (so for instance it won't give you a window with the applied changes). Does this answer your question?
Best, Merlijn