MediaWiki-Uploader Dokumentation: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 33: Zeile 33:
  
 
Tables in Markdown are much more intuitive than in MediaWiki format. If you are using Vim, then installing the vim-table-mode extension will help you generate tables which keep good formatting.
 
Tables in Markdown are much more intuitive than in MediaWiki format. If you are using Vim, then installing the vim-table-mode extension will help you generate tables which keep good formatting.
 
+
{| class="wikitable"
{|
 
 
! '''Header 1'''
 
! '''Header 1'''
 
! '''Header 2'''
 
! '''Header 2'''

Version vom 13. September 2022, 13:54 Uhr

MediaWiki-Uploader

Requires a bot with sufficient rights to edit and create pages. The bot credentials have to be written into the upload script.

Requirements

  • Python 3 (Tested with standard library of Python 3.10)
  • Pandoc (Markdown to MediaWiki conversion)

Usage

Create a Markdown file with the contents for the desired wiki page. Only mandatory metadata is the title of the page to be created or edited. Additional metadata can be used to influence the bot behaviour, like not creating new pages or not editing existing pages. Headers, lists, text or any other type of block should be separated by a newline. To upload execute:

python xinux-wiki file

Examples

Lists

Code blocks

Colours

Tables

Tables in Markdown are much more intuitive than in MediaWiki format. If you are using Vim, then installing the vim-table-mode extension will help you generate tables which keep good formatting.

Header 1 Header 2
column 1 column2
row 3 value 6

Template