-
Notifications
You must be signed in to change notification settings - Fork 4
/
eagle_family.py
51 lines (40 loc) · 1.26 KB
/
eagle_family.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- coding: utf-8 -*-
"""
This is the family file for the EAGLE Wiki.
It should be put in the pywikibot/families folder.
Configuration parameters:
url = http://www.eagle-network.eu/wiki/index.php/Main_Page
name = eagle
Please do not commit this to the pywikibot repository!
"""
from pywikibot import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'eagle'
self.langs = {
'en': 'www.eagle-network.eu',
}
def scriptpath(self, code):
return {
'en': '/wiki',
}[code]
def version(self, code):
# Check me
# http://eagle-network.eu/wiki/index.php/Special:Version
return {
'en': u'1.23',
}[code]
def shared_data_repository(self, code, transcluded=False):
"""Always return a repository tupe. This enables testing whether
the site opject is the repository itself, see Site.is_data_repository()
"""
if transcluded:
return (None, None)
else:
if code == 'en':
return ('en', 'eagle')
else:
return (None, None)
def shared_image_repository(self, code):
return ('commons', 'commons')