Jump to content

fURL - Download http content, easy as never!


1 reply to this topic

#1 thecrimulo

  • Members
  • 87 posts
  • Locationhere

Posted 02 July 2016 - 02:10 AM

So, after a long research and 4am in my timezone, I've made my own HTTP content downloader, fURL.

I know, there are others like wget and Github downloader... BUT!... They didn't work for me, either bad indentation, or fails at install, or blah. So I made fURL: Fetch URL.

furl https://example.org example
That simple, to download a file! It only works with plain text tho.

But, this is not all, it also comes with libfurl, which has 4 easy functions: fetch(url), save(h, fo), dl(url, fo) and ghfetch(user, repo, branch, file, fo, class)

fetch(url) returns a string with the url content, it doesn't save it.
save(h, fo): h is the string (that fetch returns, or can be any) and fo is the file object [local fileo = fs.open(path, "w")]
dl(url, fo) is the combined result, gets an url and a file object.
ghfetch(...) is more complex:
- user: GitHub account
- repo: Gh repo
- branch: Repo's branch
- file: File.
- fo: File Object
- class: If class == "moonux", user = "TheCrimulo" and repo = "moonux", this is only for my purposes, but you can put yours.

pastebin get UtzfuGJc
furl [Depends on libfurl]:
pastebin get JekYNUWn
In root directory:
mkdir lib
mv libfurl /lib/libfurl

You can use it freely on your PC. If it's a tool for an OS, please credit Moonux Boottools and thecrimulo.

#2 DannySMc

  • Members
  • 1,808 posts
  • Location/home/dannysmc95

Posted 02 July 2016 - 06:55 PM

You do understand that the installation could be simplified for the end user by making an installer for it?

Also nice though, like it a lot!!

Edited by DannySMc, 02 July 2016 - 06:55 PM.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users