Compare commits

...
8 Commits
Author SHA1 Message Date
tangent fca4eee077 Update ReadMe.md 2026-09-14 02:47:24 -06:00
tangent 6fc0803095 extracted bundles and sent them 2026-08-17 19:24:39 -06:00
tangent c45a147e84 Update ReadMe.md 2026-08-16 18:56:27 -06:00
tangent 9b7c9b86f5 and I don't need it anymore 2026-08-16 18:54:28 -06:00
tangent 6de9e944d9 showing what the final form of the previous data looked like 2026-08-16 18:54:18 -06:00
tangent 7f874834e3 Merge branch 'main' of https://gitea2.tangentfox.com/tools/repo-manager 2026-08-16 18:54:01 -06:00
tangent 8a699a32ea more data formatting 2026-08-16 18:53:58 -06:00
tangent 7d4fbbca3a checking extant data 2026-08-16 16:51:59 -06:00
2 changed files with 29 additions and 69 deletions

No files matched your search

+2
View File
@@ -1,4 +1,5 @@
# repo-manager
Script to automate mirroring and copying of git repos.
- [x] store repositories keyed by name (tree-style is better for avoiding conflicts while being specific and easy to follow)
- [x] repositories have a ~~source~~ origin url and optional mirror URLs (just one for now, called `target`)
@@ -37,6 +38,7 @@ The idea is to make a tree based on the *source* of a repo,
with special keys for what to do with that source,
and optional `target` URLs for mirroring.
- `description`: Short description typically displayed in lists on hosting services.
- `issues`: Like `redundant` below, this is a temporary tag for helping me sort things out.
- `private`: If a repo needs to be created, it will be private only if this is true.
- `redundant`: This repo really doesn't need to exist, but hasn't been removed yet. (This is essentially for my own notes.)
- `target`: A repo URL to force-push to for mirroring.
+27 -69
View File
@@ -2,63 +2,48 @@
package.path = (arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "lib" .. package.config:sub(1, 1) .. "?.lua;" .. package.path
local utility = require "utility"
local extract_bundles = function(path)
utility.list(path, function(file_name)
local _, name, extension = utility.split_path_components(file_name)
if not extension or not (extension == "bundle") then return end -- only work on bundles
local output_path, repo_name
if extension then
repo_name = name:sub(1, -(#extension + 2) - #("-main"))
output_path = path .. "/" .. repo_name
end
if utility.path_exists(output_path) then
return
end
os.execute("git clone " .. name:enquote() .. " " .. output_path:enquote())
-- TEMP since I happen to be moving Minecraft organization items right now..
-- os.execute("git clone " .. name:enquote() .. " " .. output_path:enquote()
-- .. " && cd " .. output_path:enquote()
-- .. " && git remote set-url origin https://tangent@gitea2.tangentfox.com/Minecraft/" .. repo_name
-- .. " && git push origin")
end)
end
extract_bundles(".")
os.exit()
-- TODO add support for private repos by making it warn the user
-- defaults: organization "tangent", public, a string alone means the description
local repositories = {
["2dcraft"] = "A 2D infinite world survival game concept. (Minetest meets Factorio?)",
auroraclone = "Another attempted clone of Aurora, the 4X spreadsheet game.",
["52-cards"] = "Playing cards.",
BSG = "Battlestar Galactica fan-game (not even prototype yet).",
["bullet-hell"] = {
organization = "prototype",
description = "A prototype bullet hell game!",
},
["Drabble-Readings"] = "Recordings of me reading my drabble (for submission to the 100 Word Stories Podcast).",
erectus = {
organization = "prototype",
description = "Basic simulation of an enclosed space & life support systems.",
},
fade = "A very impermanent drawing tool.",
Fluid = {
organization = "prototype",
description = "A better system for basic simulation of fluids in containers.",
},
ideas = {
description = "design docs / misc. ideas",
website = "https://share.note.sx/gdon3y36",
},
neralie = {
organization = "tools",
description = "A simple clock for the Neralie decimal time format.",
website = "https://wiki.xxiivv.com/site/time",
},
["one-off-scripts"] = "An archive for old scripts.",
owen = {
organization = "prototype",
description = "Small polygonal ship generator.",
},
particular = {
organization = "prototype",
description = "A super basic particle simulator (better as a visualizer.. of nothing in particular).",
},
RGB = "My first successful game, where you have to try to match colors using the 3 mouse buttons.", -- default org: tangent, string means description
sever = {
organization = "prototype",
description = "Prototype simplistic engine simulation for generating power.",
},
["Simple-Kerbal-Mods"] = "KSP Agencies!",
slab = "A very not usable (yet?) Love2D GUI library.",
SpaceLove = "My first \"fly a fighter\" prototype... FROM 2014! D:",
["The-Snap"] = {
description = "The Snap balances your browsing habits by closing a random half of open tabs.",
website = "https://blog.tangentfox.com/the-snap-browser-extension/",
},
ThompsonWasAClone = "shit Thomas Was Alone clone",
xi = {
organization = "prototype",
description = "A borderless fullscreen \"screensaver\" of a galactic travel network.",
},
}
-- TODO figure out how to use API to automatically set these up
@@ -66,22 +51,6 @@ local mirrors = {
"markdown.lua",
"love-pe",
"slam",
"Piefiller",
"heightmap",
"rxi-json.lua",
"etlua",
"lua-date",
"lurker",
"lua-htmlparser",
"baton",
"lovebird",
"argparse",
"love-release",
"lume",
"semver.lua",
"lua-sandbox",
"dkjson.lua",
"inspect.lua",
}
local organizations = {}
@@ -118,17 +87,6 @@ end)()
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 set a description as well
print("Create the following organizations:")