tractor-beam

command module
v0.0.0-...-85e0c98 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 1 Imported by: 0

README

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/tractor-beam@latest
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)

Documentation

Overview

Copyright © 2022 Dan Austin <dan.austin@hey.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL