ffmddb ConfigurationΒΆ

ffmddb relies on a single configuration file to figure out how to interact with the database. This file contains a YAML blob, which describes a few things about the structure of the data. It informs the database of where

Configuration file (.ffmddbrc) example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
my_log_files:
    version: 1
    collections:
        - name: logs
          path: ./logs
        - name: participants
          path: ./participants
    indices:
        - name: log_tag
          from: ['logs', 'metadata:tag']
        - name: participants_logs
          from: ['participants', 'name:']
          to: ['logs', 'metadata:participants']
    fence: ['<!--ffmddb', '-->']
Config entry Default Explanation
<Root level key> N/A The name of the database.
collections N/A A list of YAML objects. Each object should containa name and a path entry. The name should contain letters, numbers, and underscores and start with a letter. The path should be relative to the configuration file. Can be empty.
indices N/A A list of YAML objects. Each object should contain a name, a from field, and an optional to field. The name should contain letters, numbers, and underscores and start with a letter. The from and to fields should contain an array with the first item being the name of a collection and the second being a query for selecting one field. Can be empty, cannot contain data if collections is empty.
fence ['---+', '---+'] The fence that delineates the metadata field from the document field. Should be a two-item array, with the two items being strings containing the open fence and the close fence. The strings will be interpreted as regular expressions (the default being an example, specifying both fences as three or more hyphens), so be careful to escape where needed. fences occur on a line by themselves. Multiple metadata blocks may occur in a file; they will be merged before parsing.
index_path .ffmddb_idx The folder relative to the configuration file which contains the indices.
multiple_metadata False Whether or not to collect metadata from multiple fenced blocks.

some more