Wikipedia talk:Peachy
Peachy userbox
[edit]This user uses the Peachy PHP bot framework. |
Tisane talk/stalk 08:52, 28 June 2010 (UTC)
Questions
[edit]- Setting
- MW: 1.16.0beta3
- PHP: 5.3.0 (apache2handler)
- Peachy: 0.1beta
- I use xampp 1.7.2 with enabled curl (any other packages needed?)
- When I run the hello world example I get
- Logging in to http://localhost/MediaWiki/api.php... Successfully logged in to http://localhost/MediaWiki/api.php as WikiSysop
- Getting page info for Foobar..
- User is not allowed to edit
- Question: I have no idea why my admin should not have the rights to edit. I did some debugging and apparently following methods just return empty results:
$tokens = $this->apiQuery( array( 'action' => 'query', 'prop' => "info", 'titles' => 'Main Page', 'intoken' => 'edit|delete|protect|move|block|unblock|email|import' ));
Deeper:
$data = unserialize( $this->get_http()->get( $this->base_url, $arrayParams ));
- Any help would be highly appreciated. —Preceding unsigned comment added by 141.3.192.167 (talk) 10:58, 20 July 2010 (UTC)
- Is the User:Your_User_Name/Run page existent? Does the user have the bot flag? (Not sure if those matter but I'm reaching at straws here) Tisane talk/stalk 17:36, 20 July 2010 (UTC)
- Thanks for your answer. Unfortunately, both WikiSysop/Run and bot flag are already set...
- As another possible cause: Can you please tell me the prerequisites of peachy?
- —Preceding unsigned comment added by 86.186.98.16 (talk) 23:35, 20 July 2010 (UTC)
- By looking at the apache logs I just found out that when peachy connects to my MediaWiki it uses "&" in the URLs. With them no proper result is given back. When I use only "&" instead, I get back the necessary tokens. Do you know, why Peachy does that? —Preceding unsigned comment added by 81.130.71.231 (talk) 23:56, 21 July 2010 (UTC)
- As a temporal work-around I changed HTTP.php on lines 119 to 122 to this:
if( !is_null( $data ) && is_array( $data ) ) { #$url .= '?' . http_build_query( $data ); $url .= '?' . http_build_query( $data, "", "&" ); }
- Would be great if anyone could comment on that change. Cheers. —Preceding unsigned comment added by 81.130.71.231 (talk) 08:54, 22 July 2010 (UTC)
Can I get the same type of display for page differences as on the Wikipedia via Peachy?
[edit]I've tried various options in http://compwhizii.net/peachy/wiki/Plugin:Diff but I can't get any of the options to produce a display of version differences that match how differences are shown in the Wikipedia. Is Peachy supposed to be able to produce the same diffs as the Wikipedia display? --Thanks, RaymondYee (talk) 19:16, 22 September 2010 (UTC)
- It's in a bug for a future version: http://code.google.com/p/mw-peachy/issues/detail?id=59 It's likely to be a pretty simple fix, so it should be in the next official release. (X! · talk) · @886 · 20:16, 22 September 2010 (UTC)
wiki->allpages() doesn't work if $limit is specified
[edit]I am using Peachy:
nightly:peachy 2010-08-30T02:08:09.581873Z 310
With:
Mediawiki 1.15.3 PHP 5.2.4.2
If I invoke wiki->allpages(); it returns 50 pages (I have more) if I invoke wiki->allpages{$limit=n); where n = 1 - 500, an error: code snippet:
$wiki = Peachy::newWiki( "icdwiki" ); print_r( $wiki->allpages($limit = 100));
error:
API Error... Code: apunknown_apnamespace Text: Unrecognized value for parameter 'apnamespace': 100 Warning: Invalid argument supplied for foreach() in /var/www/wikiBots/Peachy/Includes/Wiki.php on line 699 Array ( )
If I add $namespace to method:
print_r( $wiki->allpages($namespace= 0, $limit = 100));
no error but no results returned. —Preceding unsigned comment added by Sdatpatrp75 (talk • contribs) 17:35, 14 October 2010 (UTC)
Mwreleases.php really necessary?
[edit]I was curious about the reason for this class. I noticed the class when the compwhizii.net site was down and I tried to run the bot. The bot tries to connect to see what version it is (vs. the latest available). The problem that I note with this is that in the event someone decides to use the bot in a local environment (or your server dies, as is the case here), the bot is unusable. The "unserialize" call running off of $pgHTTP->get() will stop PHP execution because the get fails.
I see that it's a cute feature to have a "hey, update me!" in the bot. But if its implemented like this, it is doing the users a disservice. I think that a more graceful failure is a more robust approach.
On a side note, why is it that Peachy only supports 1.15 and up? Is it because that is all the developer team wanted to officially support? That's fine, but if someone has 1.14, etc. and wants to try Peachy, they can't because the version checking/blocking in the current codebase. In this situation I think it would be more appropriate to warn the user and allow them to go ahead and use the bot, not terminate execution.
Thanks Tsx11 (talk) 02:06, 15 November 2010 (UTC)
- Modifications? I made some minor modifications to use the cURL auth in case a user is using the bot on a password protected server (because you want to test it on a devel machine before going live). What should I do with the incredibly small code snippet?? Tsx11 (talk) 10:15, 16 November 2010 (UTC)
- I have removed the verison checking from the current version of the bot, in the SVN trunk. I'll branch that off and push it into the nightly when I get a chance. (X! · talk) · @709 · 16:00, 28 November 2010 (UTC)
Links
[edit]The external links to the Peachy wiki are down. They seem to have been for a while, and I currently can't find them on google. As such, it's hard to make any changes at the moment because I don't know how on occasion. Magog the Ogre (talk) 04:19, 28 November 2010 (UTC)
- It seems like Compwhizii is unwilling to bring the wiki back up, so chances are, it will stay down. I did manage to recover roughly 100 pages from Google's cache before they expired, so i have backups of some of the wiki. However, I haven't done anything with them as of yet. The most recent version of Peachy in the trunk has the checking removed, so it shouldn't give any errors. I'll branch it off into 1.1 at some point. (X! · talk) · @710 · 16:01, 28 November 2010 (UTC)
Shoot. I'm not going to lie, I had to make some edits to Peachy due to bugs in it, so I won't be able to pick up the newest branch without some work. And can you tell me, um, how to turn off all those pesky display messages again? I know they're in there somewhere, I just forget how. You know, these that plug up my stderr:
Getting page info for X..
Getting page content for X..
Getting page history for X..
Magog the Ogre (talk) 02:26, 30 November 2010 (UTC)
- Add this to your config:
verbose = "WARN|ERROR|FATAL"
- Also, if you have bugs, could you please report them so they could be fixed? (X! · talk) · @161 · 02:52, 30 November 2010 (UTC)
Compwhizii down
[edit]Well this isn't very pleasant... Compwhizii is now down, which causes the entire framework to fail. As such, FYI, I replaced line 32 of /Plugins/mwreleases.php with the following:
$ret; try {$ret = unserialize( $pgHTTP->get( 'http://compwhizii.net/peachy/wiki/api.php?action=mwreleases&format=php' ) );} catch (CURLError $e) {return;}
This made it work; I recommend putting it in your product. Magog the Ogre (talk) 01:52, 17 June 2011 (UTC)
Hooks
[edit]So what exactly are hooks? Your code makes a comment to http://compwhizii.net/peachy/wiki/Manual/Hooks , but of course that's no longer up. (on another note, I feel like I'm the only person using your interface!) Magog the Ogre (talk) 02:38, 28 June 2011 (UTC)
- Use the Internet Archive: https://web.archive.org/web/20100730055711/http://compwhizii.net/peachy/wiki/Manual/Hooks Yev Yev (talk) 15:44, 20 September 2014 (UTC)
template plugin
[edit]Template pluging does recognizes just exact matches like {{templat_name}} while wiki understands various tricks like {{my_experimental_te<!-- comment inside the name -->mplate_name <!-- comment after a space -->}} as you could see here: {{my_experimental_template_name }}. I would prefer the framework to locate any templates forms allowed by mediawiki. Mashiah (talk) 22:10, 7 October 2011 (UTC)
Peachy Manual
[edit]I could use a Peachy manual right about now. The link to it is dead. I'm trying to figure out how Peachy is working. I know the basics of it, pushing an edit, calling information and whatnot but I would like to know the complexities of it and reading the code just isn't helping because search for the subfunction after another.—cyberpower ChatOnline 13:53, 26 May 2012 (UTC)
"archiving 8 sources" in article is not understood
[edit]A recent edit to the Matriarchy article included in the edit summary that Peachy was "archiving 8 sources". The diff didn't show 8 changes of any kind, just one of a different kind. What does "archiving 8 sources" mean? Nick Levinson (talk) 17:47, 29 August 2015 (UTC)
- Ditto. I have a number of these archiving changes shown on my watchlist. But none of the few I've checked seemed to be useful changes. One added an archive page that that isn't an archived page, another added the {{wayback}} template but not in way that is visible to the reader. I think I understand the intention (to add archiveurl links to otherwise dead links?) but they don't seem to be working. Kerry (talk) 04:28, 30 August 2015 (UTC)
- For example, this edit and this edit Kerry (talk) 04:32, 30 August 2015 (UTC)
- In Gold Coast, Queensland there were 11 changes of which about half are not to valid archive pages. I appreciate a bot can sometimes make mistakes but the error rate of these changes is well above what can be considered acceptable by a bot as its errors are very time-consuming to fix as all 11 changes were done as a single edit. I have tried fixing them in some articles but it is just too much work to fix the errors made by this bot that show up on my watchlist. Please try eliminate its more common errors (archive pages like [1] or this. Kerry (talk) 05:49, 30 August 2015 (UTC)
- Now I understand what was meant, and now I see three errors.
- By "archiving 8 sources" you didn't mean that you moved 8 sources in the article to an archive, similar to how we archive talk page topics. You meant that you converted 8 source citations to archive.org source cites. I suggest editing the phrase to use a less ambivalent verb.
- Another problem is that Peachy apparently can't count. In the diff I linked to above, Peachy had converted only one citation, not 8. The same edit summary said "[r]escuing 1 sources", when the correct count of rescues was zero.
- The third problem is that when Peachy wants an archive.org page because the page it wants to replace says something like "404 - Page Not Found", it shouldn't replace it with an archive.org page that also says "404 - Page Not Found". Instead, it should leave the citation that's not to archive.org in the article, and, if necessary, tag it as defective (dead or whatever).
- Nick Levinson (talk) 01:03, 2 September 2015 (UTC)
Heading on talk page messages
[edit]When this tool is used to leave talk page messages, it should either use a helpful section heading or use the same month-based section headings that TWINKLE does. Issuing level 2 warning about removing AfD template from articles before the discussion is complete. (Peachy 2.0 (alpha 8))
is fine for an edit summary, but using it as a heading like Cyberbot I did at Special:Diff/778283984 is unhelpful at best, and completely confusing to new users at worst. --Ahecht (TALK
PAGE) 14:51, 2 May 2017 (UTC)
Passing through
[edit]I only came here to ask if Peachy made a mistake here. As for my edit, it really disrupts your reading having to hit a link to find out what the initials mean. With my edit all you have to do is hover your mouse over the link to find out. If you could explain why you reverted my edit, other than for just plain courtesy, I can usually figure some other way. 50.64.119.38 (talk) 07:28, 22 November 2017 (UTC)
Is this possible?
[edit]I’m not a professional programmer, but I’ve fooled around with php enough to to figure out a task with enough time. That said, I have a page full of links to pages that need to be created, and they really only need to have the same starting wiki text, but I don’t want to manually create the pages if I don’t have too. Using this framework, could I accomplish this with a bot? The1gofer (talk) 20:38, 5 January 2019 (UTC)
- @The1gofer: I don't know about using peachy, but creating a template and a script should be pretty easy. That said, I suggest you read WP:MASSCREATION before continuing. --DannyS712 (talk) 10:56, 13 February 2019 (UTC)
How can I start Peachy?
[edit]The READ-ME wasn’t exactly clear on installing. E Super Maker (😲 shout) 01:10, 1 January 2020 (UTC)