Difference between revisions of "Basics"

From Ketarin
(Example 1)
 
 
(8 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
== Example 1: Monitor CDBurnerXP updates ==
 
== Example 1: Monitor CDBurnerXP updates ==
  
If a sofware package, like CDBurnerXP, is always downloadable from a fixed URL which automatically points to the latest version, it's rather simple.  
+
If a software package, like CDBurnerXP, is always downloadable from a fixed URL which automatically points to the latest version, it's rather simple.  
  
 
'''Add a new application''', enter a '''name''' and enter the '''URL'''. CDBurnerXP can always be downloaded from http://cdburnerxp.se/downloadsetup.exe, so this is what we are going to use in this example. Since the downloaded file name actually varies (it includes the version number), '''save it to a folder''' so that this file name is used instead of a fixed one. You probably also want to delete previously downloaded files (advanced settings), otherwise you'd keep an archive of ''all'' versions of CDBurnerXP.  
 
'''Add a new application''', enter a '''name''' and enter the '''URL'''. CDBurnerXP can always be downloaded from http://cdburnerxp.se/downloadsetup.exe, so this is what we are going to use in this example. Since the downloaded file name actually varies (it includes the version number), '''save it to a folder''' so that this file name is used instead of a fixed one. You probably also want to delete previously downloaded files (advanced settings), otherwise you'd keep an archive of ''all'' versions of CDBurnerXP.  
Line 9: Line 9:
 
[[File:Edit-CDBurnerXP.png]]
 
[[File:Edit-CDBurnerXP.png]]
  
{{note}} You can also use a [http://en.wikipedia.org/wiki/Portable_Application_Description PAD file] URL as download URL (for example http://cdburnerxp.se/rss/padfile.xml). Ketarin will then automatically extract the actual download URL from the PAD file data. Make sure, that the PAD file is kept up-to-date by the author though.
+
{{note}} You can also use a [http://en.wikipedia.org/wiki/Portable_Application_Description PAD file] URL as download URL (for example http://cdburnerxp.se/rss/padfile.xml). Ketarin will then automatically extract the actual download URL from the PAD file data. Just make sure that the PAD file is kept up-to-date by the author though.
 +
 
 +
{{note}} For more advanced scenarios, URLs using the [[HTTPX protocol]] (as mentioned in [[Troubleshooting downloads]]) may be required.
  
 
== Example 2: Monitor a package from filehippo.com ==
 
== Example 2: Monitor a package from filehippo.com ==
  
[[http://www.filehippo.com/|FileHippo]] is a frequently updated website which lists all kinds of software packages. It also provides a download opportunity. Ketarin can make use of this information.  
+
{{FileHippo}} is a frequently updated website which lists all kinds of software packages. It also provides a download opportunity. Ketarin can make use of this information.  
  
Let's use SmartFTP in this example. As in example 1, add a new application and enter a name. Instead of an URL, however, copy and paste the URL of SmartFTP on filehippo.com (http://www.filehippo.com/download_smartftp/) into the **FileHippo ID** text field. It will automatically extract the corresponding ID from it. Since the name of the downloaded file can also vary in this case, choose a directory as location.  
+
Let's use SmartFTP in this example. As in example 1, add a new application and enter a name. Instead of an URL, however, copy and paste the URL of SmartFTP on filehippo.com (http://www.filehippo.com/download_smartftp/) into the '''FileHippo ID''' text field. It will automatically extract the corresponding ID from it. In this case I'm using a fixed file name, since I both download the 32 bit and 64 bit version of SmartFTP.
  
{{:images:kb:ketarin-smartftp.png}}
+
[[File:Edit-SmartFTP.png]]
  
===== Example 3: Monitor Firefox =====
+
== Example 3: Monitor Firefox ==
  
Using FileHippo is quite convenient, however, they only list **English language** software packages. So if you want to, let's say, monitor the German version of Firefox you can't use it. Also, there is no fixed direct download URL available for Firefox.  
+
Using {{FileHippo}} is quite convenient, however, they only list '''English language''' software packages. So if you want to, let's say, monitor the German version of Firefox you can't use it. Also, there is no fixed direct download URL available for Firefox.  
  
So what do we do? First of all, let's download the wanted version of Firefox from http://www.mozilla.com/en-US/firefox/all.html. Once the download has started, determine the location you are downloading from. Depending on the browser you are using, you can possibly rightclick on the active download and choose “Show source URL” or “Copy source URL to clipboard”. The actual URL could be this one for example:  
+
So what do we do? First of all, let's download the desired version of Firefox from http://www.mozilla.com/en-US/firefox/all.html. Once the download has started, determine the location you are downloading from. Depending on the browser you are using, you can possibly rightclick on the active download and choose “Show source URL” or “Copy source URL to clipboard”. The actual URL could be this one for example:  
  
<code>
+
<blockquote>
http://mozilla.jiddernet.se/firefox/releases/3.0.1/
+
http://mozilla.jiddernet.se/firefox/releases/3.0.1/win32/de/Firefox%20Setup%203.0.1.exe
win32/de/Firefox%20Setup%203.0.1.exe
+
</blockquote>
</code>
 
  
 
From this URL, we can probably figure, that we'd only have to replace the version number 3.0.1 with the new version number as soon as an update for Firefox is available. So let's use this one as URL:  
 
From this URL, we can probably figure, that we'd only have to replace the version number 3.0.1 with the new version number as soon as an update for Firefox is available. So let's use this one as URL:  
  
<code>
+
<blockquote>
http://mozilla.jiddernet.se/firefox/releases/{version}/
+
http://mozilla.jiddernet.se/firefox/releases/{version}/win32/de/Firefox%20Setup%20{version}.exe
win32/de/Firefox%20Setup%20{version}.exe
+
</blockquote>
</code>
 
  
{{:images:kb:ketarin-firefox.png}}
+
[[File:Edit-Firefox.png]]
  
Now we only have to define where to get //{version}// from. To do this, click on the **Variables** button next to the URL.  
+
Now we only have to define where to get ''{version}'' from. To do this, click on the '''Variables''' button next to the URL.  
  
Press Enter or click the +-Button. Enter “version” (without quotes) as name. For “Contents of URL” enter http://www.mozilla.com/en-US/firefox/all.html. Press **Load**. In the field below, enter “german” and press **Find**. Scroll a bit down if necessary, until you see  
+
Press Enter or click the +-Button. Enter “version” (without quotes) as name. For “Contents of URL” enter http://www.mozilla.com/en-US/firefox/all.html. Click '''Load'''. In the field below, enter “german” and click '''Find'''. Scroll a bit down if necessary, until you see  
  
<code>
+
<blockquote>
 
<td class="curVersion" >3.0.1</td>
 
<td class="curVersion" >3.0.1</td>
</code>
+
</blockquote>
  
This seems like a nice portion of the site to extract the latest version number from. Select the text before 3.0.1 and press “Use selection as start”, then select the text after 3.0.1 and press “Use selection as end”. Now **3.0.1** should be drawn in a bold font, with a red text before and a blue text behind.
+
This seems like a nice portion of the site to extract the latest version number from. Select the text before 3.0.1 and click “Use selection as start”, then select the text after 3.0.1 and click “Use selection as end”. Now '''3.0.1''' should be highlighted, as well as the text before and behind the version in a different colour.
  
<note>
+
{{note}} For the "start selection", Ketarin will always use the ''first'' occurrence of the string, and for the "end selection" the first occurrence ''after'' the "start selection" will be used.
For the "start selection", Ketarin will always use the **first** occurrence of the string, and for the "end selection" the first occurrence **after** the "start selection" will be used.
 
</note>
 
  
{{:images:kb:ketarin-edit-variables.png}}
+
[[File:Edit-Variables.png]]
  
Press OK. Now Ketarin will always replace {version} in the URL with the version number written on the website, which should lead to a valid download URL.  
+
Click OK. Now Ketarin will always replace {version} in the URL with the version number written on the website, which should lead to a valid download URL.  
  
Enter the remaining information (save path, options) and press OK.
+
Enter the remaining information (save path, options) and click OK.

Latest revision as of 17:47, 8 March 2016

In order to get started with Ketarin, we'll show you how you can make Ketarin download applications for you with a couple of examples.

Example 1: Monitor CDBurnerXP updates

If a software package, like CDBurnerXP, is always downloadable from a fixed URL which automatically points to the latest version, it's rather simple.

Add a new application, enter a name and enter the URL. CDBurnerXP can always be downloaded from http://cdburnerxp.se/downloadsetup.exe, so this is what we are going to use in this example. Since the downloaded file name actually varies (it includes the version number), save it to a folder so that this file name is used instead of a fixed one. You probably also want to delete previously downloaded files (advanced settings), otherwise you'd keep an archive of all versions of CDBurnerXP.

Edit-CDBurnerXP.png

Note Note: You can also use a PAD file URL as download URL (for example http://cdburnerxp.se/rss/padfile.xml). Ketarin will then automatically extract the actual download URL from the PAD file data. Just make sure that the PAD file is kept up-to-date by the author though.

Note Note: For more advanced scenarios, URLs using the HTTPX protocol (as mentioned in Troubleshooting downloads) may be required.

Example 2: Monitor a package from filehippo.com

FileHippo.png FileHippo is a frequently updated website which lists all kinds of software packages. It also provides a download opportunity. Ketarin can make use of this information.

Let's use SmartFTP in this example. As in example 1, add a new application and enter a name. Instead of an URL, however, copy and paste the URL of SmartFTP on filehippo.com (http://www.filehippo.com/download_smartftp/) into the FileHippo ID text field. It will automatically extract the corresponding ID from it. In this case I'm using a fixed file name, since I both download the 32 bit and 64 bit version of SmartFTP.

Edit-SmartFTP.png

Example 3: Monitor Firefox

Using FileHippo.png FileHippo is quite convenient, however, they only list English language software packages. So if you want to, let's say, monitor the German version of Firefox you can't use it. Also, there is no fixed direct download URL available for Firefox.

So what do we do? First of all, let's download the desired version of Firefox from http://www.mozilla.com/en-US/firefox/all.html. Once the download has started, determine the location you are downloading from. Depending on the browser you are using, you can possibly rightclick on the active download and choose “Show source URL” or “Copy source URL to clipboard”. The actual URL could be this one for example:

http://mozilla.jiddernet.se/firefox/releases/3.0.1/win32/de/Firefox%20Setup%203.0.1.exe

From this URL, we can probably figure, that we'd only have to replace the version number 3.0.1 with the new version number as soon as an update for Firefox is available. So let's use this one as URL:

http://mozilla.jiddernet.se/firefox/releases/{version}/win32/de/Firefox%20Setup%20{version}.exe

Edit-Firefox.png

Now we only have to define where to get {version} from. To do this, click on the Variables button next to the URL.

Press Enter or click the +-Button. Enter “version” (without quotes) as name. For “Contents of URL” enter http://www.mozilla.com/en-US/firefox/all.html. Click Load. In the field below, enter “german” and click Find. Scroll a bit down if necessary, until you see

3.0.1

This seems like a nice portion of the site to extract the latest version number from. Select the text before 3.0.1 and click “Use selection as start”, then select the text after 3.0.1 and click “Use selection as end”. Now 3.0.1 should be highlighted, as well as the text before and behind the version in a different colour.

Note Note: For the "start selection", Ketarin will always use the first occurrence of the string, and for the "end selection" the first occurrence after the "start selection" will be used.

Edit-Variables.png

Click OK. Now Ketarin will always replace {version} in the URL with the version number written on the website, which should lead to a valid download URL.

Enter the remaining information (save path, options) and click OK.