Jump to content
Ketarin forum

MAPJe71

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by MAPJe71

  1. The PowerShell script I use to split an applications-export XML file into individual XML files: $inFile = $args[0] $directory = Split-Path -Parent $MyInvocation.MyCommand.Path $ketarinExport = [xml](Get-Content $inFile) foreach ($job in $ketarinExport.Jobs.ApplicationJob) { [xml]$xmlDoc = New-Object system.Xml.XmlDocument $xmlDoc.LoadXml("<?xml version=`"1.0`" encoding=`"utf-8`"?><Jobs/>") $xmlNode = $xmlDoc.ImportNode($job, $true) $null = $xmlDoc.LastChild.AppendChild($xmlNode) $outFile = Join-Path $directory ($job.Name + ".xml") $xmlDoc.Save($outFile) }
  2. What is exactly the problem? Adding a custom command in Ketarin and/or figuring out the right paramters for 7Zip? Example for a custom command: START "" /B /MIN /WAIT "<Your-7Zip-path>\7z.exe" e "{file}" -bd -o"<Your-Output-Path>" -y
  3. FYI I have been able to retrieve a direct-download URL using Ketarin. It requires two request-verification tokens. The first token can be found in a cookie. You have to retrieve the token from the cookie because it changes regulary and is somehow connected to the second token. Haven't verfied it yet but I guess its value changes daily. The second token can be retrieved from the applications page. This token changes on every get-request of that page. I was not able to retrieve the first token from the cookie using Ketarin. I used Fiddler to get the token value and added it as a constant (i.e. textual content variable) in Ketarin to retrieve the direct-download URL.
  4. Selecting 'C# script' as a command shows the following info ... /* Enter a custom C# script here. C# is case sensitive. "app" references the current application. Example: MessageBox.Show(app.Name); = Notable methods = app.PreviousLocation Corresponds to the variable {file} app.Variables.ReplaceAllInString("Any {text} with variables.") Replaces all known variables in a given string. Example: string new = app.Variables.ReplaceAllInString("{file}") return; Exits the script. Abort("Error text"); Exits the script with a given error. */ I could not find any additional info here in the forum or on the Wiki. So I was wondering if anyone knows more about the API in additional to the aforementioned 'notable methods' and could point me in the right direction. Thanx, Menno
  5. Is it possible (and when yes how) to assign a value to a variable in a C# command script? Thanx, Menno
  6. CodePlex requirs two request-verification-tokens to retrieve the redirect-URL to download the actual file. One token can be retrieved from the applicable HTML-page. The other token can be retrieved from a cookie. However, AFAIK Ketarin does not support reading cookies. In order to be able to use Ketarin to download from CodePlex I hereby request the feature to read cookies. Preferable in such a way that it is possible to store the data in a variable (e.g. "Content from Cookie").
  7. I have used http://fiddler2.com/ to debug/investigate the communication between the CodePlex-site and a browser (FireFox & Chrome). Tried to have Ketarin exchange the same messages with CodePlex. Failed to do so with resolving the 'variables'. Will try some C# code/script next.
  8. Filetime seems to be 100-nanoseconds since Jan 1 1601 e.g. 130108901247070000 == Friday, April 19, 2013 8:08:45pm. See also / I used: http://www.silisoftware.com/tools/date.php
  9. Well I guess you have several RegEx options for that particular URL ... - Parse the title of the window: (?<=\<title\>Download\D+?)\d{1,5}\.\d{1,5}(?:\.\d{1,5}(?:\.\d{1,5})?(?:\sRC\d)?|\sBeta\s\d{1,2}|b\d{1,2})?(?=\D) - Parse a meta tag: (?<=meta itemprop=['"]softwareVersion['"] content=['"]\D*?)\d{1,5}\.\d{1,5}(?:\.\d{1,5}(?:\.\d{1,5})?(?:\sRC\d)?|\sBeta\s\d{1,2}|b\d{1,2})?(?=['"]) - Parse the download table on the far right on the page: (?<=dlboxinner.+?Version\D*?)\d{1,5}\.\d{1,5}(?:\.\d{1,5}(?:\.\d{1,5})?(?:\sRC\d)?|\sBeta\s\d{1,2}|b\d{1,2})?(?=\D) Regards, Menno
  10. @shawn Could you post what you found up till now so someone else can give it a try? Thnx
  11. Yep, escaping the closing curly bracket only works just fine! Thnx
  12. Hi, I defined a textual variable which uses the regexreplace function to rearrange some values e.g. {mytemp:regexreplace:(\d{1,2})\s(\d{1,2}),\s(\d{2,4}):$3-$1-$2} It uses the '{...}'-quantifier but this conflicts with the Ketarin-variable-definition. I re-defined the variable to {mytemp:regexreplace:(\d+)\s(\d+),\s(\d+):$3-$1-$2} but was wondering if there is another solution e.g. 'escaping' the curly brackets (tried '\', did not work). Thanks, Menno
×
×
  • 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.