Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OpenPrograms/Vexatos-Programs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e33849c74205812c3acd227bc64fe1a8c0703c08
Choose a base ref
...
head repository: OpenPrograms/Vexatos-Programs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 29, 2015

  1. Copy the full SHA
    07e6b12 View commit details
  2. Maybe an improvement

    Vexatos committed May 29, 2015
    Copy the full SHA
    5539b75 View commit details
  3. Copy the full SHA
    55be9b2 View commit details
  4. Silly oversight

    Vexatos committed May 29, 2015
    Copy the full SHA
    c028b20 View commit details
  5. Now to do some testing...

    Vexatos committed May 29, 2015
    Copy the full SHA
    768c6c0 View commit details
  6. More testing...

    Vexatos committed May 29, 2015
    Copy the full SHA
    e33ddc8 View commit details
  7. Even more testing

    Vexatos committed May 29, 2015
    Copy the full SHA
    a3aa69a View commit details
  8. Even more testing

    Vexatos committed May 29, 2015
    Copy the full SHA
    ef54f7d View commit details
  9. Even more testing

    Vexatos committed May 29, 2015
    Copy the full SHA
    dc6e3bc View commit details
  10. Even more testing

    Vexatos committed May 29, 2015
    Copy the full SHA
    521f3b8 View commit details

Commits on May 30, 2015

  1. New attempt.

    Vexatos committed May 30, 2015
    Copy the full SHA
    808de9d View commit details
  2. Copy the full SHA
    6e2ddca View commit details
  3. It finally works!

    Vexatos committed May 30, 2015
    Copy the full SHA
    417dcd0 View commit details
  4. Copy the full SHA
    8ad2748 View commit details
  5. May fix certain edge cases

    Vexatos committed May 30, 2015
    Copy the full SHA
    a721d54 View commit details

Commits on Jun 5, 2015

  1. Copy the full SHA
    1276488 View commit details
  2. Fix file counter

    Vexatos committed Jun 5, 2015
    Copy the full SHA
    438a400 View commit details
  3. Copy the full SHA
    cccc464 View commit details
  4. More security

    Vexatos committed Jun 5, 2015
    Copy the full SHA
    1fa4ed8 View commit details

Commits on Jun 19, 2015

  1. Copy the full SHA
    6fa51e1 View commit details
  2. Copy the full SHA
    0b32624 View commit details
  3. Copy the full SHA
    03735e4 View commit details
  4. As recommended by Magik

    Vexatos committed Jun 19, 2015
    Copy the full SHA
    4426713 View commit details
  5. Fixed up programs.cfg

    Vexatos committed Jun 19, 2015
    Copy the full SHA
    7200a36 View commit details
  6. Fixed up programs.cfg

    Vexatos committed Jun 19, 2015
    Copy the full SHA
    36104bd View commit details
  7. Copy the full SHA
    8cb6f15 View commit details
  8. Maybe fixed selene

    Vexatos committed Jun 19, 2015
    Copy the full SHA
    167d592 View commit details
  9. Copy the full SHA
    f3a1bee View commit details
  10. Copy the full SHA
    e41c831 View commit details

Commits on Jun 28, 2015

  1. Copy the full SHA
    396e83e View commit details
  2. Added take and takeright

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    100e0fe View commit details
  3. Added new functions to unload

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    235c85d View commit details
  4. Added takewhile

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    dcf0227 View commit details
  5. Copy the full SHA
    b30fabe View commit details
  6. Copy the full SHA
    4f8077d View commit details
  7. Woops

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    35070c4 View commit details
  8. Started fixing

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    8bdb060 View commit details
  9. More fixing

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    a00c7e0 View commit details
  10. Updated version of Selene

    Vexatos committed Jun 28, 2015
    Copy the full SHA
    44b2baf View commit details

Commits on Jun 29, 2015

  1. Copy the full SHA
    7bb8522 View commit details
  2. Copy the full SHA
    fbb2b3c View commit details
  3. Some better shutdown handling

    Vexatos committed Jun 29, 2015
    Copy the full SHA
    b80373e View commit details
  4. Update programs.cfg

    Vexatos committed Jun 29, 2015
    Copy the full SHA
    bf7bdb1 View commit details

Commits on Jun 30, 2015

  1. set default speed to 1790

    Vexatos committed Jun 30, 2015
    Copy the full SHA
    a8f75d8 View commit details
  2. Copy the full SHA
    44c5805 View commit details

