From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Using Org-mode file format for storing configuration data Date: Wed, 2 Jan 2013 10:43:18 +0100 Message-ID: <2013-01-02T10-34-09@devnull.Karl-Voit.at> References: <2012-12-30T18-55-46@devnull.Karl-Voit.at> <87licc1guw.wl%n142857@gmail.com> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqKrI-00045Z-B8 for emacs-orgmode@gnu.org; Wed, 02 Jan 2013 04:43:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqKrD-0003mz-FR for emacs-orgmode@gnu.org; Wed, 02 Jan 2013 04:43:36 -0500 Received: from plane.gmane.org ([80.91.229.3]:51470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqKrD-0003md-7B for emacs-orgmode@gnu.org; Wed, 02 Jan 2013 04:43:31 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TqKrQ-0006n9-1y for emacs-orgmode@gnu.org; Wed, 02 Jan 2013 10:43:44 +0100 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Jan 2013 10:43:44 +0100 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Jan 2013 10:43:44 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * Daniel Clemente wrote: > El Sun, 30 Dec 2012 19:04:25 +0100 Karl Voit va escriure: >> >> I plan to implement a new weblog system that parses Org-mode >> files and generates (static) HTML output. Yes, I am aware that >> there are other solutions out there but I do not like them for >> various reasons.[1] > > Nice! I also don't like existing solutions and I was thinking on > writing some Python to do the export. But the complexities of > exporting are so well resolved in elisp that it's much easier to > invoke elisp code than to write your own in Python. Sorry, I can not use the fabulous elisp because it would take me to develop my blog SW for years - I'd have to learn elisp from scratch. Surely, an elisp primer should not try to write something like a web log as his first elisp project. >> So for my new system, I am thinking of using Org-mode files for >> writing (and parsing) the user-defined preferences. > > I happened to be thinking the same two days ago. >> - In Python I have to parse a basic sub-set of Org-mode format >> anyhow. An additional parser would be more work to do. > > Don't do it from scratch; there are already some parsers which > work. I tried: https://github.com/bjonnh/PyOrgMode I did not start to evaluate current Org-parsers in Python but I am very sceptic that I will be able to use such a parser. I plan to do many "intelligent" transformations on the parser level such as "id:heading42" -> "http://my.bog.com/YYYY/MM/DD/articleofheading42.html" and so forth. But we'll see. >> - Possible methods to store configuration/settings of a weblog system >> that scans Org-mode files to generate HTML: >> - in drawers: see below >> - in tables: see below >> - in tags: see below >> - other possibilities? > From the ones you say, I prefer property drawers. It's the most > DB-like and it's analogous to storing data (well, strings). > You don't need all the table benefits (reordering, exporting, > formatting, formulae, …). Nor the tags benefits (search, > multiple tags, …) Ack. >> My focus is user friendly maintenance and overview including >> in-line documentation of the preferences. > > Of course, storing configuration in .org is very utopic (being > all .org), but I would prefer *not* to do it. I would use a > simple ~/.file.conf with some variables in the usual style: > # a comment > path=~/web/ > # where to export images > images=~/web/images OK, the usual INI format. I've done this a couple of times already. > I think this wins for usability and „friendly maintenance“, > since people know it and it works. And it allows you to define > many projects (e.g. check the configuration file for the program > unison). I wanted to check, whether there is something in the idea of using the same Org format for configuration as well. So far I tend to use INI once more. > But I think it's more important to center efforts in developing > a good exporter web publisher. As you said, the current ones are > not powerful enough. Sorry, there seems to be a misunderstanding. My exporter will be a *very basic one*. At least for the first versions. The issues that drove me to plan my own new blog system are related to completely other areas. If you want to have a "good Org to HTML engine", you definitely don't want to use my future blogging system. -- Karl Voit