Jump to content
Ketarin forum

Ketarin Commands


Kerberos
 Share

Recommended Posts

I was adding a few apps that I missed to my list of jobs and I noticed that one of the download sites had the MD5 checksums of the installers on the page. I was thinking 'it's too bad that I can't use that to verify the download...', but then I had an idea. What if I used some commands to verify the downloaded file using the MD5 checksum. The only problem with this is that in the event that the file is corrupt, how can I tell Ketarin to download it again?

 

This gave me an even better idea. Giving Ketarin it's own set of internal commands. These could be placed in the "commands to execute after download" textbox and uniquely distinguished by either appending some sort of prefix such as "Ketarin:" or "K:" or something like that. Ketarin would then enumerate through each command in the textbox and create a queue of actions to be executed in order. Each external command (DOS command, external program execution, etc) would be queued as an external command, and any internal commands would be queued as function calls. It would also be easy then to extend the functionality further down the road by adding more functions/commands. People could even code/write their own commands and store them in a folder in Ketarin's installation directory. Upon startup, a simple scan and import of each command/command set found would allow almost endless possibilities. Pretty much like an add-on/plugin system.

 

Anyways, getting back to the original example. Scraping the MD5 checksum and storing it in {md5}, I would use something like this in the command box:

 

if not Ketarin:verify_md5({file},{md5})  Ketarin:update({appname})&

 

verify_md5() would return a boolean true or false, indicating if the file passed the check. The only problem I see with this example is that if an incorrect md5 checksum is scraped, then it will update continuously. I'm sure there's a way around that though.

 

It's just an idea that popped into my head that I thought might be interesting to put out there. It would probably take a fair amount of work, and at this point sounds like a 'further down the road' sort of feature. It would definitely add a large wow-factor in my opinion though. Extensibility is a very nice thing to see in any application. I might even try to see if I could get pieces of this idea working just to see how hard it would be. ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.