From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Publishing a HTML wiki Date: Thu, 22 Jan 2009 16:02:35 +0100 Message-ID: References: <87fxjb1q9o.wl%jan.seeger@thenybble.de> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ14s-0002AZ-4r for emacs-orgmode@gnu.org; Thu, 22 Jan 2009 10:02:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ14q-00029L-VB for emacs-orgmode@gnu.org; Thu, 22 Jan 2009 10:02:41 -0500 Received: from [199.232.76.173] (port=60395 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ14q-000293-Ml for emacs-orgmode@gnu.org; Thu, 22 Jan 2009 10:02:40 -0500 Received: from ug-out-1314.google.com ([66.249.92.172]:21939) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQ14p-0006Y4-Lr for emacs-orgmode@gnu.org; Thu, 22 Jan 2009 10:02:40 -0500 Received: by ug-out-1314.google.com with SMTP id 36so697988uga.17 for ; Thu, 22 Jan 2009 07:02:38 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scot Becker Cc: Emacs-orgmode mailing list 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 "" :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 "" :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 cdominik@caprisun.dreamhost.com '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 > 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