Browse Source

updates

master
Ben Kurtovic 12 years ago
parent
commit
29f5cc353d
2 changed files with 10 additions and 6 deletions
  1. +9
    -4
      _posts/2011-08-05-earwigbot-progress-wiki-toolset.md
  2. +1
    -2
      css/main.css

+ 9
- 4
_posts/2011-08-05-earwigbot-progress-wiki-toolset.md View File

@@ -4,10 +4,13 @@ title: EarwigBot Progress: Wiki Toolset
description: YAWTF (Yet Another Wiki Tools Framework, or Yet Another... WTF?)
---

__Update Aug 08, 2011__: Some changes made thanks to updates in the new
`feature/tests-framework` branch.

So I've been spending the past week and a half working on EarwigBot's new
wikitools framework thing (to avoid confusion with Mr.Z-man's
`python-wikitools` package, I'm referring to it as "EarwigBot's Wiki Toolset"
in the docs, even though it's `wiki.tools` internally). Basically, it's the
in the docs, even though it's just `wiki` internally). Basically, it's the
interface between EarwigBot and the MediaWiki API.

As Josh put it, this is "the thing that actually makes it work".
@@ -17,8 +20,8 @@ an IRC command):

{% highlight pycon %}

>>> from wiki import tools
>>> site = tools.get_site()
>>> import wiki
>>> site = wiki.get_site()
>>> print site.name()
enwiki
>>> print site.project()
@@ -55,6 +58,8 @@ and pages as well, with intelligent namespace logic:
>>> page = site.get_page("Wikipedia:Articles for creation")
>>> print page.url()
http://en.wikipedia.org/wiki/Wikipedia:Articles_for_creation
>>> print page.creator()
Uncle G
>>> print page.namespace()
4
>>> print site.namespace_id_to_name(4)
@@ -117,7 +122,7 @@ CentralAuth, meaning I can do...

{% highlight pycon %}

>>> es = tools.get_site("eswiki")
>>> es = wiki.get_site("eswiki")
>>> print es.get_user().name()
EarwigBot



+ 1
- 2
css/main.css View File

@@ -47,7 +47,7 @@ div.project-head {
background: -moz-linear-gradient(top, #E3E3E3, #CACACA); /* Firefox 3.6+ */
background: -ms-linear-gradient(top, #E3E3E3, #CACACA); /* IE 10+ (lol) */
background: -o-linear-gradient(top, #E3E3E3, #CACACA); /* Opera 11.10+ */
background: linear-gradient(top, #E3E3E3, #CACACA); /* God-tier */
background: linear-gradient(top, #E3E3E3, #CACACA); /* God-tier */
}

div.project-body {
@@ -61,7 +61,6 @@ div.project-body {
background: -ms-linear-gradient(top, #F9F9F9, #EFEFEF);
background: -o-linear-gradient(top, #F9F9F9, #EFEFEF);
background: linear-gradient(top, #F9F9F9, #EFEFEF); */

}

div.divider {


Loading…
Cancel
Save