emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export Org files to TWiki format
@ 2009-05-08  4:05 Baoqiu Cui
  2009-05-08  4:18 ` Russell Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Baoqiu Cui @ 2009-05-08  4:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Recently I wrote an XSL stylesheet that converts DocBook documents to
TWiki (http://www.twiki.org/) format, and it can be used to convert Org
files to TWiki format using DocBook exporter as a bridge.  I have used
it to generate some of my recent TWiki documents at work from Org mode
files, and it worked pretty well.  Now Org-mode can be used as a TWiki
editor.

If you are interested, you can get the stylesheet from

   http://docbook2twiki.googlecode.com

The following Elisp function can be used to export Org file to TWiki
using this stylesheet (the only external tool that you need is
``xsltproc''):

(defun org-export-as-twiki ()
  "Export Org file to TWiki."
  (interactive)
  (message "Exporting to TWiki...")
  (let* ((wconfig (current-window-configuration))
	 (docbook-buf (org-export-as-docbook))
	 (filename (buffer-file-name docbook-buf))
	 (base (file-name-sans-extension filename))
	 (twiki-file (concat base ".twiki")))
    (and (file-exists-p twiki-file) (delete-file twiki-file))
    (message "Processing DocBook XML file...")
    (shell-command
     (format "xsltproc --output %s /Users/bcui/docbook2twiki/docbook2twiki.xsl %s"
	     twiki-file (shell-quote-argument filename)))
    (message "Processing DocBook file...done")
    (if (not (file-exists-p twiki-file))
	(error "TWiki file was not produced")
      (set-window-configuration wconfig)
      (message "Exporting to TWiki...done")
      twiki-file)))

Originally I started with writing Org-to-TWiki exporter in Elisp, but
realized that I had to duplicate a lot of code from the DocBook exporter
after 99% of the work was done.  Writing the stylesheet is little harder
for me, but it proves that DocBook exporter can be helpful in some
case. ;-)

Please let me know if you have any comments.

Thanks,
Baoqiu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export Org files to TWiki format
  2009-05-08  4:05 Export Org files to TWiki format Baoqiu Cui
@ 2009-05-08  4:18 ` Russell Adams
  2009-05-08  4:29   ` Baoqiu Cui
  0 siblings, 1 reply; 5+ messages in thread
From: Russell Adams @ 2009-05-08  4:18 UTC (permalink / raw)
  To: emacs-orgmode

You mean FOSWiki, right? ;]

On Thu, May 07, 2009 at 09:05:05PM -0700, Baoqiu Cui wrote:
> Hi,
> 
> Recently I wrote an XSL stylesheet that converts DocBook documents to
> TWiki (http://www.twiki.org/) format, and it can be used to convert Org
> files to TWiki format using DocBook exporter as a bridge.  I have used
> it to generate some of my recent TWiki documents at work from Org mode
> files, and it worked pretty well.  Now Org-mode can be used as a TWiki
> editor.
> 
> If you are interested, you can get the stylesheet from
> 
>    http://docbook2twiki.googlecode.com
> 
> The following Elisp function can be used to export Org file to TWiki
> using this stylesheet (the only external tool that you need is
> ``xsltproc''):
> 
> (defun org-export-as-twiki ()
>   "Export Org file to TWiki."
>   (interactive)
>   (message "Exporting to TWiki...")
>   (let* ((wconfig (current-window-configuration))
> 	 (docbook-buf (org-export-as-docbook))
> 	 (filename (buffer-file-name docbook-buf))
> 	 (base (file-name-sans-extension filename))
> 	 (twiki-file (concat base ".twiki")))
>     (and (file-exists-p twiki-file) (delete-file twiki-file))
>     (message "Processing DocBook XML file...")
>     (shell-command
>      (format "xsltproc --output %s /Users/bcui/docbook2twiki/docbook2twiki.xsl %s"
> 	     twiki-file (shell-quote-argument filename)))
>     (message "Processing DocBook file...done")
>     (if (not (file-exists-p twiki-file))
> 	(error "TWiki file was not produced")
>       (set-window-configuration wconfig)
>       (message "Exporting to TWiki...done")
>       twiki-file)))
> 
> Originally I started with writing Org-to-TWiki exporter in Elisp, but
> realized that I had to duplicate a lot of code from the DocBook exporter
> after 99% of the work was done.  Writing the stylesheet is little harder
> for me, but it proves that DocBook exporter can be helpful in some
> case. ;-)
> 
> Please let me know if you have any comments.
> 
> Thanks,
> Baoqiu
> 
> 
> 
> _______________________________________________
> 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
> 


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export Org files to TWiki format
  2009-05-08  4:18 ` Russell Adams
