export data stored only in Lua
this was done like 3 days ago, no idea why it wasn't committed
This commit is contained in:
+15
-2
@@ -1,4 +1,6 @@
|
|||||||
#!/usr/bin/env luajit
|
#!/usr/bin/env luajit
|
||||||
|
package.path = (arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "lib" .. package.config:sub(1, 1) .. "?.lua;" .. package.path
|
||||||
|
local utility = require "utility"
|
||||||
|
|
||||||
-- TODO add support for private repos by making it warn the user
|
-- TODO add support for private repos by making it warn the user
|
||||||
|
|
||||||
@@ -98,9 +100,9 @@ for name, info in pairs(repositories) do
|
|||||||
table.insert(repository_names, info.organization .. "/" .. name)
|
table.insert(repository_names, info.organization .. "/" .. name)
|
||||||
|
|
||||||
-- TODO figure out how to detect and exclude repos that don't need to be cloned (check what exists on my domain!)
|
-- TODO figure out how to detect and exclude repos that don't need to be cloned (check what exists on my domain!)
|
||||||
os.execute("git clone https://TangentFoxy@github.com/TangentFoxy/" .. name)
|
-- os.execute("git clone https://TangentFoxy@github.com/TangentFoxy/" .. name)
|
||||||
|
|
||||||
-- os.execute("cd " .. name .. " && git branch")
|
-- os.execute("cd " .. name .. " && git branch") -- TODO figure out why I had this? do I need to manually push each branch or does that happen automatically?
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if true then os.exit() end
|
-- if true then os.exit() end
|
||||||
@@ -116,6 +118,17 @@ end)()
|
|||||||
|
|
||||||
table.sort(repository_names)
|
table.sort(repository_names)
|
||||||
|
|
||||||
|
-- I don't know what data I actually need from this script or how to organize it
|
||||||
|
-- so I'm just exporting everything for the moment
|
||||||
|
local data = {
|
||||||
|
repositories = repositories,
|
||||||
|
organizations = organizations,
|
||||||
|
mirrors = mirrors,
|
||||||
|
repository_names = repository_names,
|
||||||
|
}
|
||||||
|
utility.save_data(data, "export.json")
|
||||||
|
os.exit()
|
||||||
|
|
||||||
-- TODO figure out how to use the API to do this automatically
|
-- TODO figure out how to use the API to do this automatically
|
||||||
-- TODO figure out how to set a description as well
|
-- TODO figure out how to set a description as well
|
||||||
print("Create the following organizations:")
|
print("Create the following organizations:")
|
||||||
|
|||||||
Reference in New Issue
Block a user