[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [OT] recutils
From: |
Jose E. Marchesi |
Subject: |
Re: [Orgmode] [OT] recutils |
Date: |
Sat, 04 Dec 2010 13:28:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
> 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 address@hidden
GNU Project http://www.gnu.org