blob: f6891a929241a23e6a83c70d5b1e146d26a61caa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
load 'mwapi.rb'
require 'yaml'
require 'pp'
mw = MWApi.new('https://wiki.parabolagnulinux.org/api.php')
credentials = YAML.load_file('credentials.yml')
mw.login(credentials['username'], credentials['password'])
users = []
aufrom = ''
while not aufrom.nil? do
audata = mw.query(
:list => :allusers,
:aurights => :autopatrol,
:aulimit => 5000,
:aufrom => aufrom)
users.concat(audata['query']['allusers'])
aufrom = (audata['query-continue'].nil?) ? nil : audata['query-continue']['allusers']['aufrom']
end
users.each do |user|
print "#{user['name']}\n"
end
|