diff --git a/rescue-from-github.lua b/rescue-from-github.lua index f640749..bc4e8bd 100755 --- a/rescue-from-github.lua +++ b/rescue-from-github.lua @@ -2,6 +2,27 @@ package.path = (arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "lib" .. package.config:sub(1, 1) .. "?.lua;" .. package.path local utility = require "utility" +-- reformatting the mirrors list in my new file to the format I want +local data = utility.load_data("respositories.json") +local mirrors = { + ["https://github.com/"] = { + TangentFoxy = {} + } +} +for _, name in ipairs(data.mirrors) do + mirrors["https://github.com/"].TangentFoxy[name] = {} +end +data.mirrors = mirrors +utility.save_data(data) +os.exit() + +-- making sure all mirror keys are repos under my name on GitHub +local data = utility.load_data("export.json") +for _, name in ipairs(data.mirrors) do + os.execute("open " .. ("https://github.com/TangentFoxy/" .. name):enquote()) +end +os.exit() + -- TODO add support for private repos by making it warn the user -- defaults: organization "tangent", public, a string alone means the description