Hello, there is this very nice export to text feature and the superb HTML export. But is it possible to convert org to some rich text notation used in wikis? I would like to include some of my documents into a wiki (dokuwiki and TWiki/Foswiki). And if there is no such feature yet, where do I have to start to implement it? Thank you Uwe Koloska
Hi Uwe, Uwe Koloska <uwe@koloro.de> writes: > Hello, > > there is this very nice export to text feature and the superb HTML export. But > is it possible to convert org to some rich text notation used in wikis? I > would like to include some of my documents into a wiki (dokuwiki and > TWiki/Foswiki). > And if there is no such feature yet, where do I have to start to implement it? This doesn't exactly answer your question, but for a quick and dirty wiki conversion, I export an outline (or subtree) to html and then use the perl script html2wiki to convert to the appropriate format. http://diberri.dyndns.org/wikipedia/html2wiki/ It would be easy enough, I imagine, to create a script that combines the two steps. Obviously, this would only be a one-way conversion, from org files to wiki. Carsten addresses the possibility of a two-way conversion via an intermediate list format at the end of his Google text talk, but as far as I know, that is still only an idea. http://orgmode.org/GoogleTech.html My dream is for wiki software that uses org files as its backend, thus enabling community editing of org files via the web. But that, of course, is only a dream at this point. Best, Matt
Uwe Koloska <uwe@koloro.de> writes: > Hello, > > there is this very nice export to text feature and the superb HTML export. But > is it possible to convert org to some rich text notation used in wikis? I > would like to include some of my documents into a wiki (dokuwiki and > TWiki/Foswiki). > And if there is no such feature yet, where do I have to start to implement it? > Hi, I believe the only export targets currently supported are html, xoxo, ascii, and latex. The first place to look for adding a new export format would be the org-exp.el file in ~/lisp/org-exp.el (where ~ is the root of your org-mode git directory). See the function `org-export-preprocess-string' and specifically the let binding at the beginning which sets the htmlp, asciip, latexp, variables which indicate the export target. I would be the place to start reading to see how exporting in org-mode works. You may want to implement the new export in a new file separate from the org-exp.el file. This would be a good idea if the new export targets might not be of wide enough applicability to actually change org-exp.el (a fairly central org file). Best of luck -- Eric > > Thank you > Uwe Koloska > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Uwe Koloska <uwe <at> koloro.de> writes: > there is this very nice export to text feature and the superb HTML export. <snipped> > And if there is no such feature yet, where do I have to start to implement it? +1 for me. I need at least two more exporters, maybe more -- they may be of different level of generality/use to other org users. If I can get a handle on it I'll try my hand. As I understand (and Eric points out) org-exp.el is the central place to start looking, but I gather that there is also another more data-oriented approach experimentally supported by some Bastien code. I remember Carsten talking about it some 2-3 months back that something like this (entire org mode buffer as a lisp (property) list or something to that effect) but that its not (yet then) integrated into the rest of org. So tips/pointers on this will be welcome. Rustom
> My dream is for wiki software that uses org files as its backend, thus > enabling community editing of org files via the web. But that, of > course, is only a dream at this point. > > I use PmWiki (http://www.pmwiki.org) for lots of things. It stores pages in a sort of plain text format. However, it's possible to use your own markup rules, so in principle it could be used with org files. See http://www.pmwiki.org/wiki/PmWiki/CustomMarkup for more details of using custom markup rules. Ian.
Hi Ian, Ian Barton <lists@manor-farm.org> writes: >> My dream is for wiki software that uses org files as its backend, thus >> enabling community editing of org files via the web. But that, of >> course, is only a dream at this point. >> >> > I use PmWiki (http://www.pmwiki.org) for lots of things. It stores > pages in a sort of plain text format. However, it's possible to use > your own markup rules, so in principle it could be used with org > files. Yes, I use PmWiki myself and think it's great. However, custom markup rules would work only as a partial solution here, since PmWiki stores pages (with all diffs) in its own peculiar flat file format that can't really be edited directly. (Take a look at the files in your wiki.d directory.) I suppose one could create org markup rules for Pmwiki and then edit the pages in org-mode via w3m. There is also a defunct pmwiki-mode for emacs that pulls PmWiki pages off a website for editing. For org-mode/wiki integration, oddmuse might be a good choice, since its stores each pages as a very simple plain text file. In fact, a quick google search revealed some efforts to create org-mode markup for oddmuse a year ago. - http://www.oddmuse.org/cgi-bin/oddmuse/Comments_on_Writing_Extensions - http://article.gmane.org/gmane.emacs.orgmode/4032 I'll have to investigate further. - Matt
Wow - PmWiki looks great!
Thanks!
Matthew Lundin <mdl@imapmail.org> writes:
> Hi Ian,
>
> Ian Barton <lists@manor-farm.org> writes:
>
>>> My dream is for wiki software that uses org files as its backend, thus
>>> enabling community editing of org files via the web. But that, of
>>> course, is only a dream at this point.
>>>
>>>
>> I use PmWiki (http://www.pmwiki.org) for lots of things. It stores
>> pages in a sort of plain text format. However, it's possible to use
>> your own markup rules, so in principle it could be used with org
>> files.
>
> Yes, I use PmWiki myself and think it's great. However, custom markup
> rules would work only as a partial solution here, since PmWiki stores
> pages (with all diffs) in its own peculiar flat file format that can't
> really be edited directly. (Take a look at the files in your wiki.d
> directory.)
>
> I suppose one could create org markup rules for Pmwiki and then edit the
> pages in org-mode via w3m. There is also a defunct pmwiki-mode for emacs
> that pulls PmWiki pages off a website for editing.
>
> For org-mode/wiki integration, oddmuse might be a good choice, since its
> stores each pages as a very simple plain text file. In fact, a quick
> google search revealed some efforts to create org-mode markup for
> oddmuse a year ago.
>
> - http://www.oddmuse.org/cgi-bin/oddmuse/Comments_on_Writing_Extensions
>
> - http://article.gmane.org/gmane.emacs.orgmode/4032
>
> I'll have to investigate further.
>
> - Matt
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http: www.emma-stil.de
On Jan 19, 2009, at 8:05 AM, Rustom Mody wrote: > Uwe Koloska <uwe <at> koloro.de> writes: > >> there is this very nice export to text feature and the superb HTML >> export. > <snipped> >> And if there is no such feature yet, where do I have to start to >> implement it? > > +1 for me. > > I need at least two more exporters, maybe more -- they may be of > different level of generality/use to other org users. > If I can get a handle on it I'll try my hand. > > As I understand (and Eric points out) org-exp.el is the central place > to start looking, but I gather that there is also another more > data-oriented approach experimentally supported by some Bastien code. > I remember Carsten talking about it some 2-3 months back that > something like this (entire org mode buffer as a lisp (property) list > or something to that effect) but that its not (yet then) integrated > into the rest of org. That code is in the EXP subdirectory of the git repo, in the file org-export.el. It is not very well integrated yet, and it also does only a partial parsing job, basically the document structure and the meta data. I did have high hope for this a while ago, it could have become the basis for a new general export engine. But I think that dream is gone - unless someone picks it up now. Basic approach would be: - start with org-export.el. - enhance the parser so that it will at least do plain lists - there is an excellent list parser (org-parse-list, also by Bastien) in org-list.el. - use that to split the "content" part of each entry into sub blocks like (paragraph "text") (ordered-list bullet-type item1 item2 ....) (unordered-list bullet-type item1 item2 ....) or similar, where item is some kind of structure that also holds information about a possible check box and its state. - Also find a way to put setup information like #+STARTUP etc into structured elements. When this is done, write a function that can write a valid Org file from such a list, and you have written an org-to-org converter, with the practical application to normalize Org files. Then you can start writing wiki converters, with using the list structure as the common intermediate format. My personal feeling is right now that we will not anymore *replace* the HTML and LaTeX exporters with this new exporter, because too much specialized work has gone into making these really quite nice and feature rich. However as a basis for any new exporters, and in particular as an engine to read an write wiki formats, this could really work very well. I will be ready help with advice, but I will not do this myself. - Carsten > > > So tips/pointers on this will be welcome. > > Rustom > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
I have a start on a wiki syntax exporter that I took by modifying the latex exporter (some wikis have quite extensive markup). Here's what I would like to suggest: 1. There are an infuriatingly large number of different wiki syntaxes. I'd like to suggest that we should avoid having to write a zillion different standalone exporters. 2. Emacs lisp doesn't have object-oriented programming to help with this, but we can simulate it with tables of functions. So, for example, we could have vectors with entries for functions that format italicized text for media-wiki, tiki wiki, etc. 3. A first job would be to make a list of all of the kinds of export that we see in the latex exporter, and define a structure that provides entries for all of these export types. If we do the above, we can hijack the top-level export routine from, e.g., latex export, and then plug in different tables for the different wikis. Feel free to contact me off-line about this; I would be more than happy to work with you on it. Best, Robert
[-- Attachment #1: Type: text/plain, Size: 415 bytes --] Uwe Koloska <uwe@koloro.de> writes: > there is this very nice export to text feature and the superb HTML export. But > is it possible to convert org to some rich text notation used in wikis? I > would like to include some of my documents into a wiki (dokuwiki and > TWiki/Foswiki). Below is another quick hack solution: a simple sed script which does a very basic translation between org-mode and mediawiki. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: org2mediawiki --] [-- Type: text/x-sh, Size: 912 bytes --] #!/bin/sed -f # headlines s/^\* \+\(.*\)$/== \1 ==/ s/^\*\* \+\(.*\)$/=== \1 ===/ s/^\*\*\* \+\(.*\)$/==== \1 ====/ s/^\*\*\*\* \+\(.*\)$/===== \1 =====/ s/^\*\*\*\*\* \+\(.*\)$/====== \1 ======/ # links s/\[\[\(.*\)\]\[\(.*\)\]\]/[\1 \2]/ # description lists s/^- \+\([^:]\+\)::\(.*\)$/; \1:\2/ s/^ \+// # lists s/^- \+\(.*\)$/* \1/ s/^ \{2\}- \+\(.*\)$/** \1/ s/^ \{4\}- \+\(.*\)$/*** \1/ s/^[1-9]\+\. \+\(.*\)$/# \1/ s/^ \{2\}[1-9]\+\. \+\(.*\)$/## \1/ s/^ \{4\}[1-9]\+\. \+\(.*\)$/### \1/ # source code s/^: \+\(.*\)$/ \1/ # emphasis, bold s/\*\([^*]\+\)\*/'''\1'''/ s/ \/\([^/]\+\)\/ / ''\1'' / # quotes s/^#+BEGIN_QUOTE$/<blockquote>/ s/^#+END_QUOTE$/<\/blockquote>/ # comments s/^#+.*$// # tables s/^|[-+]\+|$// s/^|\([^|]*\)|$/|-\n|\1/ s/^|\([^|]*\)|\([^|]*\)|$/|-\n|\1||\2/ s/^|\([^|]*\)|\([^|]*\)|\([^|]*\)|$/|-\n|\1||\2||\3/ s/^|\([^|]*\)|\([^|]*\)|\([^|]*\)|\([^|]*\)|$/|-\n|\1||\2||\3||\4/ [-- Attachment #3: Type: text/plain, Size: 28 bytes --] Hope that helps Christian [-- Attachment #4: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> Yes, I use PmWiki myself and think it's great. However, custom markup
> rules would work only as a partial solution here, since PmWiki stores
> pages (with all diffs) in its own peculiar flat file format that can't
> really be edited directly. (Take a look at the files in your wiki.d
> directory.)
>
> I suppose one could create org markup rules for Pmwiki and then edit the
> pages in org-mode via w3m. There is also a defunct pmwiki-mode for emacs
> that pulls PmWiki pages off a website for editing.
>
Matt,
There is a CVS version of pmwiki-mode, which is fairly up to date. I use
it to edit my own pages. It's currently maintained by Lukasz Stafiniak
<lukstafi@gmail.com>. I'll try and find the url of the CVS repo.
Ian.