diff options
Diffstat (limited to 'pi-calc')
-rwxr-xr-x | pi-calc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +#!/usr/bin/env lua +local C = require "Calculator" +local M = require "Material" +local Q = require "Quantity" +local material, amount = ... +if not material then + error("expected material name as an argument") +end +amount = tonumber(amount) or 1 +C.pretty_print(C.raw_materials_needed(Q{amount, material})) |