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.
Install the application using the go
CLI or download the appropriate binary from the releases page.
go install github.com/djaustin/tractor-beam@latest
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
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
The tractor-beam application can be configured using the following methods ranked in order of precedence (decreasing)
- Command line flags
- Environment variables
- Configuration file
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
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)