Posted 30 September 2017 - 01:33 AM
ProjectLib was a project I cooked up while designing a OOP-Extension of Lua, written entirely in lua. ProjectLib is a file, but will eventually be its own Project.
ProjectLib files are easy to write. After pasting the rest of the files simply use write a ProjectLib project file with each line having at least 2 entries.
A pastebin target and a local file name (relative to the rest of the project), seperated by a whitespace. After the first 2 entries, and another whitespace, the rest of the line is ignored, and can be used as a comment. For ease of reading the comment you can prefix it with – or //, but current version does not ignore lines that start with either – or //. Newer versions will support comments.
To download ProjectLib simply do pastebin get 4ENSc0Hp projectlib.
Then to download from pastebin.com/X to absolute path Y, simply do projectlib X Y.
This will create a directory Y, with a file in it called project. Then it will download all files from that project file using the above format.
For those who care, The current source code of ProjectLib is
And for those really curious people, I did not write this directly in CC, instead I used Eclipse Neon, with the Lua editor plugin.
ProjectLib files are easy to write. After pasting the rest of the files simply use write a ProjectLib project file with each line having at least 2 entries.
A pastebin target and a local file name (relative to the rest of the project), seperated by a whitespace. After the first 2 entries, and another whitespace, the rest of the line is ignored, and can be used as a comment. For ease of reading the comment you can prefix it with – or //, but current version does not ignore lines that start with either – or //. Newer versions will support comments.
To download ProjectLib simply do pastebin get 4ENSc0Hp projectlib.
Then to download from pastebin.com/X to absolute path Y, simply do projectlib X Y.
This will create a directory Y, with a file in it called project. Then it will download all files from that project file using the above format.
For those who care, The current source code of ProjectLib is
local args = {...};
if (#args < 2) then
error"Usage: download <pastebin id> <path>";
end
function cpyReadDownloadFile(pastetarget, loc)
os.run(_ENV,"pastebin get"..pastetarget.." "..loc.."download")
for line in io.lines(loc.."download") do
local target,file = string.match(line,"%s+"); --Grab 2 strings then discard the rest
os.run(_ENV,"pastebin get"..target.." "..loc..file);
end
end
cpyReadDownloadFile(args[1],args[2]);
And for those really curious people, I did not write this directly in CC, instead I used Eclipse Neon, with the Lua editor plugin.