WikipediR icon indicating copy to clipboard operation
WikipediR copied to clipboard

Create or edit pages

Open nevrome opened this issue 7 years ago • 7 comments

Any plans to add support for the create and edit capabilities of MediaWiki?

As far as I got it, WikipediR so far only provides methodes to query content - but I would love to have a comprehensive package to also setup and manipulate pages. I guess that could be especially useful for the automatic page creation based on knowledge databases.

I experimented a little bit with the API and httr to write a create function for my own limited purposes. So: If you decide to tackle this, I would be willing to volunteer.

nevrome avatar May 05 '17 21:05 nevrome

Hey! I didn't really have any plans, solely because the authentication method to make it possible and easy is kind of a PITA and super unsafe (transmitting user account and password data through POST query strings). But if you want to branch, build it in and PR, go for it!

Ironholds avatar May 07 '17 06:05 Ironholds

Ok - I see. My test setup allows anonymous editing. The login on the other hand looks complicated.

At the moment I'm not 100% sure where my application is going, but there's a chance, that I finally need user logins via the API. If so, I'll prepare a PR.

nevrome avatar May 07 '17 12:05 nevrome

Yeah, you probably would for the actual release? So, while default-MediaWiki is totally open to anonymous editing a lot of the bigger sites have a load of blockers on anonymous editing that make writing consistently running code for that a pain. Plus from a privacy POV, anonymous editing logs your IP publicly, and I'd be a bad security/privacy/data ethics n erd if I let that be a software library o'mine's default :D

Ironholds avatar May 17 '17 04:05 Ironholds

Here's what I hacked together for my little project. It serves a very specific purpose and I don't know, whether this could be the starting point for a more generic implementation. I guess the login function becomes very complicated, if you try to deal with Second Factor Auth or Captchas...

nevrome avatar May 18 '17 19:05 nevrome

Looks pretty solid! I think(?) API-login is captcha proof and there's still a 2FA-exclusive option.

Ironholds avatar May 18 '17 23:05 Ironholds

@Ironholds Did you see my PR?

nevrome avatar Jun 06 '17 15:06 nevrome

I did! Sorry, dealing with a load of travel and a CRAN backlog

Ironholds avatar Jun 07 '17 06:06 Ironholds