Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local h = fs.open(tArgs[1],"r")
- local html = h.readAll()
- h.close()
- local k = fs.open("txt","w")
- local j = fs.open("txt2","w")
- local quotes = {}
- local sources = {}
- html:gsub("<quote>(.-)</quote>",function(a) table.insert(quotes,a) end)
- html:gsub("<source>(.-)</source>",function(a) table.insert(sources,a) end)
- shell.run("clr")
- for i,v in ipairs(quotes) do
- print(i,": ",v)
- k.writeLine(v)
- k.flush()
- end
- for i,v in ipairs(sources) do
- j.write('<')
- j.write(v)
- j.write(">\"")
- for i2,v2 in ipairs(quotes) do
- if i == i2 then
- j.write(v2)
- end
- end
- j.writeLine("\"")
- j.flush()
- end
- k.close()
- j.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement