RE: Admin Tool / MW .Net API/Bot + more

Happy New Year everyone!

 

If anyone wants to know more about my layer between .Net/C# and the
JS-Engine, I put together a little summary with examples:
http://frozenice.de/blog/jurassic-tools/

 

Also, when I first told Ryan about my idea to create a MediaWiki bot and
explained the "controlled via JS" part, we jokingly said it would be cool to
build an IRC bot, also controlled via JS. Uhm yeah, that bot is now running
in #webplatform-bot, announcing recent changes (edits, new users). Looks
something like this:

 

New User: Longsonr

Edited Page: svg/elements/feComponentTransfer (by Longsonr, -292 Bytes) ~
http://wpd.mx/svg/elements/feComponentTransfer

File Change: File:70sposter.png (by Sencha) [example of a discrete component
transfer] ~ http://wpd.mx/File:70sposter.png

New User: Julianharty

Edited Page: tutorials (by Julianharty, +50 Bytes) [Added the missing link
to the Testing web apps tutorial page.] ~ http://wpd.mx/tutorials

 

 

It's built from scratch and pretty basic, but it helps me test/debug the MW
API part and everything else. :) We can use it for other things, too, once
it's stable enough. The script itself is just about 2 functions with 30
lines of code each, you can take a look at it here:
http://fro.privatepaste.com/4006e0ea93 (20 more not shown lines at the top
are for configuring settings (server, nickname) and auto-joining the channel
on connect)

 

The wpd.mx domain is a redirector to the Docs, btw. I got tired of typing
the full thing (in other peoples' browsers), so I got this. We could also
introduce some special slugs for Doc Sprints and the like, e.g. wpd.mx/start
-> Getting Started Guide.

 

Speaking of Doc Sprints, Andre Jay Meissner and me are putting together a
nice dashboard for Doc Sprints, stay tuned for more info on that!

 

-fro

 

-----Original Message-----
From: frozenice [mailto:frozenice@frozenice.de] 
Sent: Sonntag, 16. Dezember 2012 04:17
To: public-webplatform@w3.org
Cc: ryan@ryandlane.com
Subject: Admin Tool / MW .Net API/Bot

 

Hi,

 

as all good things come in threes, here's my 3rd thread for the night (huh,
it's actually kinda late at night already here).

 

Some of you already know that I'm working on what the topic says. I wanted
to share some information on progress.

 

What's this about? Basically, I'm creating a program in C# that abstracts
the MediaWiki API. Nothing new here,

the awesome part however is, this bot can be controlled via JavaScript (I'm
using a .Net JS Engine called Jurassic).

 

Why JS? Because it's easy to use. I feel it's a lot easier than python, so
more people should be able to use it

(comparing with pywikipediabot here). Also, we teach one or two things about
JS in the docs. :)

 

Oh, did I mention it not only runs on Windows, but also on Linux / OS X via
Mono? It does.

 

What has it to do with WPD? Well, the current vision is, to use this to fuel
our 'admin tool'. It could fetch

information about pages, categories, files, etc. (a web interface would
nicely display all that stuff). It

could also be used to run automated tasks (mass-edit / -move, regular checks
/ cleanups, some tasks could

automatically fill our bug-tracker based on certain rules).

 

Possibly the best thing (maybe not for us, but in general) could be to allow
users to run custom scripts

(which they write in JS) against the API. These would then create tasks,
which will have to be approved by

an admin, maybe including some preview of what will be done. This wouldn't
stop people from running their

own copy of the bot, of course, as the MW API is public (there's a writeapi
right, tough).

 

Sounds interesting? You can check out a sample script here
<http://fro.privatepaste.com/9ed0f985ff>
http://fro.privatepaste.com/9ed0f985ff

 

There's not much MW API stuff yet, most of my time went into the .Net <-> JS
interfacing. Another awesome feature is,

the program can also be used in other .Net projects (it can be included as a
library). All the API and helper classes

can be used, they aren't bound to JS.

 

If everything works out ok, this will also be good news for .Net+JS folks,
as you only need to write your code in C#

and don't worry about JS specific stuff, as the conversion / wrapping is
done automatically and even external / .Net

framework stuff can be exposed, even cherry-picking class-members is
possible.

 

So yeah, that's what I'm working on, when I get some rare spare time and
yes, C# and JS are my 2 favorite languages

and no, I don't use TypeScript. :)

 

- fro

 

Received on Tuesday, 1 January 2013 15:42:44 UTC