Jump to content
Ketarin forum
FranciscoR

Nirsofer.net template

Recommended Posts

<?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>(?:<td>.{0,4}?(?:\w+?\s){1,5})+?(?:v)(\d{1,2}\p{P}\d\d)</Regex>
           <Url><placeholder name="Application Page URL" /></Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>app</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>RegularExpression</VariableType>
           <Regex>(?:<a class=.+?)(?:href=")(\w+\p{P}zip)(?:\")</Regex>
           <Url><placeholder name="Application Page URL" /></Url>
           <Name>app</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <Category>Nirsofer</Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile>true</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath>{target}\{category}\{appname}_{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>http://www.nirsoft.net/utils/{app}</FixedDownloadUrl>
   <Name><placeholder name="Application Name" /></Name>
 </ApplicationJob>
</Jobs>

 

Insert App Page URL and App name. App Page URL example: http://www.nirsoft.net/utils/mspass.html

 

Note: only for 32-bit portable apps. Regex was tested against several urls in this site retrieving NO error (24-01-2009).

 

ycqjm.png

Share this post


Link to post
Share on other sites

This is no big deal and there's certainly no comparison with your own templates... for me this is usefull because like this I only have to import one single template with customized tags (including commands), insert url and name, push update and everything else is done in a breeze. ;)

 

Btw, if there is demand, I can also provide a 64-bit version of it.

Share this post


Link to post
Share on other sites

Notice: today I updated 3 files to the same version, so I thought there was an error on XML. There isn't; although release date is unchanged, 25/01/2009, files where updated on the Nirsofer server on 28/01/2009 and 29/01/2009.

Share this post


Link to post
Share on other sites
Guest Guest

Just tried this, and Ketarin complains of a stray  tag in line 18-- is it misinterpreting the regular expression characters? I'm not an XML expert- can anyone help?

Share this post


Link to post
Share on other sites
Just tried this, and Ketarin complains of a stray tag in line 18-- is it misinterpreting the regular expression characters? I'm not an XML expert- can anyone help?
I'm not exactly "an expert" but I believe (judging from my own experiences with Ketarin) that it may very well be "picking" on the "regex quantifier" on that line (e.g.: "{0,4}" or "{1,5}" right after) - my solution in all cases were this was true was to either eliminate the quantifier, substituting it for an "+" (ilimited, greedy), or just try to "escape" the all "{" characters (JUST IN REGEX QUANTIFIERS!!! NOT IN VARIABLES!), e.g. "\{".

 

Also, if you're editing directly (manually, in notepad) your .XML files, there's some characters that should be "converted". e.g.: "<" becomes "<" (html 'lesser than') and ">" becomes ">" (html 'greater than') inside the "values" of any field, in this case, the "Regex" field, noted by <Regex> (start of the field) and </Regex> (end of the field).

 

So, line 18 could become:

<Regex>(?:<td>.\{0,4}?(?:\w+?\s)\{1,5})+?(?:v)(\d\{1,2}\p{P}\d\d)</Regex>

 

INSTEAD OF:

<Regex>(?:<td>.{0,4}?(?:\w+?\s){1,5})+?(?:v)(\d{1,2}\p{P}\d\d)</td></Regex>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • 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.