Jump to content
Ketarin forum

Search the Community

Showing results for 'rename variable'.

  • Search By Author

Content Type


Forums

  • Discussion
    • General discussion
    • Feature requests
    • Bugs
  • Resources
    • Tips and Tutorials
    • Templates

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Database GUID

  1. Is anyone else having an issue with the {version} variable? I've noticed recently that this variable returns the date for most files rather than the version of the file (see attached file). I append the value of this variable to the end of the files I download from FileHippo so now the file names are a bit off.
  2. Hello, This is my first post here at the forum, so first of all, congratulations on Ketarin. It is most useful and time-saving, I enjoy it a lot and it seems very stable. I just unninstalled Filehippo UC and Updatestar. I have created a customized XML file with more than 50 apps, and everything is running OK. However, I have some rebel apps that just don't want to update: 1 - When I try to download Altiris SVS, *.zip file is renamed to *.zip: (Ketarin adds (). If I download it from FF or IE, there's no rename. Download link: http://www.svsdownloads.com/download_svs.php 2- I'm unable to download Blacklight with FTP, isn't it supported ? http://www.f-secure.com/security_center/ 3- While trying to download Adobe Reader Lite (MajorGeeks) and OpenOffice Portable (Sourceforge), I'm getting timeout errors although I have a 30 sec timeout. http://files6.majorgeeks.com/files/fdfa751b918c18909cd3a8602423748c/office/ar9lite_eng.exe ; http://puzzle.dl.sourceforge.net/sourceforge/portableapps/OpenOffice_Portable_2.4.1_en-us.paf.exe 4- If I download Silverlight from Filehippo, with the global setting "avoid beta versions", I get v1.0, which is most usefull right now. So while I have that setting on (99%), I cannot update Silverlight (a individual setting to avoid betas and alfas would be most usefull). 5- I've been trying to download Synctoy with Ketarin, without sucess. MS does not provide a direct download link, I've also been looking at the page code, but the request is redirected, so I'm out of ideas. Any hints ? http://www.microsoft.com/downloads/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&displaylang=en 6- Although I downloaded Ketarin-0.9.9.4.zip, program help says it's version 0.9.3.0. Is this correct ? Thanks in advance, From Lisbon, FranciscoR
  3. Hi, first of all, I really really love Ketarin. Few years ago I wrote similar tool and I always wanted to rewrite it and make it perfect - but you were first However there is something I am missing. There are some pages (typically SourceForge), where you need to click on few diffrerent links to get where you want. My idea how to solve that was pretty easy, however doesn't work: 1.) Specify {Var1} that is loaded from main page (this can be "Download" button link for example) 2.) Specify {Var2} - source URL is {Var1} + definition This is however not possible (The specified URL is not valid). If you could allow to use variables also for download definition, it would be really nice to support complex sites.
  4. I recently made a change to the structure I use for all my variables and needed to publish it to my server. Since Ketarin doesn't (yet) support commands for non-updates I needed to get the data in a structured format from Ketarin to the database (I'll be passing it through Excel). Anyway... this is what I came up with. It uses Kryogenix sorttable, and some styling and stuff from a few other projects. You can use the aCols array to control which columns are hidden by default. For your own custom variables assign the variable name in one of these Variables/item[key/string='myVariableName']/value/UrlVariable/TextualContent Since parsed variables (like version) aren't cached automatically I setup temporary variables (LastVersion and LastUpdate) to store the version whenever it's updated so it can be accessed through the XML. This uses the script from @Ambimind here. Save the code below to a new file "ketarin.xsl". When you export your XML file you'll need to add this XSL rule above the <Jobs> line: <?xml-stylesheet type="text/xsl" href="ketarin.xsl" ?> I'm sure I'm forgetting stuff, but you are welcome to ask questions here and I'll reply. ketarin.xsl <?xml version="1.0" encoding="UTF-8"?> <html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <head> <title>Ketarin.xml</title> <script type="text/javascript" src="sorttable.js" note="https://www.kryogenix.org/code/browser/sorttable/"></script> <script type="text/javascript"> var toggleDisplay = function (element) { element.style.display = (element.style.display === 'none')?'table-cell':'none'; }; function toggleCol(){ // Slug, Updated, Size, ? aCols=[2,11,12,13,15,16]; for(var lCol = 0; lCol &lt; aCols.length; lCol++){ document.querySelectorAll('th:nth-child('+aCols[lCol]+'), td:nth-child('+aCols[lCol] + ')').forEach(toggleDisplay); } }; </script> <style type="text/css"> body{ font-family:Verdana; font-size:12px; background-color:#ffffff; } table { border: none !important; background-color: #eee; width: 100%; text-align: left; border-collapse: collapse; } table th, table th tr { text-align: center; border: 0; padding: 0; margin: 0; } table td { border: 1px solid #CCCCCC; padding: 3px 2px; vertical-align: middle; } table tbody td { font-size: 11px; vertical-align: middle; } table tr:nth-child(even) { background: #D0F5E4; } table thead { background: #16a085; background: -moz-linear-gradient(top, #258b62 0%, #32bd7c 50%, #16a085 100%); background: -webkit-linear-gradient(top, #258b62 0%, #32bd7c 50%, #16a085 100%); background: linear-gradient(to bottom, #258b62 0%, #32bd7c 50%, #16a085 100%); border: 0 0 0 0; margin: 0 0 2px 0; } table thead tr, table thead tr th { font-size: 14px; font-weight: bold; color: #eee; border: 0 0 0 0 !important; padding: 2px 5px; border-radius: 16px; } table thead th:first-child { border-left: none; } table tfoot { font-size: 12px; font-weight: bold; color: #eee; background: #D0E4F5; background: -moz-linear-gradient(top, #dcebf7 0%, #d4e6f6 66%, #D0E4F5 100%); background: -webkit-linear-gradient(top, #dcebf7 0%, #d4e6f6 66%, #D0E4F5 100%); background: linear-gradient(to bottom, #dcebf7 0%, #d4e6f6 66%, #D0E4F5 100%); border-top: 2px solid #444444; } table tfoot td { font-size: 12px; } table tfoot .links { text-align: right; } table tfoot .links a{ display: inline-block; background: #1C6EA4; color: #FFFFFF; padding: 1px 5px; border-radius: 5px; } th { position: sticky; background: #16a085; top: 0; /* Don't forget this, required for the stickiness */ } table tr td img{width:12px; height:12px; margin:0 6px 0; padding:0 0 0 0; } #platforms img{width:18px; height:18px; margin:0 10px 0 10px; border:0;} .nowrap{ white-space: nowrap; } /* responsive columns */ .col-toggle { -webkit-appearance: none; -webkit-tap-highlight-color: transparent; position: relative; border: 0; outline: 0; cursor: pointer; margin: 10px; } /* To create surface of toggle button */ .col-toggle:after { content: ''; width: 45px; height: 14px; display: inline-block; background: rgba(196, 195, 195, 0.55); border-radius: 18px; clear: both; } /* Contents before checkbox to create toggle handle */ .col-toggle:before { content: ''; width: 16px; height: 16px; display: block; position: absolute; left: 0; top: -2px; border-radius: 50%; background: rgb(255, 255, 255); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); } /* Shift the handle to left on check event */ .col-toggle:checked:before { left: 31px; box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.6); } /* Background color when toggle button will be active */ .col-toggle:checked:after { background: #16a085; } .cm-toggle, .cm-toggle:before, .cm-toggle:after, .cm-toggle:checked:before, .cm-toggle:checked:after { transition: ease .5s; -webkit-transition: ease .5s; -moz-transition: ease .5s; -o-transition: ease .5s; } </style> </head> <body onload="toggleCol();"> <h2>Ketarin</h2> <div id="platforms" style="float:right; text-align:right;"> <input type="checkbox" name="checkbox" class="col-toggle" onclick="toggleCol()" /> </div> <table border="1" class="sortable"> <thead> <tr> <th class="sorttable_alpha">Guid</th> <th class="sorttable_alpha">Enabled</th> <th class="sorttable_alpha">Vendor</th> <th class="sorttable_alpha">Name</th> <th class="sorttable_alpha">Version</th> <th class="sorttable_alpha">Slug</th> <th class="sorttable_alpha">Category</th> <th class="sorttable_alpha">Bits</th> <th class="sorttable_numeric">Size</th> <th class="sorttable_alpha">Platform</th> <th class="sorttable_date">Updated</th> <th class="sorttable_date">Filetime</th> <th class="sorttable_alpha">Website0</th> <th class="sorttable_alpha">Website1</th> <th class="sorttable_alpha">Changelog</th> <th class="sorttable_nosort">Notes</th> </tr> </thead> <tbody> <xsl:for-each select="Jobs/ApplicationJob"> <tr> <td class="nowrap"><xsl:value-of select="./@Guid"/></td> <td><xsl:value-of select="Enabled"/></td> <td><xsl:value-of select="Variables/item[key/string='svendor']/value/UrlVariable/TextualContent" /></td> <td><xsl:value-of select="Name"/></td> <td><xsl:value-of select="Variables/item[key/string='LastVersion']/value/UrlVariable/TextualContent" /></td> <td><xsl:value-of select="Variables/item[key/string='spc']/value/UrlVariable/TextualContent" /></td> <td><xsl:value-of select="Category"/></td> <td><xsl:value-of select="Variables/item[key/string='sbits']/value/UrlVariable/TextualContent" /></td> <td> <xsl:attribute name="sorttable_customkey"><xsl:value-of select="LastFileSize"/></xsl:attribute> <xsl:variable name="thesize" select="LastFileSize"/> <xsl:choose> <xsl:when test="$thesize &gt;= 1073741824"> <xsl:value-of select="format-number($thesize div 1073741824,'#,###.00')"/> <xsl:text> GB</xsl:text> </xsl:when> <xsl:when test="$thesize &gt;= 1048576"> <xsl:value-of select="format-number($thesize div 1048576,'#,###.0')"/> <xsl:text> MB</xsl:text> </xsl:when> <xsl:when test="$thesize &gt;= 1024"> <xsl:value-of select="format-number($thesize div 1024,'#,###')"/> <xsl:text> KB</xsl:text> </xsl:when> <xsl:when test="$thesize &gt; 0 and $thesize &lt; 1024"> <xsl:value-of select="format-number($thesize div 0,'#,###')"/> <xsl:text> Bytes</xsl:text> </xsl:when> </xsl:choose> </td> <td><xsl:value-of select="Variables/item[key/string='splatform']/value/UrlVariable/TextualContent" /></td> <td class="nowrap"><xsl:value-of select="LastUpdated"/></td> <td class="nowrap"><xsl:value-of select="LastFileDate"/></td> <td><xsl:value-of select="WebsiteUrl"/></td> <td><xsl:value-of select="Variables/item[key/string='swebsite']/value/UrlVariable/TextualContent" /></td> <td><xsl:value-of select="Variables/item[key/string='schangelog']/value/UrlVariable/TextualContent" /></td> <td><xsl:value-of select="Variables/item[key/string='snotes']/value/UrlVariable/TextualContent" /></td> </tr> </xsl:for-each> </tbody> </table> </body> </html>
  5. It would be nice to have the Website url (Information tab of applications) as a variable to use it as column in the main view.
  6. Anything new planned in the pipeline for release? How come when i run check for update it says yes there is a download, I run update, downloads update, run check for update, says download is available again, in the commands section i have a command to rename the file, but if I try and update the file again it downloads the file but doesn't rename it. Forcing download also doesn't rename the file. Any ideas please? <?xml version='1.0' encoding='utf-8'?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="d241341a-ce77-4cc7-9478-b6132935d62c"> <WebsiteUrl /> <UserAgent /> <UserNotes /> <LastFileSize>1684480</LastFileSize> <LastFileDate>2018-01-06T07:37:52+10:00</LastFileDate> <IgnoreFileInformation>false</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator /> <HashVariable /> <HashType>None</HashType> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <HttpReferer /> <SetupInstructions /> <Variables /> <ExecuteCommand>ren "{file}" wfc.exe</ExecuteCommand> <ExecutePreCommand /> <ExecuteCommandType>Batch</ExecuteCommandType> <ExecutePreCommandType>Batch</ExecutePreCommandType> <Category>Apps To Install</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation>d:\GEGeek_Toolkit\ProgramFiles\Apps To Install\WFC\wfc5setup.exe</PreviousLocation> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated>2018-01-27T12:41:24.899353+10:00</LastUpdated> <TargetPath>{root}GEGeek_Toolkit\ProgramFiles\{category}\WFC\</TargetPath> <FixedDownloadUrl>http://www.binisoft.org/download/wfc5setup.exe</FixedDownloadUrl> <Name>Windows Firewall Control</Name> </ApplicationJob> </Jobs>
  7. I worked around much of this by parsing the VariableType for each variable. I don't know if it's a parsed or text variable since some apps are necessarily constructed differently. I parse the value as either TextualContent or CachedContent based on the VariableType. I then check to see if the value is equal to the variable name in braces, which would indicate that the variable didn't exist, and removes it if so. Then it checks for a curly brace in the variable contents and if present it performs a ReplaceAllInString so that stuff like file-time information is properly presented. Here's a sample code block: $sversion = switch( $App.Variables."version".VariableType ) { 'Textual' {$App.Variables."version".TextualContent;} default {$App.Variables."version".CachedContent;} } if($sversion -eq "{version}"){$sversion = "";} if($sversion -like '*{*'){$sversion = $($app.variables.ReplaceAllInString($sversion));} Unfortunately, while this resolves a couple problems and vastly improves performance since there's less re-parsing going on, it still fails when the ReplaceAllInString is called against some parsed variables. Here's the specific error case, for Drupal: "schangelogstub" is a RegEx parsed value from https://www.drupal.org/download for href="([^"]+)"[^>]*>[^'"]+notes "schangelog" is a textual variable with value https://www.drupal.org{schangelogstub} Parsing for schangelog within PowerShell forces it to re-request https://www.drupal.org/download every single time ReplaceAllInString is called, even though the value *had* to be parsed (and assumingly cached) in order for the file to have been saved. I know that variables are not parsed unless and until they're called. But the information that they depend on should be pulled from the cache when possible, right? If so, I'd like to think a potential way around this might be to use a single variable that collected the entire contents of the page "/download" instead of using it as a URL source in multiple variables, then repeatedly parsing that variable with TextualVariables. The schangelog sample above suggests that this probably won't resolve the problem. Sigh. I'll try it when I get back tonight. I guess the real question it: What's the effective "life" of cached values?
  8. In order to provide feedback for a specific problem it's always best to share an app XML profile so we can see what you're doing. Select it within the Ketarin list and press CTRL+C to copy it and paste it in a `code` block here. The problem you describe is one I've personally experienced, though. The fix is obvious once you realize it: store the contents of the entire page in a single variable and use variable parsing functions to extract the data you need from the new variable. You can use a regex type variable with ".+" to collect the entire page contents. Use variables of type textual to parse subsequent variables.
  9. Not a bug but rather an issue with the design. The commands tab uses the term "Batch script" which would indicate the need to use double percents (%%) in a for loop, but after spending probably close to 15 minutes trying to figure out why a simple script wasn't working no matter what I tried, I finally changed them to single percents (%) and it worked. So clearly Ketarin is running the commands directly, not as a batch file as implied, causing much confusion and wasted time. This should be clarified somehow. Also, the special variables page states simply (and confusingly), that the {file} variable should be enclosed "in double quotes (”) if the path contains spaces." There are two issues here: it doesn't specify whether the quotes need to be inside (which I wrongly assumed) or outside (what I found after much troubleshooting) the braces and the term "double quotes" implies it needs to be ""{...}"" which is clearly not the case, and it should simply say "quotes." Finally, I tried including {}'s as part of a command (7z.exe e -o{%download_path%} "{file}" *.exe) but it wouldn't work, presumably due to Ketarin thinking the {%download_path%} was one of its variables, even though such a variable doesn't exist. So unless I'm missing something, it seems impossible to have 7-Zip unpack a download into the download directory without first changing to that directory, which is also much harder than it should be due to a lack of a {download_path} variable (an issue I've submitted on userecho).
  10. I'm getting rather strange behaviours from my Ketamon apps in regards to the variable change indicator. For all my other apps this does happen every now and then, it loads when there isn't actually any changes. However slashdot is now continuously saying that the variable is changing everytime I check. Tried adding a User Agent for shits n' giggles but that didn't change much. I don't believe it would actually change page content but what the variable keeps scraping stays consistent. I can load the page in the variable screen ten times and get the same value. I just do a regular update and this keeps going "Yep, it's different". I've even changed the regex around to make it look at other things but it keeps treating it like it has changed. If anyone could give me a hint as to why it keeps going "Yes! This variable value has changed so I will continue with loading everything" I would love ya'll forever. For reference sake this was working fine, with only slight intermittent problems (like with all apps) until today. The site doesn't seem to be having any difficulties. <?xml version='1.0' encoding='utf-8'?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="2862ded8-7f6d-4f6c-821d-f65ba0256e8f"> <SourceTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SourceTemplate><![CDATA[]]]]><![CDATA[></SourceTemplate> <LastFileDate xsi:nil="true" /> <IgnoreFileInformation>false</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator>page</VariableChangeIndicator> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <HttpReferer /> <SetupInstructions /> <Variables> <item> <key> <string>monitor</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>.*</Regex> <Url><placeholder name="URL" value="http://slashdot.org/" /></Url> <Name>monitor</Name> </UrlVariable> </value> </item> <item> <key> <string>name</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>title>(.*?)</</Regex> <Url><placeholder name="URL" value="http://slashdot.org/" /></Url> <Name>name</Name> </UrlVariable> </value> </item> <item> <key> <string>page</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <Url /> <TextualContent><placeholder name="URL" value="http://slashdot.org/" /></TextualContent> <Name>page</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <ExecutePreCommand>start {page} & exit 2</ExecutePreCommand> <ExecuteCommandType>Batch</ExecuteCommandType> <ExecutePreCommandType>Batch</ExecutePreCommandType> <Category>Web Page Monitoring</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation /> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated xsi:nil="true" /> <TargetPath>:</TargetPath> <FixedDownloadUrl>https://www.google.com/images/logos/mail_logo.png</FixedDownloadUrl> <Name><placeholder name="Name of application" variable="name" value="Slashdot: News for nerds, stuff that matters" /></Name> </ApplicationJob> </Jobs>]]></SourceTemplate> <WebsiteUrl /> <UserAgent /> <UserNotes /> <LastFileSize>0</LastFileSize> <LastFileDate xsi:nil="true" /> <IgnoreFileInformation>true</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator>monitor</VariableChangeIndicator> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <HttpReferer /> <SetupInstructions /> <Variables> <item> <key> <string>monitor</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>datitle">(.*?)</</Regex> <Url>http://slashdot.org/</Url> <Name>monitor</Name> </UrlVariable> </value> </item> <item> <key> <string>name</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><title>.*?(\S.*?)\s*</title></Regex> <Url>http://slashdot.org/</Url> <Name>name</Name> </UrlVariable> </value> </item> <item> <key> <string>page</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <Url /> <TextualContent>http://slashdot.org/</TextualContent> <Name>page</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <ExecutePreCommand>start {page} & exit 2</ExecutePreCommand> <ExecuteCommandType>Batch</ExecuteCommandType> <ExecutePreCommandType>Batch</ExecutePreCommandType> <Category>Technology</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation /> <DeletePreviousFile>false</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated xsi:nil="true" /> <TargetPath>,</TargetPath> <FixedDownloadUrl>https://www.google.com/images/logos/mail_logo.png</FixedDownloadUrl> <Name>Slashdot: News for nerds, stuff that matters</Name> </ApplicationJob> </Jobs>
  11. Today I accomplish both the 'copy' function and the 'rename' function manually. Still cumbersome especially if it needs to be done with many apps. Yes XML can be edited but I'd still like to work within the variable dialog if possible. Today I go to the variable dialog on an app, find the existing variable I want to copy or rename, and copy out the URL, regex, start/end string info, textual content... to my text editor. I then add a new variable via the variable dialog, and paste in the URL, regex, etc. ('Find start/end' delimiters have to be set up again, if those are in use.) So now I have made a copy of the first variable. If this was intended as a 'rename', I delete the first variable and I'm done. If it was intended as a 'copy' I can now proceed to modify the new variable copy as I desire. If we can have at least the 'copy variable' function, that would cover both of my 'wishes'. The rename function becomes just two steps (clone then delete original variable name). Of course a 'rename variable' option turns that into one step. So far the votes I've collected are for rename. But if I have to choose just one, I'll ask that it be 'copy' instead. --appyface
  12. Is posible to have same kind of autoincrement varible?
  13. Would it be possible to implement an error variable to output the exact error to a logfile? If it is a 403/404 or whatever. {apperror} or something along those lines so it is 'per app'. I'm using it more for the following set a={apperror} if defined a echo %a%>>error.txt if not exist error.txt taskkill /f /im ketarin.exe Also can we have the log screen be clearable? The setup instruction window is always 'on top' when I am trying to look at the log for the setup instructions so if we could make it so that the log window can be viewed that would be nice.
  14. I know there are lots of predefined variables such as {file} and {filesize}. I also know that Ketarin is kind of geared towards FileHippo.com. It seems that there should be a way, at least for applications from FileHippo, that one could easily capture the version of the software just downloaded into a variable to be used with the command to execute after updating an application. For example, to pass as a parameter to a script to send an e-mail to me saying "Version [version] of [application] was just downloaded". It doesn't look like there is a predefined variable to do this. Is there a way to do this as a user-defined variable? If so, how?
  15. Hi, @jusseppe! I've had a chance now to try this myself and the biggest issue was that the alternate port I attempted to use would not work until I closed and reopened Ketarin. This made all the difference for me. I've pasted the exact text you'll want to use in the "global variables" feature below to make it easier to ensure it is correct. For the variable named "run_kuppet": if(!(PS kuppet -ea 0)) {START -WindowsStyle hidden BIN\kuppet 8008} Or, alternatively, use this to show the log as it happens: if(!(PS kuppet -ea 0)) {START BIN\kuppet 8008} For the variable named ">": {run_kuppet:ps}http://localhost:8008/
  16. Would be nice if we had an extra context menu item called "Copy fully resolved variable" or something like that. So using it on {download} it would paste as http://www.moo.com/wee.exe or http://{download} would become http://http://www.moo.com/wee.exe For multi-links and refers this would be helpful. Alternatively perhaps if in the context menu alongside the variable names presented it had {download} - http://www.moo.com/wee.exe OR {download} - [Not yet resolved]
  17. Another option where root folders are using version numbers (as is the case with DDU) in the root folder is to rename the destination folder before unzipping and then rename it back to the generic version when finished. move "\Ketarin\Drivers\DDU" "DDU v{version}" 7z -spe ... move "\Ketarin\Drivers\DDU v{version}" "DDU"
  18. For example the variable {website} captures the always changing website and after i set this variable to the field and doubleclick the application, my default browser is opened with the website the variable captured.To make it easy to understand: I think this should be fairly easy to add and useful
  19. Yes, this is all pretty much what you'd be typing at a command prompt. Maybe what you're after is robocopy or xcopy to overwrite only the older files from the archived copy to the new copy? Assuming you're running a backup first. Something like this: move "C:\Program Files\Launchbox\Emulators\Dolphin\Updates\Dolphin" Dolphin-backup "{7z}" x "{file}" -o"C:\Program Files\Launchbox\Emulators\Dolphin\Updates" -y move "C:\Program Files\Launchbox\Emulators\Dolphin\Updates\Dolphin-x64" Dolphin robocopy "C:\Program Files\Launchbox\Emulators\Dolphin\Updates\Dolphin-backup" "C:\Program Files\Launchbox\Emulators\Dolphin\Updates\Dolphin" /w:1 /r:1 /e /xo del /s /q "C:\Program Files\Launchbox\Emulators\Dolphin\Updates\Dolphin-backup\*.*" rd /s /q "C:\Program Files\Launchbox\Emulators\Dolphin\Updates\Dolphin-backup" The above *should* rename the original Dolphin folder to Dolphin-backup, extract to Dolphin-x64, rename Dolphin-x64 to Dolphin, copy your preferences and the files that are newer (such as cache files) from Dolphin-backup to Dolphin, then purge and remove Dolphin-backup. Untested, but should work.
  20. I'm not 100% sure if this is a bug or not, but it seemed the most likely place to post. The code i'm posting does essentially find the first executable file, set the directory that it is in as the variable dir. This helps for zips that get extracted to one or more subfolders. Also a little bit extra code for not overwriting existing ini files. Trouble is the code works fine in batch/cmd line. However putting it in Ketarin it doesn't expand %dir% in this instance. If I do echo %dir% will echo the variable expanded however using it in a command it doesn't seem to expand. I've spent a while on this and i'm not sure why it does this. {7z} x "{file}" -o"{p2}{appname:regexreplace: \(.*\):}" -y dir /b /s "{p2}{appname:regexreplace: \(.*\):}"\*.exe > "{p2}{appname:regexreplace: \(.*\):}"\1.txt set /p f=<"{p2}{appname:regexreplace: \(.*\):}"\1.txt echo %f% > "{p2}{appname:regexreplace: \(.*\):}"\2.txt for /f "tokens=*" %a in ("{p2}{appname:regexreplace: \(.*\):}"\2.txt) do set dir=%~dpa {copy} "%dir%" "{p1}{category}\{appname:regexreplace: \(.*\):}\" rd /s /q "{p2}{appname:regexreplace: \(.*\):}" this is the resulting log output 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: start /wait D:\"Programs\File Management\7-ZipPortable\App\7-Zip\7z.exe" x "D:\Software\Programs\Video\mplayer-SVN-r32669.7z" -o"D:\Ketatemp\MPlayer WW" -y 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: dir /b /s "D:\Ketatemp\MPlayer WW"\*.exe > 1.txt 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: set /p f=<1.txt 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: echo %f% > 2.txt 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: for /f "tokens=*" %a in (2.txt) do set path=%~dpa 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: if exist "D:\Programs\Video\MPlayer WW"\mplayer.ini del "%path%"\mplayer.ini 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: if exist "D:\Programs\Video\MPlayer WW"\kk.ini del "%path%"\kk.ini 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: if exist "D:\Programs\Video\MPlayer WW"\input.ini del "%path%"\input.ini 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: xcopy /C /E /H /I /Y "%path%" "D:\Programs\Video\MPlayer WW\" 04/12/2010 5:24:57 AM: MPlayer WW: Executing command: rd /s /q "D:\Ketatemp\MPlayer WW" 04/12/2010 5:24:58 AM: MPlayer WW: Command result: Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. D:\Programs\Internet\Ketarin>start /wait D:\"Programs\File Management\7-ZipPortable\App\7-Zip\7z.exe" x "D:\Software\Programs\Video\mplayer-SVN-r32669.7z" -o"D:\Ketatemp\MPlayer WW" -y D:\Programs\Internet\Ketarin>dir /b /s "D:\Ketatemp\MPlayer WW"\*.exe > 1.txt D:\Programs\Internet\Ketarin>set /p f=<1.txt D:\Programs\Internet\Ketarin>echo %f% > 2.txt D:\Programs\Internet\Ketarin>for /f "tokens=*" %a in (2.txt) do set path=%~dpa D:\Programs\Internet\Ketarin>set path=D:\Ketatemp\MPlayer WW\mplayer_release\mplayer\ D:\Programs\Internet\Ketarin>if exist "D:\Programs\Video\MPlayer WW"\mplayer.ini del "%path%"\mplayer.ini D:\Programs\Internet\Ketarin>if exist "D:\Programs\Video\MPlayer WW"\kk.ini del "%path%"\kk.ini D:\Programs\Internet\Ketarin>if exist "D:\Programs\Video\MPlayer WW"\input.ini del "%path%"\input.ini D:\Programs\Internet\Ketarin>xcopy /C /E /H /I /Y "%path%" "D:\Programs\Video\MPlayer WW\" 'xcopy' is not recognized as an internal or external command, operable program or batch file. D:\Programs\Internet\Ketarin>rd /s /q "D:\Ketatemp\MPlayer WW" D:\Programs\Internet\Ketarin> I've deleted the app and made it fresh/new, but still the same problem. If someone else has a ketarin install that they may like to try this out on i'd appreciate it. here is the xml for my app <?xml version='1.0' encoding='utf-8'?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="c78ede13-9565-40a4-94d2-a875886e8aa0"> <SourceTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <WebsiteUrl /> <UserNotes /> <IgnoreFileInformation>false</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <UserAgent>{sfua}</UserAgent> <HttpReferer></HttpReferer> <Variables> <item> <key> <string>download</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>(http[^"']+[^"']+(\.zip|\.rar|\.7z))</Regex> <Url>http://sourceforge.net{folder2}</Url> <Name>download</Name> </UrlVariable> </value> </item> <item> <key> <string>folder1</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>["']([^"']+projects[^"']+files[^"']+)/"</Regex> <Url><placeholder name="Application Page URL" value="http://sourceforge.net/projects/mplayer-ww/files/" /></Url> <Name>folder1</Name> </UrlVariable> </value> </item> <item> <key> <string>folder2</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>["']([^"']+projects[^"']+files[^"']+)/"</Regex> <Url>http://sourceforge.net{folder1}</Url> <Name>folder2</Name> </UrlVariable> </value> </item> <item> <key> <string>name</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>title="/(.*?)/</Regex> <Url><placeholder name="Application Page URL" value="http://sourceforge.net/projects/mplayer-ww/files/" /></Url> <Name>name</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand>/*This is a comment line, the line below is the C# script. It will run the instructions found in the Setup Tab*/ app.Install(null);</ExecuteCommand> <ExecutePreCommand /> <ExecuteCommandType>CS</ExecuteCommandType> <ExecutePreCommandType>Batch</ExecutePreCommandType> <SetupInstructions /> <Category><placeholder name="Category" value="Video" /></Category> <SourceType>FixedUrl</SourceType> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <TargetPath>{s1}{category}\</TargetPath> <FixedDownloadUrl>{download}</FixedDownloadUrl> <Name><placeholder name="Name of application" variable="name" value="MPlayer_Release" /></Name> </ApplicationJob> </Jobs>]]></SourceTemplate> <WebsiteUrl /> <UserAgent>{sfua}</UserAgent> <UserNotes /> <LastFileSize>8556426</LastFileSize> <LastFileDate>2010-12-04T02:38:59.3821005</LastFileDate> <IgnoreFileInformation>false</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <HttpReferer /> <SetupInstructions> <SetupInstruction xsi:type="CustomSetupInstruction"> <Code>{7z} x "{file}" -o"{p2}{appname:regexreplace: \(.*\):}" -y dir /b /s "{p2}{appname:regexreplace: \(.*\):}"\*.exe > 1.txt set /p f=<1.txt echo %f% > 2.txt for /f "tokens=*" %a in (2.txt) do set path=%~dpa if exist "{p1}{category}\{appname:regexreplace: \(.*\):}"\mplayer.ini del "%path%"\mplayer.ini if exist "{p1}{category}\{appname:regexreplace: \(.*\):}"\kk.ini del "%path%"\kk.ini if exist "{p1}{category}\{appname:regexreplace: \(.*\):}"\input.ini del "%path%"\input.ini {copy} "%path%" "{p1}{category}\{appname:regexreplace: \(.*\):}\" rd /s /q "{p2}{appname:regexreplace: \(.*\):}"</Code> <Type>Batch</Type> </SetupInstruction> </SetupInstructions> <Variables> <item> <key> <string>download</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>class="status.*?(http[^"']+[^"']+(\.zip|\.rar|\.7z))</Regex> <Url>http://sourceforge.net{folder1}</Url> <Name>download</Name> </UrlVariable> </value> </item> <item> <key> <string>folder1</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>["']([^"']+projects[^"']+files[^"']+)/"</Regex> <Url>http://sourceforge.net/projects/mplayer-ww/files/</Url> <Name>folder1</Name> </UrlVariable> </value> </item> <item> <key> <string>folder2</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>["']([^"']+projects[^"']+files[^"']+)/"</Regex> <Url>http://sourceforge.net{folder1}</Url> <Name>folder2</Name> </UrlVariable> </value> </item> <item> <key> <string>name</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>title="/(.*?)/</Regex> <Url>http://sourceforge.net/projects/mplayer-ww/files/</Url> <Name>name</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand>/*This is a comment line, the line below is the C# script. It will run the instructions found in the Setup Tab*/ app.Install(null);</ExecuteCommand> <ExecutePreCommand /> <ExecuteCommandType>CS</ExecuteCommandType> <ExecutePreCommandType>Batch</ExecutePreCommandType> <Category>Video</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation>D:\Software\Programs\Video\mplayer-SVN-r32669.7z</PreviousLocation> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated>2010-12-04T02:38:59.3821005</LastUpdated> <TargetPath>{s1}{category}\</TargetPath> <FixedDownloadUrl>{download}</FixedDownloadUrl> <Name>MPlayer WW</Name> </ApplicationJob> </Jobs>
  21. I still need help though with that unnecessary folder though I've tried the -x"Dolphin-x64" method listed above and it doesn't seem to work. I assume that would delete the folder before it extracts the files? I think I have to use the wildcard support method and I've gone to the link but it's confusing. Does it only work for Linux operating systems? Like I don't see a download link for the software or is it even software? Folders don't have extensions so I am a little confused on how I would do this. Also for programs like MusicBee where the name constantly changes based on the version, I'd assume I'd enter the rename command after the file is downloaded and rename it to whatever. Anyways, thanks a lot this program and your support is amazing. "{7z}" x "{file}" -o"C:\Program Files\Launchbox\Emulators\Dolphin\Updates" -y ren "{Dolphin-x64}" Dolphin
  22. Could substitution value for global variables be shown in the logfile? Thanks and regards, --appyface
  23. 1. It may be beneficial to have Ketarin auto-expand any user defined global variable found upon exporting an app to XML or to the online database. It should be relatively simple, just have it search for all non-internal variables. Basically anything encapsulated in {} that Ketarin doesn't recognize without looking up the 'global variables' table. Also upon importing an XML 'or' database app it will first consult all your global variables that you have in your Ketarin and then re-global variabalize them (I love making new words). So basically upon importing an XML Ketarin will go "Here is all the text found in all the global variables" then perform a "search and replace" function on anything found in the XML. So if there is a {root}Programs\Audio\Foobar2000 it will replace the {root}Programs\Audio with whatever the pre-defined global variable is. For arguments sake let's just say it is {installpath}. So simplified when you export an app that has {installpath} you will in the XML get {root}Programs\Audio and when you import that XML ketarin will automagically turn {root}Programs\Audio back into {installpath} if that global variable is still present. This should help greatly with sharing of apps and the like. 2. I listed this earlier but gave a stupid topic header for it but I would appreciate another icon for when Ketarin is actually performing install instructions. At the moment it just stays a green arrow throughout download/install, maybe a picture of a computer blinking or a HDD spinning to indicate local activity? 3. App processing prioritization, been propped up a few times but never really heard Floele's opinion. A lot of things get lost in the forums sadly enough so this is just being propping it up again. The ol' "Oh, this app has a number 1! I will process this first then number 2 if I find it and the remaining apps in the current sort order" I used to have a long list but it got deleted in some mystical corruption, but I would appreciate it if we could allow global variables to contain all functions and whatnot in Ketarin pwetty pwease? Feedback would be appreciated, just trying to help Ketarin get to where Floele wants it to go which is to be more user/noob friendly.
  24. This may only be a problem with {startuppath} or it may be with other variables as well, but this is the only one I've dealt with. I couldn't find another post about it, so hopefully it's new (I'm running version 1.5.0.400). My flash drive has a drive letter X:\ I download apps to a folder X:\Applications Ketarin.exe is located on the root of X:\ When I use the variable "{startuppath}\Applications" the end result looks like "X:\\Applications" (Notice two back-slashes) However, when I use the same variable path on "C:\Downloads\Ketarin" I see "C:\Downloads\Ketarin\Applications" (One back-slash) I tried using "{startuppath}Applications" which fixes the X drive to X:\Applications, but changes the other to "C:\Downloads\KetarinApplications" I can live with the X:\\ because for some reason the files still download to their correct folders, but if I enter any kind of command line like telling a file to delete before an app downloads, I get an error in the log saying the command can't find the file "X:\\Applications\FileToDelete". I used to sync my Ketarin folder between my flash drive and PC so I could download files during the day and sync to the flash drive later, or so I could backup any changes I've made while out of the office. Hopefully all this makes sense. Thanks for the help!
  25. Hi floele, what I´m trying to do is: Prefered method: - Loading an url - finding multiple strings with regex - saving the results in an array - using the array to generate a pool down menu - splitting a variable and getting the last part without knowing the split counts, or maybe getting the max count as command So I solved it for now: - Load an url - find the first match and save it in VAR "FirstMatch" - load the url one more time, find the end of first match and use it for Regex cursor to find second match - and so on - manual scripting the regex, cuz every app needs another method to get the last part Very complicated! In many cases It would be a great function to do not regex an url, but a variable and see what the hell I´m doing. ;-) Maybe I did not find the right way, but if it´s really missing, such function would be GREAT and would speed up the updates, cuz I could save a content in a variable without loading the url every time I need to run another regex. Any idea? Help me and I´ll give you the best SF-Template you´ve ever seen ;-)
×
×
  • 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.