Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 940 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 940 Bytes

TOML-to-RDB

CLI to convert a TOML file to an RDB (Redis Database) file.

Usage

Set Redis version in the environment (default = 7 if unset):

export REDIS_VERSION=7.2

Run with TOML input:

cat input.toml | toml-to-rdb > output.rdb

or with gzipped TOML input:

cat input.toml.gz | toml-to-rdb -g > output.rdb

Type Conversions

TOML files containing (unnested) key-value, key-table, and key-set pairs are supported. For example, the following TOML content:

title = "TOML File"

[table]
k = "v"

set = [ a, b ]

would result in a Redis database with:

  • Key title having value TOML File
  • Key table having a hash value with key k and value v
  • Key set having a set value with items a and b