Mediawiker

A plugin for Sublime Text editor that adds possibility to use it as Wiki Editor on MediaWiki-based sites like Wikipedia and many other.

OTHER License

Stars
138
Committers
10

Bot releases are hidden (Show)

Mediawiker - Import typo

Published by tosher about 8 years ago

Import typo

Mediawiker - Highlighting & Folding & Popups

Published by tosher about 8 years ago

Source refactoring

  • All commands was moved to its own modules.

Syntax highlighting fixes, improvements

  • Fix: Table highlighting with first row tag omitted (|-).
  • Fix: Highlighting of template parameters lines started from new line with space char before | delimiter - the conflict with space-predefined text.
  • Fix: <gallery> tag with File:\Image: prefix omitted.
  • Fix: <ref> tag highlighting.
  • New: <blockquote>, <center> tags support.

Popup menu

  • Popup menu for selected text.
  • Popup menu for text markup blocks.

Folding

  • Mouse over the gutters folding was replaced with popup menu options. Option mediawiker_use_gutters_folding was removed.
  • Open inline command was replaced with popup menu options (ST2 unsupported).

Snippets

  • New <code> snippet

Known bugs

  • Sublime crash on opening some templates from popup menu without write-permissions.

Note: Restart required after update.

Mediawiker - Page open fix, templates folding improvements

Published by tosher about 8 years ago

  • Fixed bug for page opening with folding gutters.
  • Improved logic for templates folding.
Mediawiker - Text blocks folding possibilities

Published by tosher over 8 years ago

Text blocks folding possibilities

Support folding/unfolding for:

  • Headings - by target header, by header level (2, 3, 4, 5).
  • Templates
  • Tags (customizable list of tags, check mediawiker_fold_tags option). Default: source, syntaxhighlight, div, pre.
  • All text blocks - all templates, tags.

Standard shortcuts:

  • Fold block: Ctrl+Shift+[
  • Unfold block: Ctrl+Shift+]

Gutters folding

  • mediawiker_use_gutters_folding option for switching on/off gutters for text blocks. Default: true
  • Fold text block by moving mouse over the gutter.

New commands

Note! Also available in Tools menu.

  • Fold
  • Fold Level 2
  • Fold Level 3
  • Fold Level 4
  • Fold Level 5
  • Fold text blocks
  • Unfold
  • Unfold Level 2
  • Unfold Level 3
  • Unfold Level 4
  • Unfold Level 5
  • Unfold text blocks
Mediawiker - Page preview default <head> value in the settings

Published by tosher over 8 years ago

Page preview command

  • Default <head> part of preview html was moved to settings parameter mediawiki_preview_head as Jinja2 template.

