Jump to content
Ketarin forum
floele

Ketarin 1.8.7

Recommended Posts

Beta 1:

So far this beta of Ketarin only includes this requested feature: http://ketarin.userecho.com/topics/17-emit-error-if-empty-variable-has-been-generated/

So in other words, there is a new function "ifemptythenerror" that throws an error if the variable is empty.

 

Beta 2:

Compatibility with PowerShell 4.0

 

Beta 3:

+ Function runpowershell / ps for executing variable content as power shell script and returning its result

+ Segmented downloading (enable in Settings -> Connection)

* Optimized download speed for non-segmented downloads

* Made UrlVariable constructor public

! Potentially fixed issue https://ketarin.org/forum/topic/3946-regex-positive-lookbehind-refreshing-error/?p=10717

 

 

Released as version 1.8.7 final: Download Ketarin 1.8.7

Ketarin-1.8.6.zip

Edited by necrox
Added a download link to v1.8.7 final and changed the title of this topic.

Share this post


Link to post
Share on other sites

Maybe you should really add #requires statement silently to PowerShell scripts, avoids lot of confusion what versions are supported.

Share this post


Link to post
Share on other sites

BUG Description : Set "Textual content"-urlVariables with Powershell script  >>  Variable no longer visible in custom column; no longer reactive to change.

 

Edit : This is a user fault(my fault), not Ketarins. It turns out that after manually modifying a textual content variable, one must start an update process on the app. Even if there is nothing to update, but only after this process is complete, will the change become visible in a custom column. When it is done via a Powershell script, but using "run", outside the normal update cycle, the same course is required. Pardon me.

Share this post


Link to post
Share on other sites

In particular, I'd be interested in the segmented download feature: Do all applications still download properly after enabling it?

Share this post


Link to post
Share on other sites
Very useful updates, thank you kindly for your efforts floele.
 
Beta 3 : Observations and Examples of the new features :
 
Segmented downloading (enable in Settings -> Connection)
Tested with 10MB, ~300MB and ~700MB files; segments set to 3.
Integrity of files is maintained after download.
Have confirmed 3 open sockets, consuming all available download speed.
 
Made UrlVariable constructor public
Works as advertised, thx. It's a little confusing that a variable name is required, both when creating the variable-object and adding it to the job.
 
Function runpowershell / ps for executing variable content as power shell script and returning its result
After testing as shown in examples below, I found no fault in the implementation.
 
This feature brings several new possibilities to Ketarin :
a. Derivation of variable value from a Powershell script, in the moment of use.(global,app or column variable)
b. Execution of Powershell scripts before 'pre-download' scripts, during checks for updates
c. Execution of Powershell scripts to determine the download url
d. Execution of Powershell scripts before evaluation of custom-column-variables.
NOTE : 
- Global and app/url-varaibles containing Powershell scripts will not execute unless used.
- Where one uses a variable, determines at what stage of the update cycle it is executed.
- Custom-column-values will be calculated every update
- Custom-column-values will be calculated every time Ketarin starts. Delays in startup time will occur if your are running a powershell script for many jobs.
 
Example 1 : Shows the use of a url-variable as script, used within the download URL. Note that in this specific case, the script returns nothing. Its purpose is just to execute a script before all others, and to do this on every check for updates.
Var : {a_script} Use : {a_script:ps}
 
Example 2 : This example demonstrates a ketarin-global-variable as a script, used within the download path. In this case it references a system-global-variable. 
Var : {COMPUTERNAME} Use : {COMPUTERNAME:ps}
 
 
B07Dwom.png
 
[21_August_2016] : Added usage note : "Custom-column-values will be calculated every time Ketarin starts. Delays in startup time will occur if your are running a powershell script for many jobs."

Share this post


Link to post
Share on other sites

Thanks for testing!

 

Would you like to put some of the examples you gave into the wiki? I think it's more easy to find there. Having some screenshots like these in there would be a great addition.

Share this post


Link to post
Share on other sites

Thanks for testing!

 

Would you like to put some of the examples you gave into the wiki? I think it's more easy to find there. Having some screenshots like these in there would be a great addition.

Sure. Not confident in my ability to do this, but I'll give it a shot this coming weekend.

Share this post


Link to post
Share on other sites

Would you like to put some of the examples you gave into the wiki?

Not able to add to the wiki.

 

Tried and failed:

- logging in with forum details

- creating mediawiki account, and using those details

 

Login attempts result in : " There is no user by the name[...] "

Share this post


Link to post
Share on other sites

Creating accounts is actually disabled because of spam. I created a new account for you now (you should have received an e-mail).

Share this post


Link to post
Share on other sites

Creating accounts is actually disabled because of spam. I created a new account for you now (you should have received an e-mail).

Thanks logged in.

However both image uploads and external image embedding is disabled, as is page creation(not needed atm).

I've added a section to the functions page, with bare links to the external image host.

Share this post


Link to post
Share on other sites

@Ambimind: Can you do everything you need now?

 

@MAPJe71: Yes. I somehow need to filter these variables for downloaded applications (though this will of course limit what you can do with downloaded applications), or at least have a warning message

Share this post


Link to post
Share on other sites

Beta 3 : Impressions after a week of use :

 

The new features are extremely useful, but they should be used sparingly.

 

Specifically the use of url-variables-as-scripts, in custom columns : This means each job has a variable which holds a script; this variable is referenced and run to produce the value of a custom column. The script being run, in my case, compares the creation date of each file and calculates the days since update :

(New-TimeSpan (GI $app.CurrentLocation).LastWriteTime (Date)).Days

Issues were myriad and some intermittent :

  1. 5-10s startup times(~100 jobs)
  2. crash on start
  3. crash during update cycle
  4. unresponsive/flickering interface during update cycle
  5. app update checks timing out("connection timeout": 30)
  6. much slower over-all update cycle("parallel downloads":6)

I also had a global (pre-download) script running, which added this 'script-variable' to jobs automatically(another new feature):

#### ADD DATE VARIABLE IF NOT EXISTING
# Parameters
$varnm = "SinceUpdate"
$vartp = "Textual" #StartEnd #Textual #RegularExpression
#
# Derived access property
$varcnt = if($vartp -eq "Textual"){"TextualContent"}Else{"CachedContent"}

# If it doesn't exist, then create a new one
if(-Not $app.variables.$varnm){
    ECHO "========== $varnm NOT FOUND =========="
    $newvar = New-Object -TypeName Ketarin.UrlVariable -ArgumentList $varnm,$app.variables
    $newvar.VariableType = $vartp  
    $app.variables.Add($varnm, $newvar)
    $app.Save() 
}
#Set newly created variable
$app.variables.$varnm.$varcnt = '(New-TimeSpan (GI $app.CurrentLocation).LastWriteTime (Date)).Days'
####

I've had no issues with multi-segment downloads(using 4 segments).

 

I'm not classing these behaviors as 'bugs', just something to keep in mind when using these features.

Share this post


Link to post
Share on other sites

I would assume that the file access is a bit problematic here (in regard to performance). Also, accessing it while writing to the file might not be a good idea either.  For the custom coulmn, you should use the cached variable content.

 

It shouldn't crash though. At worst, there should be an error message.

Share this post


Link to post
Share on other sites

Thank you, Floele, for all you've done. I can honestly say I use Ketarin every single day, and your continued improvements make my life so much easier. I hate to even think about my life when I had to manually check for every update.

Share this post


Link to post
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

×

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.