Code Monkey home page Code Monkey logo

orgmode-mediawiki's Introduction

orgmode-mediawiki

A mediawiki export for Emacs org-mode

Installation

  • Make sure you are using org-mode version 8.0
  • Clone this repository
  • Add the following to your .emacs files
(add-to-list 'load-path "~/path/to/orgmode-mediawiki")
(require 'ox-mediawiki)
  • Open a .org document and run org-mw-export-as-mediawiki

orgmode-mediawiki's People

Contributors

gizmomogwai avatar hexmode avatar naokodama avatar pavanky avatar sid-code avatar tomalexander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orgmode-mediawiki's Issues

Menu entry "m" conflicts with the built-in ox-md

In the call to org-export-define-derived-backend the menu entry uses ?m which conflicts with the built-in ox-md (markdown exporter, added in org-mode 8.0.1).

If both ox-md and ox-mediawiki backends are enabled, ox-mediawiki clobbers the C-c C-e m binding.

Perhaps you can use ?M?

org-mode _underline_

I am using an org-mode underscore markup element as in e.g. _word_. AFAICS, Mediawiki does not have its own markup for that, but uses HTML tags.

Are org-mode _underlines_ supposed to work? If not, feature is obviously low priority, but will leave open for comments. Close anytime.

Footnotes

Great tool! Just what I was looking for. However, I do need footnotes to work. I see that it looks like this is work that has not been done yet:

         (footnote-definition . ignore)
         (footnote-reference . ignore)

Is this work planned at all? I know a bit of lisp and would not mind trying my hand at adding this functionality as I have free time, which is not a lot. Have you done any research here, any pointers, gotchas or stuff like that?

Thanks again.

xwiki style links

I didn't see a mechanism to create xwiki style links, but figured other folks might find themselves looking for them as I was. This advice will make the export output xwiki links.

(defun xwiki-link-syntax (orig-fun &rest args)
  "Turns [link text] into [[text>>link]] to satisfy xwiki link formatting"
  (let ((res (apply orig-fun args)))
    (save-match-data
      (if (string-match "\\[\\(.*\\) \\(.*\\)\\]" res)
          (let ((link (match-string 1 res))
                (text (match-string 2 res)))
            (format "[[%s>>%s]]" text link))
        res))))

(advice-add 'org-mw-link :around #'xwiki-link-syntax)

Looking to extend this backend to support "templates", requesting help/advice

I'm trying to use org-mode to export org documents to mediawiki for the gentoo wiki. It uses "templates" for various code blocks, for example

{{Cmd|echo "a command"}}
{{RootCmd|echo "a root command"}}

This ends up looking like this.
image

My question is: Can I already achieve this using orgmode-mediawiki? Or is extending it to add support for these templates required. If it does require extending, how should I go about doing it? I'm an org noob, so this may be not possible, but I was thinking something like this:

#+begin_src bash :template "Cmd"
echo "this is a command"
#+end_src

Output:

{{Cmd|echo "This is a command"}}

Is this possible? Any pointers or tips?

Subtree export

Is subtree export supposed to work? I get the following error on a very simple subtree:

Initializing asynchronous export process
save-current-buffer: Wrong type argument: stringp, (lambda (p status) (let ((proc-buffer (process-buffer p))) (when (eq (process-status p) (quote exit)) (unwind-protect (if (zerop (process-exit-status p)) (unwind-protect (let ((results (with-current-buffer proc-buffer ... ... ...))) (funcall (lambda (output) (with-current-buffer ... ... ... ... ... ... ...)) results)) (unless org-export-async-debug (and (get-buffer proc-buffer) (kill-buffer proc-buffer)))) (org-export-add-to-stack proc-buffer nil p) (ding) (message "Process '%s' exited abnormally" p)) (unless org-export-async-debug (delete-file "/var/folders/03/g441ctw52xjgcv3mhhw3053h0000gn/T/org-export-process2711hlu"))))))
Process 'org-export-process' exited abnormally

if subtree export is supposed to work, please give me a hint on where to look next.

Plain Numbered Lists Don't Export as a Single List

As referenced in #9, list items currently export with new lines in between them which makes each list a new list rather than all part of a single list.

I'm not sure how to fix that just yet. Do you have an idea?

I will say that ox-md does export them in one list block.

Unable to load; emacs 24.3.1 + org 8.2.10

Eager macro-expansion failure: (wrong-number-of-arguments #[(old new) "\302\303�    E\304�\305  FE\207" [old new progn defalias put (quote byte-obsolete-variable)] 6] 3)
Problems while trying to load export back-end `html'
Eager macro-expansion failure: (wrong-number-of-arguments #[(old new) "\302\303�    E\304�\305  FE\207" [old new progn defalias put (quote byte-obsolete-variable)] 6] 3)
define-obsolete-variable-alias: Wrong number of arguments: #[(old new) "ÂÃ�   EÄ�Å  FE�" [old new progn defalias put (quote byte-obsolete-variable)] 6], 3

error exporting

org-babel-exp processing... [17 times]
org-trim: Wrong type argument: stringp, nil
org-babel-exp processing... [17 times]
org-trim: Wrong type argument: stringp, nil

exporting to text and html work fine

org code/verbatim markup causes error

An org file containing the following:

=test=

or

~test~

Causes org-mw-export-to-mediawiki and org-mw-export-as-mediawiki to fail with the message org-mw-verbatim: Wrong type argument: stringp, nil.

org-file-equal-p

I really like the idea of your function and it could be really useful for me to export directly from org to wiki, but I cant seem to get it working. I am able to run the two functions:

`org-mw-export-as-mediawiki' but get the error:
org-export-execute-babel-code: Symbol's function definition is void: org-babel-exp-process-buffer

`org-mw-export-to-mediawiki' and get the error:
org-export-output-file-name: Symbol's function definition is void: org-file-equal-p

Do you know what might cause this problem? Any help is much appreciated.

Johan
org-export-output-file-name: Symbol's function definition is void: org-file-equal-p

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.