@ 2009-05-08  4:29   ` Baoqiu Cui
  2009-05-08  4:33     ` Russell Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Baoqiu Cui @ 2009-05-08  4:29 UTC (permalink / raw)
  To: emacs-orgmode

Hi Russell,

Russell Adams <RLAdams@AdamsInfoServ.Com> writes:

> You mean FOSWiki, right? ;]

This is surprising news to me!  I was not aware of the existence of
Foswiki!  Thanks for the info!  Foswiki looks very nice.

Hope that Foswiki syntax is compatible with TWiki.

Baoqiu


> On Thu, May 07, 2009 at 09:05:05PM -0700, Baoqiu Cui wrote:
>> Hi,
>> 
>> Recently I wrote an XSL stylesheet that converts DocBook documents to
>> TWiki (http://www.twiki.org/) format, and it can be used to convert Org
>> files to TWiki format using DocBook exporter as a bridge.  I have used
>> it to generate some of my recent TWiki documents at work from Org mode
>> files, and it worked pretty well.  Now Org-mode can be used as a TWiki
>> editor.
>> 
>> If you are interested, you can get the stylesheet from
>> 
>>    http://docbook2twiki.googlecode.com
>> 
>> The following Elisp function can be used to export Org file to TWiki
>> using this stylesheet (the only external tool that you need is
>> ``xsltproc''):
>> 
>> (defun org-export-as-twiki ()
>>   "Export Org file to TWiki."
>>   (interactive)
>>   (message "Exporting to TWiki...")
>>   (let* ((wconfig (current-window-configuration))
>> 	 (docbook-buf (org-export-as-docbook))
>> 	 (filename (buffer-file-name docbook-buf))
>> 	 (base (file-name-sans-extension filename))
>> 	 (twiki-file (concat base ".twiki")))
>>     (and (file-exists-p twiki-file) (delete-file twiki-file))
>>     (message "Processing DocBook XML file...")
>>     (shell-command
>>      (format "xsltproc --output %s /Users/bcui/docbook2twiki/docbook2twiki.xsl %s"
>> 	     twiki-file (shell-quote-argument filename)))
>>     (message "Processing DocBook file...done")
>>     (if (not (file-exists-p twiki-file))
>> 	(error "TWiki file was not produced")
>>       (set-window-configuration wconfig)
>>       (message "Exporting to TWiki...done")
>>       twiki-file)))
>> 
>> Originally I started with writing Org-to-TWiki exporter in Elisp, but
>> realized that I had to duplicate a lot of code from the DocBook exporter
>> after 99% of the work was done.  Writing the stylesheet is little harder
>> for me, but it proves that DocBook exporter can be helpful in some
>> case. ;-)
>> 
>> Please let me know if you have any comments.
>> 
>> Thanks,
>> Baoqiu
>> 
>> 
>> 
>> _______________________________________________
>> 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
>> 
>
>
> ------------------------------------------------------------------
> Russell Adams                            RLAdams@AdamsInfoServ.com
>
> PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
>
> Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
>
> _______________________________________________
> 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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: Export Org files to TWiki format
  2009-05-08  4:29   ` Baoqiu Cui
@ 2009-05-08  4:33     ` Russell Adams
  2009-05-08  4:48       ` Baoqiu Cui
  0 siblings, 1 reply; 5+ messages in thread
From: Russell Adams @ 2009-05-08  4:33 UTC (permalink / raw)
  To: emacs-orgmode

Foswiki forked TWiki after they started going commercial. The whole
sordid tale is online, but all the core devs went to FOSWiki. Last I
checked TWiki was just treading water.

I'm converting. ;]

On Thu, May 07, 2009 at 09:29:37PM -0700, Baoqiu Cui wrote:
> Hi Russell,
> 
> Russell Adams <RLAdams@AdamsInfoServ.Com> writes:
> 
> > You mean FOSWiki, right? ;]
> 
> This is surprising news to me!  I was not aware of the existence of
> Foswiki!  Thanks for the info!  Foswiki looks very nice.
> 
> Hope that Foswiki syntax is compatible with TWiki.
> 
> Baoqiu
> 
> 
> > On Thu, May 07, 2009 at 09:05:05PM -0700, Baoqiu Cui wrote:
> >> Hi,
> >> 
> >> Recently I wrote an XSL stylesheet that converts DocBook documents to
> >> TWiki (http://www.twiki.org/) format, and it can be used to convert Org
> >> files to TWiki format using DocBook exporter as a bridge.  I have used
> >> it to generate some of my recent TWiki documents at work from Org mode
> >> files, and it worked pretty well.  Now Org-mode can be used as a TWiki
> >> editor.
> >> 
> >> If you are interested, you can get the stylesheet from
> >> 
> >>    http://docbook2twiki.googlecode.com
> >> 
> >> The following Elisp function can be used to export Org file to TWiki
> >> using this stylesheet (the only external tool that you need is
> >> ``xsltproc''):
> >> 
> >> (defun org-export-as-twiki ()
> >>   "Export Org file to TWiki."
> >>   (interactive)
> >>   (message "Exporting to TWiki...")
> >>   (let* ((wconfig (current-window-configuration))
> >> 	 (docbook-buf (org-export-as-docbook))
> >> 	 (filename (buffer-file-name docbook-buf))
> >> 	 (base (file-name-sans-extension filename))
> >> 	 (twiki-file (concat base ".twiki")))
> >>     (and (file-exists-p twiki-file) (delete-file twiki-file))
> >>     (message "Processing DocBook XML file...")
> >>     (shell-command
> >>      (format "xsltproc --output %s /Users/bcui/docbook2twiki/docbook2twiki.xsl %s"
> >> 	     twiki-file (shell-quote-argument filename)))
> >>     (message "Processing DocBook file...done")
> >>     (if (not (file-exists-p twiki-file))
> >> 	(error "TWiki file was not produced")
> >>       (set-window-configuration wconfig)
> >>       (message "Exporting to TWiki...done")
> >>       twiki-file)))
> >> 
> >> Originally I started with writing Org-to-TWiki exporter in Elisp, but
> >> realized that I had to duplicate a lot of code from the DocBook exporter
> >> after 99% of the work was done.  Writing the stylesheet is little harder
> >> for me, but it proves that DocBook exporter can be helpful in some
> >> case. ;-)
> >> 
> >> Please let me know if you have any comments.
> >> 
> >> Thanks,
> >> Baoqiu
> >> 
> >> 
> >> 
> >> _______________________________________________
> >> 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
> >> 
> >
> >
> > ------------------------------------------------------------------
> > Russell Adams                            RLAdams@AdamsInfoServ.com
> >
> > PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
> >
> > Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> >
> >
> > _______________________________________________
> > 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
> >
> 
> 
> 
> _______________________________________________
> 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
> 


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export Org files to TWiki format
  2009-05-08  4:33     ` Russell Adams
@ 2009-05-08  4:48       ` Baoqiu Cui
  0 siblings, 0 replies; 5+ messages in thread
From: Baoqiu Cui @ 2009-05-08  4:48 UTC (permalink / raw)
  To: emacs-orgmode

Russell Adams <RLAdams@AdamsInfoServ.Com> writes:

> Foswiki forked TWiki after they started going commercial. The whole
> sordid tale is online, but all the core devs went to FOSWiki. Last I
> checked TWiki was just treading water.
>
> I'm converting. ;]

If it is true that most of the TWiki contributors are moving to Foswiki,
then it is a good move to convert.

No matter what, Foswiki and TWiki should try to be 100% compatible.

Baoqiu


> On Thu, May 07, 2009 at 09:29:37PM -0700, Baoqiu Cui wrote:
>> Hi Russell,
>> 
>> Russell Adams <RLAdams@AdamsInfoServ.Com> writes:
>> 
>> > You mean FOSWiki, right? ;]
>> 
>> This is surprising news to me!  I was not aware of the existence of
>> Foswiki!  Thanks for the info!  Foswiki looks very nice.
>> 
>> Hope that Foswiki syntax is compatible with TWiki.
>> 
>> Baoqiu
>> 
>> 
>> > On Thu, May 07, 2009 at 09:05:05PM -0700, Baoqiu Cui wrote:
>> >> Hi,
>> >> 
>> >> Recently I wrote an XSL stylesheet that converts DocBook documents to
>> >> TWiki (http://www.twiki.org/) format, and it can be used to convert Org
>> >> files to TWiki format using DocBook exporter as a bridge.  I have used
>> >> it to generate some of my recent TWiki documents at work from Org mode
>> >> files, and it worked pretty well.  Now Org-mode can be used as a TWiki
>> >> editor.
>> >> 
>> >> If you are interested, you can get the stylesheet from
>> >> 
>> >>    http://docbook2twiki.googlecode.com
>> >> 
>> >> The following Elisp function can be used to export Org file to TWiki
>> >> using this stylesheet (the only external tool that you need is
>> >> ``xsltproc''):
>> >> 
>> >> (defun org-export-as-twiki ()
>> >>   "Export Org file to TWiki."
>> >>   (interactive)
>> >>   (message "Exporting to TWiki...")
>> >>   (let* ((wconfig (current-window-configuration))
>> >> 	 (docbook-buf (org-export-as-docbook))
>> >> 	 (filename (buffer-file-name docbook-buf))
>> >> 	 (base (file-name-sans-extension filename))
>> >> 	 (twiki-file (concat base ".twiki")))
>> >>     (and (file-exists-p twiki-file) (delete-file twiki-file))
>> >>     (message "Processing DocBook XML file...")
>> >>     (shell-command
>> >>      (format "xsltproc --output %s /Users/bcui/docbook2twiki/docbook2twiki.xsl %s"
>> >> 	     twiki-file (shell-quote-argument filename)))
>> >>     (message "Processing DocBook file...done")
>> >>     (if (not (file-exists-p twiki-file))
>> >> 	(error "TWiki file was not produced")
>> >>       (set-window-configuration wconfig)
>> >>       (message "Exporting to TWiki...done")
>> >>       twiki-file)))
>> >> 
>> >> Originally I started with writing Org-to-TWiki exporter in Elisp, but
>> >> realized that I had to duplicate a lot of code from the DocBook exporter
>> >> after 99% of the work was done.  Writing the stylesheet is little harder
>> >> for me, but it proves that DocBook exporter can be helpful in some
>> >> case. ;-)
>> >> 
>> >> Please let me know if you have any comments.
>> >> 
>> >> Thanks,
>> >> Baoqiu
>> >> 
>> >> 
>> >> 
>> >> _______________________________________________
>> >> 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
>> >> 
>> >
>> >
>> > ------------------------------------------------------------------
>> > Russell Adams                            RLAdams@AdamsInfoServ.com
>> >
>> > PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
>> >
>> > Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>> >
>> >
>> > _______________________________________________
>> > 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
>> >
>> 
>> 
>> 
>> _______________________________________________
>> 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
>> 
>
>
> ------------------------------------------------------------------
> Russell Adams                            RLAdams@AdamsInfoServ.com
>
> PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
>
> Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
>
> _______________________________________________
> 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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-08  4:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-08  4:05 Export Org files to TWiki format Baoqiu Cui
2009-05-08  4:18 ` Russell Adams
2009-05-08  4:29   ` Baoqiu Cui
2009-05-08  4:33     ` Russell Adams
2009-05-08  4:48       ` Baoqiu Cui

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).