Difference between revisions of "SMWConTalk2020-04"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
version=MediaWiki 1.27.3 | version=MediaWiki 1.27.3 | ||
email=wf@bitplan.com | email=wf@bitplan.com | ||
+ | </source> | ||
+ | == ⌘⌘ Derived pywikibot family file == | ||
+ | <source lang='python'> | ||
+ | # -*- coding: utf-8 -*- | ||
+ | from pywikibot import family | ||
+ | |||
+ | class Family(family.Family): | ||
+ | name = 'test' | ||
+ | langs = { | ||
+ | 'en': 'test.bitplan.com', | ||
+ | } | ||
+ | def scriptpath(self, code): | ||
+ | return '' | ||
+ | |||
+ | def isPublic(self): | ||
+ | return False | ||
+ | |||
+ | def version(self, code): | ||
+ | return "1.27.3" # The MediaWiki version used. Very important in most cases. (contrary to documentation) | ||
+ | |||
+ | def protocol(self, code): | ||
+ | return 'http' | ||
</source> | </source> |
Revision as of 15:39, 2 April 2020
<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Comic Sans MS, Calibri, cursive" >
- title
Push your wikifarm pages
with encrypted credential handling- author
Wolfgang Fahl info@bitplan.com- footer
- Lightning Talk
- subfooter
- EMW Con 2020
</slideshow>
⌘⌘ MediaWiki API
- The MediaWiki API allows manipulating your Wiki automatically
There are many implementations for different languages e.g.
Language | Project | By |
---|---|---|
Java | MediaWiki-Japi | BITPlan |
Python | pywikbot | WikiMedia Foundation |
JavaScript | nodemw | Maciej Brencz |
⌘⌘ Dragtop Example
The Dragtop prototype shows how automation could be simplified. A main showstopper on the way to this is how to make the credentials available for the automation without interfering the user experience.
⌘⌘ Encrypted credential storage
- http://mediawiki-japi.bitplan.com/index.php/CommandLine tries simplifying setting up an encrypted INI file
#Mediawiki JAPI credentials for test2
#Mon Mar 16 08:09:44 CET 2020
url=http://test.bitplan.com
cypher=...
scriptPath=
secret=...
user=wf
salt=...
wikiId=test
version=MediaWiki 1.27.3
email=wf@bitplan.com
⌘⌘ Derived pywikibot family file
# -*- coding: utf-8 -*-
from pywikibot import family
class Family(family.Family):
name = 'test'
langs = {
'en': 'test.bitplan.com',
}
def scriptpath(self, code):
return ''
def isPublic(self):
return False
def version(self, code):
return "1.27.3" # The MediaWiki version used. Very important in most cases. (contrary to documentation)
def protocol(self, code):
return 'http'