Jump to content
Ketarin forum

For ALL Ketarin Power-Users...


CybTekSol
 Share

Recommended Posts

Checkout the power and flexibility of Ketarin's 'placeholder' feature in the latest templates posted by FranciscoR and myself. I believe this is ONLY the BEGINNING as I have faith that Flo has a few more tricks up his sleeve for future versions. ;) Possibly 'variables embedded within variables' or IF, THEN, ELSE capability Flo? You up for it? ;)

Link to comment
Share on other sites

Possibly 'variables embedded within variables' or IF, THEN, ELSE capability Flo?

That's also an old dream of myne. =D

 

One aditional feature I think it's lacking is the hability to extract selected data from placeholders, e.g., you I insert an URL (or something) like

 

hxxp://www.versiontracker.com/php/dlpage.php?id=9679&db=win&pid=10008952&kind=&lnk=http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe

 

And apply regex to use only the required part of adress:

 

hxxp%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe

 

Not only that, it would be nice to have the ability to create a replacement string (=final url in example)

 

hxxp://www.jam-software.com/treesize/TreeSizeProfessional-Demo.exe

 

Or assuming I would like to extract PID, I would use regex to capture only

 

10008952

 

So this would be an easy way to "export" PID to other variables. =)

Edited by FranciscoR
Link to comment
Share on other sites

Yes, that would be most handy. But where would we insert regex then ?

 

What I have thought for the "replacement string" is a classical search and replace feature, also with regular expressions (no ?), that could be located under the "Textual Content" tab. We could split the "Textual Content" tab into something like:

 

1. Input:

2. Search:

3. Replace:

4. Output:

 

And I would use Output to serve all other variables. =)

Link to comment
Share on other sites

Agreed, I just haven't use it like that !!! But now that you mention it, and I was looking at available functions again, I think I can achieve the above results (I will do some testing) with trimend/trimstart/split. Maybe that additional "regex" attribute is not needed after all? Thanks anyway ! ;)

Edited by FranciscoR
Link to comment
Share on other sites

What extactly do you want to do with {appname}? I don't quite understand yet.

Like I said in this thread I want a resolve-me-once variable which will retrieve an application name and fill the appropriate field only once when I add the application using that template.

That variable will only be resolved once and after the app entry was create it can be auto-deleted.

Link to comment
Share on other sites

Indeed it works:

 

17-02-2009 00:05:31: Update started with 1 application(s)
17-02-2009 00:05:31: aaa: Replacing {app} in '{app:split:=:5}' with 'http://www.versiontracker.com/php/dlpage.php?id=9679&db=win&pid=10008952&kind=&lnk=http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe'
17-02-2009 00:05:31: aaa: Replacing {app2} in '{app2:replace:%2F:/}' with 'http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe'
17-02-2009 00:05:31: aaa: Replacing {app3} in 'http:{app3:replace:http%3A:}' with 'http%3A//www.jam-software.com/treesize/TreeSizeProfessional-Demo.exe'
17-02-2009 00:05:32: aaa: Checking if update is required...
17-02-2009 00:05:32: aaa: Update required, 'D:\Programas\Test\TreeSizeProfessional-Demo.exe' does not yet exist
17-02-2009 00:05:32: aaa: Replacing {app} in '{app:split:=:1}' with 'http://www.versiontracker.com/php/dlpage.php?id=9679&db=win&pid=10008952&kind=&lnk=http%3A%2F%2Fwww.jam-software.com%2Ftreesize%2FTreeSizeProfessional-Demo.exe'
17-02-2009 00:05:32: aaa: Replacing {id} in '{id:split:&:0}' with '9679&db'
17-02-2009 00:05:32: aaa: Replacing {id1} in 'http://www.versiontracker.com/dyn/moreinfo/win/{id1}' with '9679'
17-02-2009 00:05:34: aaa: Replacing {version} in '{version}' with '5.1.2'
17-02-2009 00:05:34: Update finished

 

But this involves a certain amount of work (7 variables to solve example), how about a regex function ? =D

 

For templates we always need wildcards...

Edited by FranciscoR
Link to comment
Share on other sites

We're up for anything your mind can conceive that will add more advanced functions for difficult downloads and at the same time simplify the process for the user... essentially in the same legacy that Ketarin has already established Flo. ;) No pressure from me... take your time!

Link to comment
Share on other sites

I think a regex function is much, much needed, especially if you're working in sites that provide several DL URLs in each page (and you insert a DL URL in placeholder (like my Ghisler template)). I am now working in another similar template, and if I would use the above procedure, *just* to get {version}, I would have to use *15* functions/variables, and we are talking of a universe of 30 files, no more. Now imagine how many functions you will have to use in sites with thousands of files, hundreds of functions... when, in fact, you need only *1* regex to bypass all that naming convention complication...

Link to comment
Share on other sites

Flo,

 

Are you serious ? Is THAT complicated ? The alternative I can think of, that will produce the same result, is to insert a "Use Regular Expression" field in the Textual Content Tab (which is almost always empty)... the advantage over a regex function is clear, you can SEE what you're matching... in the end, the Textual Content Tab will look like the "Content from URL (Regular Expression)" Tab... does this make it easier ? I see some copy-paste possibility here... maybe this will help ? We certainly don't need anything THAT complicated. ;)

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.