Commits on Jul 6, 2015

  1. Fixed Lua 5.3 compatibility

    Vexatos committed Jul 6, 2015
    Copy the full SHA
    4d6f945 View commit details

Commits on Jul 9, 2015

  1. Added table.flip to Selene

    Vexatos committed Jul 9, 2015
    Copy the full SHA
    29f17fb View commit details
  2. Made strings iterable

    Vexatos committed Jul 9, 2015
    Copy the full SHA
    a3b1d62 View commit details
  3. Got rid of the stringlist

    Vexatos committed Jul 9, 2015
    Copy the full SHA
    39f5641 View commit details
  4. Finalized stringlist removal

    Vexatos committed Jul 9, 2015
    Copy the full SHA
    976b4f6 View commit details
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,11 +2,14 @@
!/.gitignore
!/morse/
!/song/
!/op-manager/
!/oppm/
!/reactor/
!/README.md
!/programs.yaml
!/programs.lua
!/programs.cfg
!/drama
!/selene
!/dronecontrol
!/holocol
!/models
!/asiebin
!/vending
140 changes: 140 additions & 0 deletions asiebin/asiebin.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
--[[ This program allows downloading and uploading from and to paste.asie.pl.
It is a clone of the pastebin program.
Authors: Sangar, Vexatos ]]
local component = require("component")
local fs = require("filesystem")
local internet = require("internet")
local shell = require("shell")

if not component.isAvailable("internet") then
io.stderr:write("This program requires an internet card to run.")
return
end

local args, options = shell.parse(...)

-- This gets code from the website and stores it in the specified file.
local function get(pasteId, filename)
local f, reason = io.open(filename, "w")
if not f then
io.stderr:write("Failed opening file for writing: " .. reason)
return
end

io.write("Downloading from paste.asie.pl... ")
local url = "https://paste.asie.pl/raw/" .. pasteId
local result, response = pcall(internet.request, url)
if result then
io.write("success.\n")
for chunk in response do
if not options.k then
string.gsub(chunk, "\r\n", "\n")
end
f:write(chunk)
end

f:close()
io.write("Saved data to " .. filename .. "\n")
else
io.write("failed.\n")
f:close()
fs.remove(filename)
io.stderr:write("HTTP request failed: " .. response .. "\n")
end
end

-- This makes a string safe for being used in a URL.
function encode(code)
if code then
code = string.gsub(code, "([^%w ])", function (c)
return string.format("%%%02X", string.byte(c))
end)
code = string.gsub(code, " ", "+")
end
return code
end

-- This stores the program in a temporary file, which it will
-- delete after the program was executed.
function run(pasteId, ...)
local tmpFile = os.tmpname()
get(pasteId, tmpFile)
io.write("Running...\n")

local success, reason = shell.execute(tmpFile, nil, ...)
if not success then
io.stderr:write(reason)
end
fs.remove(tmpFile)
end

-- Uploads the specified file as a new paste to paste.asie.pl.
function put(path)
local file, reason = io.open(path, "r")

if not file then
io.stderr:write("Failed opening file for reading: " .. reason)
return
end

local data = file:read("*a")
file:close()

io.write("Uploading to paste.asie.pl... ")
local result, response = pcall(internet.request,
"https://paste.asie.pl/add",
"paste=" .. encode(data) .. "&onlyid=yes")

if result then
local info = ""
for chunk in response do
info = info .. chunk
end
if string.match(info, "^Paste too short!") then
io.write("failed.\n")
io.write(info)
else
io.write("success.\n")
local pasteId = info
io.write("Uploaded as " .. info .. "\n")
io.write('Run "asiebin get ' .. pasteId .. '" to download anywhere.')
end
else
io.write("failed.\n")
io.stderr:write(response)
end
end

local command = args[1]
if command == "put" then
if #args == 2 then
put(shell.resolve(args[2]))
return
end
elseif command == "get" then
if #args == 3 then
local path = shell.resolve(args[3])
if fs.exists(path) then
if not options.f or not os.remove(path) then
io.stderr:write("file already exists")
return
end
end
get(args[2], path)
return
end
elseif command == "run" then
if #args >= 2 then
run(args[2], table.unpack(args, 3))
return
end
end

