Jump to content
Ketarin forum

A Demonstration of the NEW 'placeholder' values feature...


CybTekSol
 Share

Recommended Posts

My EXAMPLE Generic template using NEW 'placeholder' values:

 

I am posting this simply to demonstrate the NEW 'placeholder' values feature implemented by Florian today, February 23, 2009.

 

NOTE: It is a variation of my 'generic' template posted two weeks ago which I use

when an application is not hosted on one of the major sites for which I have

an existing template.

 

1) The latest version of Ketarin (1.0.3) released February 23, 2009 or later is required

as this revision uses the new 'placeholder' values feature implemented by Florian.

 

2) The template follows:

<?xml version="1.0" encoding="utf-16"?>
<Jobs>
 <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <HttpReferer />
   <Variables>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>RegularExpression</VariableType>
           <Regex>Latest[ ]Version.*?(Beta.+?|Build.+?|\d.*?)[<|&]</Regex>
           <Url><placeholder name="Enter URL to be 'scraped'" value="http://www.download.com/" /></Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>download_url</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>RegularExpression</VariableType>
           <Regex>a href="([a-z]+://.*?\.(?:exe|7z|zip|zip2|bz|bz2|bzip|gz|gzip|jar|lha|lzh|lzw|pak|rar|sit|sit!|sit5|sitd|sithqx|sitx|tz|wsz|cab|msi|bin|img|iso|xpi|pbp))"</Regex>
           <Url><placeholder name="Enter URL to be 'scraped'" value="http://www.download.com/" /></Url>
           <Name>download_url</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <Category><placeholder name="Category" value="New-Category" /></Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile>true</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath><placeholder name="Target path" value="{target}\{category}\{appname}_{version}.{url:ext}" /></TargetPath>
   <FixedDownloadUrl>{download_url}</FixedDownloadUrl>
   <Name><placeholder name="Application Name" value="New-App" /></Name>
 </ApplicationJob>
</Jobs>

 

This template is for demonstration purposes only, therefore, I will remove it after a few days as I just wanted users to see how this new feature will make using templates more efficient.

 

CybTekSol

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.