Note! Data, defined by preview_custom_head parameter (in wiki host's parameters) will be used instead of data, defined by mediawiki_preview_head. If both values are required, needs to define all lines in preview_custom_head.

New variable

  • {{ geshi_css }} - dynamic GeSHi Source Highlighting css rules, based on page's source (both tags source and syntaxhighlight are supported).
Mediawiker - Page preview: custom head as Jinja2 template

Published by tosher over 8 years ago

Page preview command

  • Parameter preview_custom_head is a Jinja2 template (splitted by lines).

Variables changed

Variables are Jinja2 template variables:

  • {{ http }} - site protocol value (http/https), based on https parameter.
  • {{ host }} - site address value, based on host parameter.
  • {{ path }} - api path value, based on path parameter.
  • {{ lang }} - lang value, based on global mediawiki_preview_lang parameter.
Mediawiker - Page preview: geshi highlighting, custom head tags

Published by tosher over 8 years ago

Page preview command

  • Dynamic generation of geshi highlighting css.
  • Possibility to add custom lines to <head></head> part of preview html page for advanced css or javascript using:

Parameter preview_custom_head with list of lines, for example:

        "English wikipedia":
        {
            "domain": "",
            "host": "en.wikipedia.org",
            "https": true,
            "pagepath": "/wiki/",
            "password": "",
            "path": "/w/",
            "username": "",
            "preview_custom_head": [
                "<link rel=\"stylesheet\" href=\"/w/load.php?debug=false&amp;lang=%(lang)s&amp;modules=site&amp;only=styles&amp;skin=vector\"/>", 
                "<link rel=\"stylesheet\" href=\"/w/load.php?debug=false&amp;lang=%(lang)s&amp;modules=user.groups&amp;only=styles&amp;skin=vector&amp;\"/>",
                "<script async=\"\" src=\"%(http)s://%(host)s%(path)sload.php?debug=false&amp;lang=%(lang)s&amp;modules=startup&amp;only=scripts&amp;skin=vector\"></script>"
            ]
        }

Variables in strings

Wiki site based variables available in strings:

  • %(http)s - site protocol value (http/https), based on https parameter.
  • %(host)s - site address value, based on host parameter.
  • %(path)s - api path value, based on path parameter.
  • %(lang)s - lang value, based on global mediawiki_preview_lang parameter.
Mediawiker - Notifications sorting, read sign char

Published by tosher over 8 years ago

Get notifications command

  • Notifications sorting by read property.
  • Notifications read sign characters in the settings. Parameter mediawiki_notifications_read_sign, default value: \u2713 (✓).
Mediawiker - Fixes, improvements

Published by tosher over 8 years ago

Mediawiker - Notifications as list and dict support

Published by tosher over 8 years ago

Mediawiker - Requests params fix

Published by tosher over 8 years ago

Mediawiker - Notifications, improvements

Published by tosher over 8 years ago

Mediawiker 3.0.9

Page preview (beta)

  • Option mediawiki_preview_lang (default: en) - language value, used in preview
  • Option mediawiki_preview_file (default: Wiki_page_preview_):
    • If defined as prefix (default) - preview will be generated as temporary file - new on each try.
    • If defined as filename (like Wiki_page_preview.html) - html preview-file will be generated in User folder, opened in new tab and first time in browser. But if preview-tab is already exists - html file will be regenerated only, without opening in browser - for possibility to just use Reload in browser or some auto-reloading plugins.

Open inline (beta)

As command or from Context menu.

  • Selected text opening as page.
  • Internal link opening by cursor position on it (links with spaces are not supported).
  • Templates in Template and Main (starts with : prefix) namespaces.
  • Scribunto functions

Get notifications (beta)

Show notifications as menu.

Note: must be supported by wiki-site (extension installed or with in-core support).

  • Option mediawiki_notifications_show_all (default: true) - show all or only unread notifications.
  • On opening any page from site - plugin runs the check for new unread notifications.
Mediawiker - Page preview

Published by tosher over 8 years ago

New command: Page preview (beta)

Mediawiker - Dependancies fix for OSX ST2

Published by tosher over 8 years ago

Removed fileio dep. for OSX ST2

Mediawiker - Lists, headings improvements

Published by tosher over 8 years ago

  • H5 headings snippet
  • List ends improvements
  • Headings conversion improvements
Mediawiker - Namespace based syntax setup

Published by tosher over 8 years ago

  • Language independent syntax setup for opened page
Mediawiker - Inline command, scribunto modules pages

Published by tosher over 8 years ago

  • Experimental Open inline command - context menu item for opening pages under cursor.
  • Automatic activation of Lua language syntax for Scribunto module pages (thnx. to @Adadov for idea and pull-request).
Mediawiker - Search improvements

Published by tosher over 8 years ago

  • Configurable markdown syntax for search results page: mediawiki_search_syntax option in the settings. Default value: "Packages/Markdown/Markdown.tmLanguage"
  • Small changes in search results page: search words highlighting, etc.
Mediawiker - Proxy connection fix.

Published by tosher almost 9 years ago

  • Proxy connection fix (support in mwclient library).
  • New snippet: nowiki tag.
  • Lists auto-continuation by Enter key.
Mediawiker - Cached connection, ssl certificate verification option

Published by tosher almost 9 years ago

  • Site option is_ssl_cert_verify for possibility to switch SSL certificate validation on site (for self-signed certificates on corporate wikies). Default value: true.
  • Caching site connection
Related Projects