cyberbit / telem

Trivial ETL Engine for Minecraft
http://telem.cyberbit.dev
Other
27 stars 4 forks source link
computercraft computercraft-scripts computercraft-tweaked computercraft-utilities

Telem - Trivial ETL Engine for Minecraft

Build PineStore

Tired of creating complex logic to monitor inventory or production? Want something more modern, modular, and scalable? Want something that can empower a dashboard like the screenshot below? You have come to the right place.

image

Requirements

Install

wget run https://pinestore.cc/d/14

Usage

Please visit telem.cyberbit.dev for full documentation.

local telem = require 'telem'

local backplane = telem.backplane()                  -- setup the fluent interface
  :addInput('hello_in', telem.input.helloWorld(123)) -- add a named input
  :addOutput('hello_out', telem.output.helloWorld()) -- add a named output

-- call a function that reads all inputs and writes all outputs, then waits 3 seconds, repeating indefinitely
backplane:cycleEvery(3)()

-- alternative threadable option
parallel.waitForAny(
  backplane:cycleEvery(3),

  function ()
    while true do
      -- listen for events, control your reactor, etc.

      -- make sure to yield somewhere in your loop or the backplane will not cycle correctly
      sleep()
    end
  end)

Input Adapters

Output Adapters