emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Publishing a HTML wiki


From: Carsten Dominik
Subject: Re: [Orgmode] Publishing a HTML wiki
Date: Thu, 22 Jan 2009 16:02:35 +0100


On Jan 22, 2009, at 3:26 PM, Scot Becker wrote:

Jan,

Since a wiki is by nature an on-line editing experience, and org is by
nature an off-line editing experience, you might have to specify a
little more exactly what you mean.  (So far :-] there is no emacs
webapp).  You may have seen the discussions on this list in the past
few days about converting/exporting org texts to wiki *syntax*, and
there were even some links to rough scripts to do conversion to
particular wikis, as well as some discussion about extending org's
export capabilities to more easily export wikified text.  But this
requires a wiki already in place, and some mechanism --like cut and
paste--of passing org-exported text to it.

If you want a whole site, I think it's just a matter of using org's
"publishing" function.  I assume this is what Worg does.  Using
something like 'git' makes it possible to have org files which are
edited by the community (which is like a Wiki), but this is not
'publishing a wiki' exactly, since there is no editing possible
online.  Everyone has to get set up with your version management
software.

That said, I too have wondered exactly how the Worg is generated
(automatically, manually?) from uploaded org files, and just how the
styling (CSS I assume?) is done.

Bastien set this up.  Here is how it works:

On the web server, we have a "git" directory that contains
clones of the public repositories of Worg and Org.

We have a .emacs file which defines publishing projects, and a little
helper function to call the publishing command:


(require 'org-publish)

(setq org-publish-project-alist
      '(("worg" :components ("worg-pages" "worg-code" "worg-images"))
        ("worg-pages"
         :base-directory "~/git/Worg/"
         :base-extension "org"
         :html-extension "php"
         :publishing-directory "/home/cdominik/orgmode.org/worg/"
         :publishing-function org-publish-org-to-html
         :section-numbers nil
         :table-of-contents nil
:style "<link rel=\"stylesheet\" href=\"/worg/worg.css\" type=\"text/css\" />"
         :recursive t
         :auto-preamble t
         :auto-postamble nil)
        ("worg-code"
         :base-directory "~/git/Worg/code/"
         :base-extension "html\\|css\\|png\\|js\\|bz2"
         :html-extension "html"
         :publishing-directory "/home/cdominik/orgmode.org/worg/code/"
         :recursive t
         :publishing-function org-publish-attachment)
        ("worg-images"
         :base-directory "~/git/Worg/images/"
         :base-extension "png\\|jpg\\|gif"
         :html-extension "html"
:publishing-directory "/home/cdominik/orgmode.org/worg/ images/"
         :recursive t
         :publishing-function org-publish-attachment)
        ("orgweb"
         :base-directory "~/git/org-mode/ORGWEBPAGE/"
         :base-extension "org"
         :html-extension "html"
         :publishing-directory "/home/cdominik/orgmode.org/"
         :publishing-function org-publish-org-to-html
         :section-numbers nil
         :table-of-contents t
:style "<link rel=\"stylesheet\" href=\"/org.css\" type= \"text/css\" />"
         :auto-preamble t
         :exclude "DS_Store"
         :recursive t
         :auto-postamble nil)))

(defun worg-org-publish nil
  "Publish Worg and Org."
  (interactive)
  ;; (org-publish-initialize-files-alist t)
  (org-publish-all))



Then we have two little shell scripts:

The first one pulls the git repositories for Org and Worg from the git server:


#!/bin/bash

export PATH=$PATH:/home/cdominik/bin/

cd /home/cdominik/git/Worg/
/home/cdominik/bin/git-pull

cd /home/cdominik/git/org-mode/
/home/cdominik/bin/git-pull


The second calls emacs and tells it to publish all projects:

#!/bin/bash

/home/cdominik/bin/emacs23 --batch -l ~/.batch-color.el --eval "(load- file \"/home/cdominik/.emacs.el\")" -f worg-org-publish


Finally there are crontab entries that trigger these
shell scripts the full and half hour, respectively.

0 * * * * /home/cdominik/bin/pull-worg-org.sh >> /dev/null 2>&1
30 * * * * /home/cdominik/bin/publish-worg-org.sh >> /dev/null 2>&1

So it can take at most 90 minutes for changes to arrive at the website.

I myself am impatient, with ssh access to the web server,
I can simply do

"make updateweb"

in my Org directory.  This will do something like

ssh address@hidden 'pull-worg-org.sh && publish-worg- org.sh'

i.e. it will pull and publish new stuff right away....


Great system, works well, kudos to Bastien!!!!!!

- Carsten




Scot


On Thu, Jan 22, 2009 at 12:25 PM, Jan Seeger <address@hidden> wrote:
Greetings list,

Is there a guide anywhere how to use Org Mode to publish a wiki? A
howto on how to do something like worg, for example?

Regards,
Jan Seeger


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]