emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Scot Becker <scot.becker@gmail.com>
Cc: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Publishing a HTML wiki
Date: Thu, 22 Jan 2009 16:02:35 +0100	[thread overview]
Message-ID: <DA473D5B-31C9-43B9-9E02-E6C1A9576CBB@uva.nl> (raw)
In-Reply-To: <e0e1fe620901220626s7400d2cy9557fdb559b3b708@mail.gmail.com>

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"))
          :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)
          :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)
          :base-directory "~/git/Worg/images/"
          :base-extension "png\\|jpg\\|gif"
          :html-extension "html"
          :publishing-directory "/home/cdominik/orgmode.org/worg/ 
          :recursive t
          :publishing-function org-publish-attachment)
          :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."
   ;; (org-publish-initialize-files-alist t)

Then we have two little shell scripts:

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


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

cd /home/cdominik/git/Worg/

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

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


/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 cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg- 

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  
> <jan.seeger@thenybble.de> 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.
>> 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

      parent reply	other threads:[~2009-01-22 15:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 12:25 Publishing a HTML wiki Jan Seeger
2009-01-22 14:26 ` Scot Becker
2009-01-22 14:30   ` Jan Seeger
2009-01-22 15:30     ` Matthew Lundin
2009-01-22 15:02   ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DA473D5B-31C9-43B9-9E02-E6C1A9576CBB@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=scot.becker@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).