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 exampleThat 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.
Installation:
libfurl: 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.