Difference between revisions of "SMWConTalk2020-04"

From BITPlan Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{PageSequence|prev=Build Your Own Self Driving Vehicle with Java|category=talk|categoryIcon=picture-o}}
 
{{PageSequence|prev=Build Your Own Self Driving Vehicle with Java|category=talk|categoryIcon=picture-o}}
 
<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Comic Sans MS, Calibri, cursive" >
 
<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Comic Sans MS, Calibri, cursive" >
;title: [[File:WolfgangFahl.png|200px|left|link=https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl]]<br><span style='font-size:150%'>Push<br>your wikifarm pages<br>with<br> encrypted credential handling </span>
+
;title: [[File:WolfgangFahl.png|200px|left|link=https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl]]<br><span style='font-size:75%'>Push<br>your wikifarm pages<br>with<br> encrypted credential handling </span>
 
;author: <span style='font-size:50%'><br> [https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl Wolfgang Fahl] [mailto:info@bitplan.com info@bitplan.com]</span>
 
;author: <span style='font-size:50%'><br> [https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl Wolfgang Fahl] [mailto:info@bitplan.com info@bitplan.com]</span>
 
;footer:  Lightning Talk
 
;footer:  Lightning Talk

Revision as of 16:43, 2 April 2020

<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Comic Sans MS, Calibri, cursive" >

title
WolfgangFahl.png

Push
your wikifarm pages
with
encrypted credential handling
author

Wolfgang Fahl info@bitplan.com
footer
Lightning Talk
subfooter
EMW Con 2020

</slideshow>

⌘⌘ MediaWiki API

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

#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

Note that the password is NOT included and the password clear text feature of pywikibot is NOT used

# -*- 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'

⌘⌘ py-3rdpart-mediawiki

from wikibot.wikibot import WikiBot
wikibot=WikiBot.ofWikiId("test2")
wikibot.site ..