-- If we come here there was some invalid input.
io.write("Usages:\n")
io.write("asiebin put [-f] <file>\n")
io.write("asiebin get [-f] <id> <file>\n")
io.write("asiebin run [-f] <id> [<arguments...>]\n")
io.write(" -f: Force overwriting existing files.\n")
io.write(" -k: keep line endings as-is (will convert\n")
io.write(" Windows line endings to Unix otherwise).")
44 changes: 44 additions & 0 deletions holocol/holocol.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
local shell = require("shell")
local component = require("component")

local args, options = shell.parse(...)

if #args < 1 then
print("Usage:")
print("holocol <color> - sets the primary hologram color.")
print("holocol <color1> [, color2 [, color3]] - sets multiple colors for a Tier 2 Hologram Projector.")
return
end

if not component.isAvailable("hologram") then
io.stderr:write("This program requires a Hologram Projector to run.")
return
end

local hol = component.hologram

local colors = {tonumber(args[1]), tonumber(args[2]), tonumber(args[3])}

if colors[1] then
if colors[1] < 0x0 or colors[1] > 0xFFFFFF then
io.stderr:write("First color needs to be between 0x0 and 0xFFFFFF")
return
end
hol.setPaletteColor(1, colors[1])
end

if colors[2] then
if colors[1] < 0x0 or colors[1] > 0xFFFFFF then
io.stderr:write("Second color needs to be between 0x0 and 0xFFFFFF")
return
end
hol.setPaletteColor(2, colors[2])
end

if colors[3] then
if colors[1] < 0x0 or colors[1] > 0xFFFFFF then
io.stderr:write("Third color needs to be between 0x0 and 0xFFFFFF")
return
end
hol.setPaletteColor(3, colors[3])
end
4 changes: 0 additions & 4 deletions op-manager/autorun.lua

This file was deleted.

32 changes: 0 additions & 32 deletions op-manager/etc/example-config.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions op-manager/etc/oppm.cfg

This file was deleted.

4 changes: 4 additions & 0 deletions oppm/autorun.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
local fs = require("filesystem")
local shell = require("shell")
fs.mount(...,"/mnt/oppm")
shell.setPath(shell.getPath() .. ":/mnt/oppm:/mnt/oppm/lib")
32 changes: 32 additions & 0 deletions oppm/etc/example-config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
--default installation path
path="/usr",
--Additional repositories and packages go here, for correct package syntax, check https://github.com/OpenPrograms/Vexatos-Programs/blob/master/oppm/etc/example-config.cfg
repos={
["someUser/someRepo"] = {
["example-package"] = {
files = {
["master/somefolder/bar.lua"] = "/",--"/" means the file will be placed inside the folder the user specified, defaults to /usr
["master/somefolder/barinfo.txt"] = "//etc", -- double slash for using an absolute path
["master/somefolder/barlib.lua"] = "/subfolder",--Places the file in a subfolder in the user-specified folder
["master/somefolder/libfolder/"] = "/"
},
dependencies = {
["GML"] = "/lib"--This package is installed into the specified subfolder
},
name = "Package name",--This is for "oppm info"
description = "This is an example description",--This is for "oppm info"
authors = "Someone, someone else",--This is for "oppm info"
note = "Additional installation instructions, general instructions and additional information/notes go here, this is an optional line.",
hidden = true, -- Add this optional line to make your package not visible in "oppm list", useful for custom dependency libraries
repo="tree/master/somefolder" --Used by the website. This is where the package will link to on the website
},
["yet-another-package"] = {
...
}
},
["anotherUser/anotherRepo"] = {
...
}
}
}
7 changes: 7 additions & 0 deletions oppm/etc/oppm.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
--default installation path
path="/usr",
--Additional repositories and packages go here, for correct package syntax, check https://github.com/OpenPrograms/Vexatos-Programs/blob/master/oppm/etc/example-config.cfg
repos={
}
}
2 changes: 1 addition & 1 deletion op-manager/example.cfg → oppm/example.cfg
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
[":master/otherfolder"] = "/share/something", -- A colon marks a folder, will include everything in that folder
[":master/otherfolder"] = "//etc/something", -- This also works with absolute paths
["master/somefolder/barlib.lua"] = "/subfolder",--Places the file in a subfolder in the user-specified folder
["master/somefolder/libfolder/"] = "/"
["?master/somefolder/something.cfg"] = "/" -- This file will only be installed or updated if it doesn't exist already, unless option -f is specified
},
dependencies = {
["GML"] = "/lib"--This package is installed into the specified subfolder
File renamed without changes.
Loading