recfiles is a
file format
A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
for human-editable,
plain text
In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects ( floating-point numbers, images, etc.). It may also include a limi ...
database
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
s.
Databases using this file format can be edited using any
text editor
A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be u ...
. recfiles allow for basic
relational database
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
operations, typing, auto-incrementing, as well as a simple
join operation.
Recutils is a collection of tools, like ''recfmt'', ''recsel'', and ''rec2csv'' used to work with recfile databases.
Various software libraries support the format.
Syntax
Data are stored in text files with empty lines separating records. Fields within a record are lines starting with their name and a colon; it is possible to wrap long entries. Multiple record types can be maintained in a single text file.
Example
# This is a recfile document.
%rec: Texts
%type: Year int
Author: Doug McIlroy
Year: 1964
Note: The Origin of Unix Pipes
Title: Unix Text Processing
Author: Dale Dougherty
Author: Tim O'Reilly
Year: 1987
Publisher: Hayden Books
Author: William Shakespeare
Title: Hamlet
Year: 1599
Year: 1600
Year: 1601
This example command would output the following three lines (of the two original entries, one having two authors):
$ recsel -e 'Year > "1900"' -p Author
Author: Doug McIlroy
Author: Dale Dougherty
Author: Tim O'Reilly
See also
*
asciidoc
AsciiDoc is a human-readable document format, semantically equivalent to DocBook XML, but using plain-text mark-up conventions. AsciiDoc documents can be created using any text editor and read “as-is”, or rendered to HTML or any other f ...
*
TOML
TOML is a file format for configuration files. It is intended to be easy to read and write due to obvious semantics which aim to be "minimal", and is designed to map unambiguously to a dictionary. Its specification is open-source, and receives c ...
*
org-mode
Org Mode (also: ''org-mode''; ) is a document editing, formatting, and organizing mode, designed for notes, planning, and authoring within the free software text editor Emacs. The name is used to encompass plain text files ("org files") that incl ...
References
Computer file formats
Computer-related introductions in 2010
Data serialization formats
Lightweight markup languages
Open formats
{{software-stub