Random Useful Stuff
#1
Some useful circuits:

[Image: edge3.png]

Convert c2g files with relative address to the mp3 files to the new music identifiers:

Code:
local a = {
entrtanr = "Intro", EasyWin  = "Outro",
Breezala = "Track01", Wallstrt = "Track02", sunflowr = "Track03",
Newrag   = "Track04", Sugarcn  = "Track05", Smthngdn = "Track06",
Silvrswn = "Track07", reflectn = "Track08", Ragdance = "Track09",
Pineapp  = "Track10", Peachrne = "Track11", paragon  = "Track12",
Palmleaf = "Track13", Original = "Track14", Nonparel = "Track15",
mapleaf  = "Track16", Magnetic = "Track17", Kismet   = "Track18",
Gladiols = "Track19", figleaf  = "Track20", Favorite = "Track21",
Elitesyn = "Track22", Cascades = "Track23", Weepwilo = "Track24",
felicity = "Track25", Lilyquen = "Track26"}

local fh = assert(io.open(arg[1], "rb"))
local data = fh:read("*all")
assert(fh:close())

for old, new in pairs(a) do
  data = string.gsub(data,"+..\\..\\music\\"..old..".mp3","+"..new)
end

local fh = assert(io.open(arg[2], "wb"))
fh:write(data)
assert(fh:close())

Code:
prog.lua old.c2g new.c2g
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)