From 59a6c25df5ad62accebaa69684429ccd3963a946 Mon Sep 17 00:00:00 2001 From: garret Date: Sat, 26 Nov 2022 01:06:25 +0000 Subject: feedmaker: add moderately scuffed commandline arguments --- make-feed.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'make-feed.lua') diff --git a/make-feed.lua b/make-feed.lua index 4faf0b0..38c23f5 100755 --- a/make-feed.lua +++ b/make-feed.lua @@ -3,12 +3,14 @@ local json = require "json" local sha1 = require "sha1" local lfs = require "lfs" local inspect = require "inspect" ---local argparse = require "argparse" - ---local parser = argparse() ---local args = parser:parse() - -local args = {macros = "/home/g/subs/automation-scripts/macros", modules = "/home/g/subs/automation-scripts/modules", config = "/home/g/subs/depctrl-feedmaker/conf.lua", output = "DependencyControl.json"} +local argparse = require "argparse" + +local parser = argparse() {description = "experimental DependencyControl feed generator"} +parser:option("--macros", "Macro Directory") +parser:option("--modules", "Module Directory") +parser:option("-o --output", "Output File", "DependencyControl.json") +parser:option("-c --config", "Feed Configuration file") +local args = parser:parse() local config = loadfile(args.config)() -- cgit v1.2.3-70-g09d2