tbfisher / sublimetext-Pandoc

A Sublime Text plugin that uses Pandoc to convert text from one markup format into another. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, OPML, or Haddock markup to XHTML, HTML5, HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides, Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, EPUB version 2 or 3, FictionBook2, DocBook, GNU TexInfo, Groff man pages, Haddock markup, OPML, LaTeX, ConTeXt, LaTeX Beamer slides, PDF via LaTeX, Markdown, reStructuredText, AsciiDoc, MediaWiki markup, Emacs Org-Mode, Textile, or custom writers can be written in lua.
MIT License
137 stars 26 forks source link

Add support for MediaWiki #11

Closed markgrovs closed 10 years ago

markgrovs commented 10 years ago

This does require having Mediawiker package installed.

select commented 6 years ago

@markgrovs how does it work, I installed the package but I still cannot see the option in the pandoc popup to translate to mediawiki language?

markgrovs commented 6 years ago

Make sure you install https://github.com/tosher/Mediawiker into Sublime

select commented 6 years ago

I did that, but it did not change the options in the pandoc menu. Maybe I'm thinking in the wrong direction here. I'm trying to convert a markdown file to mediawiki syntax. I installed pandoc and mediawiker plugins (did not configure anything). In the markdown file I'm calling ctrl+p "pandoc" then I get a list of languages I can translate to which is missing mediawiki. Is that the way it should work?

markgrovs commented 6 years ago

Double check your pandoc-settings file it looks like my addition was removed back in this change: https://github.com/tbfisher/sublimetext-Pandoc/commit/f5cdc733b13d72247db37a4abeade3c24703aab1#diff-51bd1dd35c7202f7482d0399ff93f06d

select commented 6 years ago

Yeah the whole config file structure changed, you gave me the right hint and I managed to convert to media wiki by adding a new tranformation entry in the config

    "transformations": {
      "Media Wiki": {
        "new-buffer": 1,
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown"
        },
        "pandoc-arguments": ["-t", "mediawiki"]
      },
...

However it did not work when i was adding this to the user config.

Overall I do not get why the transformation list is so small when pandoc can convert into so many formats. For a user of this plugin that does not go all the way to find out how to add own transformations I guess this would be a bit disappointing.