tractor-beam 🛸

An application for synchronising data from a spreadsheet into a Redis database.

Given a spreadsheet with a nominated key column and one or more value columns, tractor-beam will save the data as hashes to Redis.

Usage

Install the application using the go CLI or download the appropriate binary from the releases page.

go install github.com/djaustin/[email protected]

One-time Sync

tractor-beam can be used to complete a single synchronisation of the database from a file.

tractor-beam sync <spreadsheet-file> <redis-address>
tractor-beam sync Book.xlsx localhost:6379

Watch Mode

Given a spreadsheet file, tractor-beam can continually monitor the file for changes and keep the Redis instance up to date when any changes occur.

tractor-beam watch <spreadsheet-file> <redis-address>
tractor-beam watch Book.xlsx localhost:6379

Configuration

The tractor-beam application can be configured using the following methods ranked in order of precedence (decreasing)

  1. Command line flags
  2. Environment variables
  3. Configuration file

Command line flags

In order to view the possible command line flags for a command, use the -h flag to view the help message.

tractor-beam -h
tractor-beam sync -h
tractor-beam watch -h

Configuration Files

By default, tractor-beam looks for a file named either tractor-beam or tractor-beam.yaml in the following locations:

  • The directory from which tractor-beam is run
  • The user’s home directory
  • /etc/tractor-beam/

An reference configuration file is included in this repository (tractor-beam.reference.yaml)

GitHub

View Github