From mboxrd@z Thu Jan 1 00:00:00 1970 From: jemarch@gnu.org (Jose E. Marchesi) Subject: Re: [OT] recutils Date: Sat, 04 Dec 2010 13:28:39 +0100 Message-ID: <87vd39yb60.fsf@gnu.org> References: <874oauh7zq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=46724 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POrJH-0001h9-Ea for emacs-orgmode@gnu.org; Sat, 04 Dec 2010 07:33:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POrJF-0003sP-QV for emacs-orgmode@gnu.org; Sat, 04 Dec 2010 07:33:51 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:48936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POrJF-0003sL-P3 for emacs-orgmode@gnu.org; Sat, 04 Dec 2010 07:33:49 -0500 In-Reply-To: (Michael Brand's message of "Sat, 4 Dec 2010 08:17:34 +0100") 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: Michael Brand Cc: emacs-orgmode@gnu.org > I would highly appreciate any comment or suggestion on improving the > format, the utilities, or whatever. Wow! The ability to have a _relational_ database with foreign keys in a simple text file is so great news for me. A dream I had for many years now. Or is it lack of knowledge from my side about already existing solutions before recutils? I don't think there is anything similar. Initially I just wanted a simple format to store fields in readable and writable files. Something really simple. Then additional features came to my mind and I implemented them. But note that the "relational" characteristics in recutils are not very sophisticated. You can't have keys composed by more than one field, for example. The rule here is: if you need something more complex then you probably should be using a real relational dbms instead :) I was thinking about using sqlite from the command line and together with shell scripts for stuff like my collection of music with recordings, MIDI files, scores and so on. Because at least for me editing a text file is by far simpler, more interactive and more convenient than editing with SQL I will prefer recutils over sqlite. Additionally, text files are tool-independent. You could even print your database :) But since recfiles, the text files of recutils, are not hierarchically organized I am still considering to use only Org for the case of my collection of music. Org would have the advantages of outlining, hyperlinks, column view, todo, tags, agenda view, export for publishing and many others. Thus my wish for the file format would be to somehow keep in mind Org to potentially - convert the files bidirectionally between the format of recfiles and Org, with or without something like "literate programming" of org-babel I don't think it is generally possible to map the relationships between record types in a recfile to hierarchies in an org file. For example, in a recfile you could have something like: %rec: Album %key: Name %type: Year date Name: Loving You Year: 1957 Author:Name: Elvis Presley ... %rec: Author %key: Name Name: Elvis Presley You could extract: * Albums ** Elvis Presley *** Loving You But then, what if several authors authored an album? %rec: Album Name: Sounds of Silence Author:Name: Simon Author:Name: Garfunkel You could group by Album or by Author then. - use recutils as a language extension to org-babel, recutils reading data streamed to its stdin from org-babel and piping back to into org-babel result (no writing by recutils to the file) That sounds interesting. Would be nice to store rec data into the org files. Thanks for the suggestions :) -- Jose E. Marchesi jemarch@gnu.org GNU Project http://www.gnu.org