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. Hello, First of all : many thanks for this great app ! It saves me a lot of time when I install a new PC so, once again, thank you Florian ! Just a question : is there a predefined variable like {file} but without x.exe ? in fact the path entered in the "save to" field, I need it for a post-treatment command. I know it's possible to define a path using global variables and/or category/appname but it doesn't respond to my needs. Two others things, I might better post them in "Feature requests" but there are not really requests, just hints. - Searching for "Firefox" in the online database leads to many results (11 at the moment), not always very clear. Wouldn't be interesting to add a field "Comments" in the database so that one can add notes like "french version", "german version", "beta" or "portable" in this comment field instead of the main field ? In particular for those who use {appname} in their saving location. - I use Ketarin for 2 goals : one is to update installers before creating unattended windows CD (professionnal use) and the second is just to maintain my personals systems up to date. Applications are not the same for these 2 goals. I wonder if it will be possible for Ketarin to manage more than one database in the future ? Thanks in advance for your answers
  2. Florian, I know we have discussed this in another subject's thread but I wanted to make it 'official' by posting it here in detail. As a former lead guitarist from childhood I was never successful in 'remapping' (in my brain) my left hand for PC keyboard speed and therefore rely heavily on 'drop-down lists' to increase my efficiency. Could you please add a right-click drop-down list feature in the 'New Variable' window that displays ALL applicable 'declared' AND 'global' variables to INCLUDE the 'most frequently' used ones? I know you are busy, so take your time... I just wanted to put the request in the queue. THANKS for your consideration!
  3. Would be good also to be able to change the name of a variable once it's been defined. This can be conveniently placed where the add (+) and remove (-) buttons are.
  4. I have an application with \ in its name. Because I save all my applications to {DEST_DIR}\{category}\{appname}_{version}.{url:ext} it errors out because of the \. I tried using {appname:replace:\:} and {appname:replace:\\:} but it just uses the {appname:replace:\:} in the name without substituting it with actual values. The field where I use it is "Save to file".
  5. The URL shown in solution A is taken from AIMP's windows download page. While it includes no obvious reference to an executable, when followed, their web server will always redirect to the latest version of AIMP's exe. When a Ketarin variable is provided a URL which does not refer to a file containing searchable textual content, it returns the file's HTTP headers instead; this feature is used to determine the latest version+build number, in solution A. When regular expressions employ "capturing groups"(eg. G1 & G2), only the first capturing group(G1) match, backed by red, is returned. This is true even when another, valid capturing group(G2) is matched(not marked by Ketarin). In this scenario blue backed text indicates the rest of the text matched by the regex - not returned. When capturing groups are absent from a regex, blue backed text indicates the match that will be returned as the variable value. Note : I've deliberately shortened the original regex to improve readability.
  6. Oh great, another forum that doesn't email me like it's supposed to when I get replies... I looked at the special variable page, but I still don't see how to do what I want, and based on your answers, I'm guessing it's not possible, which is crazy. When I add a new program, and I edit it, I can't hit ok because it tells me I need to set a download location. What I want is for this to always, on every newly created entry, to be filled in automatically with a path I specify, perhaps with path\{category}. If I'm understanding your responses correctly, I can create a variable called, e.g., {downloads} and specify it as that (path\{category}), but I'd still need to then manually enter {downloads} in every new item. Another thing that seems like it would be frustrating going through creating dozens/hundreds of items is that you can't set which action when clicking the "Add new application" button is the default, so to import from online database, which seems like it would be the easiest way, as theoretically it's already configured (though every time I've tried it's not, so I have no clue what the point of it is), you have to click the drop-down arrow and select that every...single...time. There's not even a key shortcut like there is for new application (Ctrl+N), so that option can be accessed either via a key combo or clicking the button, whereas the option that seems like it would be more useful requires two clicks either way. Seriously, am I just really not understanding this program, or is it much more complicated to use than it should be?
  7. Hi Shawn, I've already read through the wiki, thanks for the hint. The problem is that msiexec /q /nr "{startuppath}\..\InstallDir2\Installer2.msi" does not fly, at least not on the Windows 10 Pro (1909) computer I was testing on. "..\" does not get interpreted as "one directory above the current one" but leads to a "file not found" error with msiexec. In the end it doesn't matter if I use the {startuppath} or the {file} variable as the final string still contains '..\' Batch scripting this would need some jumping through hoops and Powershell is not the tool of my choice (I'm not reluctant to learning, it's just too Microsoftish in many ways ...). I did some testing with custom install scripts but stopped when "%~dp0" did not expand to the current path in my batch script (I know that envvar %CD% would do the same in this case). Maybe I'll be doing some more testing and report back with what I've found out. Regards Peter --- Edit 1 I've checked if I could work around the issue with a custom setup batch script. The problem with that is, that depending on how the Ketarin executable is started the path changes (e.g via Script from the parent directory or manually from the Ketarin subdirectory). Depending on the point of view, the problem is either Windows Installer not supporting relative paths (I've found a post where someone from MS confirms this https://www.pcreview.co.uk/threads/problem-with-msiexec-and-relative-path.1544499/) or Ketarin not expanding the path when building the variables. I guess the {file} variable gets concatenated from {startuppath} and the path configured for the download location in a string operation. I've tried modifying the {file} variable with "regexreplace" which does not seem to work in the "Start process" context of setup instructions (me being stupid might also be the reason for this). --- Edit 2 "Me being stupid" seems to be the issue ... I've worked around the issue with the following solution: - In the Setup section I've set the action to "Start process ..." with following paramters. Program to start: msiexec.exe Arguments: /i {file:replace:\Ketarin\..\:} /qn /norestart - This does exactly what the relative path should be doing, it removes the Ketarin program directory and also the "..\" makro from the string.
  8. @shawn For now I've implemented the following solution: Using post-variables(see image below), each Ketarin-job-variable specifies a "redirection-delay", measured in seconds. Kuppet will wait for this duration after the initial page load, during which it is supposed that any landing-page-timers have completed and the actual page has begun to load, after which kuppet will wait till the page has finished loading(absence of network requests for 500ms).
  9. ApplicationJobDialog.cs Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Instances of this error (2) 1. Hide Call Stack at System.Data.SQLite.UnsafeNativeMethods.sqlite3_open_interop(Byte[] utf8Filename, Byte[] vfsName, SQLiteOpenFlagsEnum flags, Int32 extFuncs, IntPtr& db) at System.Data.SQLite.SQLite3.Open(String strFilename, String vfsName, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, Int32 maxPoolSize, Boolean usePool) at System.Data.SQLite.SQLiteConnection.Open() at Ketarin.DbManager.get_NewConnection() in d:\Ketarin-master\DbManager.cs:line 197 at Ketarin.DbManager.get_Connection() in d:\Ketarin-master\DbManager.cs:line 140 at Ketarin.DbManager.GetSnippets() in d:\Ketarin-master\DbManager.cs:line 731 at Ketarin.Forms.CommandControl.LoadSnippets() in d:\Ketarin-master\Forms\CommandControl.cs:line 270 at Ketarin.Forms.CommandControl.set_CommandType(ScriptType value) in d:\Ketarin-master\Forms\CommandControl.cs:line 221 at Ketarin.Forms.CommandControl..ctor() in d:\Ketarin-master\Forms\CommandControl.cs:line 230 2. Hide Call Stack at System.Data.SQLite.UnsafeNativeMethods.sqlite3_open_interop(Byte[] utf8Filename, Byte[] vfsName, SQLiteOpenFlagsEnum flags, Int32 extFuncs, IntPtr& db) at System.Data.SQLite.SQLite3.Open(String strFilename, String vfsName, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, Int32 maxPoolSize, Boolean usePool) at System.Data.SQLite.SQLiteConnection.Open() at Ketarin.DbManager.get_NewConnection() in d:\Ketarin-master\DbManager.cs:line 197 at Ketarin.DbManager.get_Connection() in d:\Ketarin-master\DbManager.cs:line 140 at Ketarin.DbManager.GetSnippets() in d:\Ketarin-master\DbManager.cs:line 731 at Ketarin.Forms.CommandControl.LoadSnippets() in d:\Ketarin-master\Forms\CommandControl.cs:line 270 at Ketarin.Forms.CommandControl.set_CommandType(ScriptType value) in d:\Ketarin-master\Forms\CommandControl.cs:line 221 at Ketarin.Forms.CommandControl..ctor() in d:\Ketarin-master\Forms\CommandControl.cs:line 230 The variable 'txtExecuteBefore' is either undeclared or was never assigned. Instances of this error (1) 1. Ketarin ApplicationJobDialog.Designer.cs Line:669 Column:1 Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) The variable 'txtExecuteAfter' is either undeclared or was never assigned. Instances of this error (1) 1. Ketarin ApplicationJobDialog.Designer.cs Line:703 Column:1 Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) CustomSetupInstructionDialog.cs Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Instances of this error (1) 1. Hide Call Stack at System.Data.SQLite.UnsafeNativeMethods.sqlite3_open_interop(Byte[] utf8Filename, Byte[] vfsName, SQLiteOpenFlagsEnum flags, Int32 extFuncs, IntPtr& db) at System.Data.SQLite.SQLite3.Open(String strFilename, String vfsName, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, Int32 maxPoolSize, Boolean usePool) at System.Data.SQLite.SQLiteConnection.Open() at Ketarin.DbManager.get_NewConnection() in d:\Ketarin-master\DbManager.cs:line 197 at Ketarin.DbManager.get_Connection() in d:\Ketarin-master\DbManager.cs:line 140 at Ketarin.DbManager.GetSnippets() in d:\Ketarin-master\DbManager.cs:line 731 at Ketarin.Forms.CommandControl.LoadSnippets() in d:\Ketarin-master\Forms\CommandControl.cs:line 270 at Ketarin.Forms.CommandControl.set_CommandType(ScriptType value) in d:\Ketarin-master\Forms\CommandControl.cs:line 221 at Ketarin.Forms.CommandControl..ctor() in d:\Ketarin-master\Forms\CommandControl.cs:line 230 The variable 'commandControl' is either undeclared or was never assigned. Instances of this error (2) 1. Ketarin CustomSetupInstructionDialog.Designer.cs Line:67 Column:1 Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) 2. Ketarin CustomSetupInstructionDialog.Designer.cs Line:73 Column:1 Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) SettingsDialog.cs Instances of this error (1) 1. Hide Call Stack at System.Data.SQLite.UnsafeNativeMethods.sqlite3_open_interop(Byte[] utf8Filename, Byte[] vfsName, SQLiteOpenFlagsEnum flags, Int32 extFuncs, IntPtr& db) at System.Data.SQLite.SQLite3.Open(String strFilename, String vfsName, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, Int32 maxPoolSize, Boolean usePool) at System.Data.SQLite.SQLiteConnection.Open() at Ketarin.DbManager.get_NewConnection() in d:\Ketarin-master\DbManager.cs:line 197 at Ketarin.DbManager.get_Connection() in d:\Ketarin-master\DbManager.cs:line 140 at Ketarin.DbManager.GetSnippets() in d:\Ketarin-master\DbManager.cs:line 731 at Ketarin.Forms.CommandControl.LoadSnippets() in d:\Ketarin-master\Forms\CommandControl.cs:line 270 at Ketarin.Forms.CommandControl.set_CommandType(ScriptType value) in d:\Ketarin-master\Forms\CommandControl.cs:line 221 at Ketarin.Forms.CommandControl..ctor() in d:\Ketarin-master\Forms\CommandControl.cs:line 230 The variable 'commandControl' is either undeclared or was never assigned. Instances of this error (1) 1. Ketarin SettingsDialog.Designer.cs Line:617 Column:1 Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) So most of this just refers to this I imagine: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. The DLL I have in the directory, but I think its probably not enough and I need to do something more. I have no idea. So the 3 files with errors ApplicationJobDialog.cs, CustomSetupInstructionDialog.cs and SettingsDialog.cs Running VS2017. Thanks
  10. Hi jusseppe, I attempted a solution you can find below. It works, however there are various corner-cases that can confuse it. I made attempts to anticipate and avoid those confusions(I excluded them from what follows), however I could not do it to my satisfaction. The life-cycle of Ketarin url-variables makes this difficult, specifically : 1. Url-variables are updated first, and provided as such to both pre and post download commands(without access to the previous) 2. Regular-expression-url-variables, will not update at all, unless explicitly used within a job or column. 3. Url-variables will update their values, even if no file is download. There are work-arounds, but they are limiting. The Powershell script : #PARAMETERS # $pv : Name of Ketarin variable that will display previous version. # $cv: Name of the Ketarin variable that will display current version. # #ASSUMPTIONS # 1.That the job has a urlVariable dedicated to displaying the previous version number. # 1.That the job has a urlVariable dedicated to displaying the current version number. # 2.Script will be run AFTER the download is complete. # 3.That $pv is a Textual Content variable. # #NOTES # 1.The script uses the "postData" property of $pv. # 2.Job will begin showing previous version on the second update. # 3.There are a series of corner cases not accounted for. # 3.1.For example, when an update occurs, without file download # 4. The script is independant of file names, # VARIABLES # # Parameters $pv = "previous" $cv = "version" # # Previous Variable Property Values $pvPostData = $app.variables.$pv.postData $pvContent = $app.variables.$pv.TextualContent # # Get the type of url-variable used for the current version $cvType = $app.variables.$cv.VariableType # Based on type(3 possible), determine the property name that holds the value $pnm = if($cvType -eq "Textual"){"TextualContent"}Else{"CachedContent"} # Use it to get the current value(from this cycle) $cvContent = $app.variables.$cv.$pnm # MAIN # # 1. Copy postData(stored last cycle) to content of previous version variable $app.variables.$pv.TextualContent = $pvPostData # 2. Copy content of current version variable(stored this cycle) to postData property of $pv $app.variables.$pv.postData = $cvContent
  11. Hello ! Thank's for the awesome soft, that I'm testing since yesterday . It's possible to add a function for check if update exist, but who compare the {version} variable vs a local "history.log" ? Because I like to systematically extract the archives and then delete them. Same as the files, which I rename systematically. Therefore ketarin legitimately thinks that a new version is released. I have make a similar fonction in batch, added on the "command before downloading" section. It compare the {version} variable vs an "history.log" file, who obviously contain the number version of application previously downloaded (maked whith the "commands after updating" ). If {version}=="version in history.log", then exit 3. It function good, but here's my "problem" : I would like the "green checked icon" instead of "yellow + floppy disk" icon. So... It's possible to add natively this option ? Or if not, It's possible to implemant an "exit 4", who completely TOTALY break the check / download precedure, AND display the green icon ? My second (big) problem is that "exit*" codes not function on the global "commands before updating" (it's normal ?)... Therefore, it is mandatory to enter my batch for each program individually, which makes it all really fastidious . Consider exit codes on global commands would be very appreciable :). Thank's for reading ! PS : sorry for my very bad English.
  12. hi everyone, i try to modify the version variable like this : <Variables> <item> <key> <string>version</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex/> <TextualContent>{psversion:ps}</TextualContent> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>psversion</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex/> <TextualContent>[System.Diagnostics.FileVersionInfo]::GetVersionInfo("{file}").FileVersion </TextualContent> <Name>psversion</Name> </UrlVariable> </value> </item> </Variables> but with an app from online database it doesn't work : 28/02/2022 22:53:41: Notepadplus: Replacing {psversion} in '{psversion:ps}' with '[System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Users\Dumont\Downloads2\clef usb programme\clef\programmes personnels gratuits\Ketarin\..\installateur\Notepadplus\npp.8.3.2.Installer.exe").FileVersion ' 28/02/2022 22:53:41: Notepadplus: PowerShell command of downloaded application is not executed for security reasons. 28/02/2022 22:53:41: Notepadplus: Replacing {version} in '{version}' with '' How can i perform this with an online database app ?
  13. Two issues I see. 1) I think you're confusing the Ketarin term "global variable" with PowerShell variables. 2) PowerShell scripts are self-contained - they don't exist outside of themselves and any values you want to use within a script need to be extracted within the script itself. However, to address your problem I recommend just adding the folder your 7zip executable is in (or the folder Ketarin resides within) to the PATH variable so you can avoid the problem completely. We've had similar issues like this in the past and I know many of us have added our Ketarin folders to the PATH and we just put our utilities in the same folder as Ketarin.
  14. Bug report: Since I added new variables to my general structure I wanted to update my default app template. I clicked 'add new application'. I clicked on 'variables'. I added several variables and set most of them to regex, since that's what I almost always use for those, and two as text. I clicked OK then went to 'advanced settings' and attempted to assign version as the change indicator. It wasn't listed. I had set version as a regex variable. I revisited the variables page and recreated it, noticing that all the regex variables I created were lost. All the text ones were still there. I had not assigned a URL to the regex variables, but IMHO it should never delete variables on me. Worst case scenario it should nag/warn me or provide an idiot prompt ("are you sure you don't want to add a URL for this variable?") and then ignore the variable during processing or automatically disable it when I save it.
  15. thanks, I was converting some batch/sqlite scripts to PowerShell. one problem I hit was, that I couldn't create new variable. That thread you pointed out is describing newly added constructor and how to use it. It's working fine, I don't have problem there. This is another issue, which I already had while using batch/sqlite. It seems like that when you add a Custom Column with Textual variable, lines under the Custom Column are showing CachedContent, regardless of type of variable used being Textual (StartEnd / Textual / RegularExpression) When you set Textual variable in Ketarin, only TextualContent is updated and without a workaround, where I am copying values from TextualContent to CachedContent, the Custom Column shows nothing. Of course the workaround is not perfect, but satisfactory for my case. My question being, is this happening only to me? Or is this a bug/program limitation. I think this problem is related. Thirdly, I don't see a way to update the view. When I change the variable, old value is still showing under Custom Column. I can open/close Settings and it will update, but I would expect there should be PS way to refresh the view.
  16. this is great, can we copy posts like this to wiki? Google didn't offer me this as a result, I went down the same path, but giving up sooner, when `$newVar = New-Object -TypeName Ketarin.UrlVariable` did Error. Ended up using .Clone, which was working, but only when app has at least one variable. Then I found this post and used it in this function: # Changes variable value: $app.variables.<var_name>, creates new if it doesn't exists # usage: changeVar "my_var_name" "value" function changeVar { param( [String]$Name, [String]$Value, [String]$Type = "Textual" #StartEnd or #Textual or #RegularExpression ) # Derived access property, ie. app.variables.$varnm.$varcnt $Prop = if ($Type -eq "Textual"){"TextualContent"}Else{"CachedContent"} if (!$app.variables.$Name) { # create new variable $newVar = New-Object -TypeName Ketarin.UrlVariable -ArgumentList $Name,$app.variables $newVar.VariableType = $Type $newVar.$Prop = $Value $app.variables.Add($Name, $newVar) $oldTC = $null } else { # changing existing value $oldTC = $app.variables.$Name.TextualContent $oldCC = $app.variables.$Name.CachedContent $app.variables.$Name.$Prop = $Value } # workaround 1 - Copy value to CachedContent property, # so it will show under Column in main UI if ($Type -eq "Textual") {$app.variables.$Name.CachedContent = $Value} # workaround 2 - Clear the TextualContent property, # I needed this once, but it was probably because of a broken jobs.db. # No value was showing under Column, if TextualContent wasn't empty #$app.variables.$Name.TextualContent = $null $app.Save() # --- Log function shrt ($s) { # shorten if too long $MAX_LENGTH = 30 if ($s.length -gt $MAX_LENGTH) {return $s.Substring(0,$MAX_LENGTH-3) + '...' } else {return $s} } if ($oldTC -eq $null) { Write-Host "* Created variable: $Name, of type [$Type]," } else { Write-Host "* Changed variable: $Name, of type [$Type]," Write-Host (" from: " + (shrt $oldTC) + " | " + (shrt $oldCC)) } Write-Host (" to: " + (shrt $app.variables.$Name.TextualContent) + " | " + (shrt $app.variables.$Name.CachedContent)) Write-Host " (showing: TextualContent | CachedContent)" } <# To dot-source file, with this function in Ketarin script: # avoid using absolute path, get Ketarin working folder $pathInclude = Join-Path $app.variables.ReplaceAllInString("{startuppath}") "Include" . "$pathInclude\Variables.ps1" #> to add date, as in Ambimind post, use: $date = Get-Date -UFormat %d-%m-%y changeVar "LastUpdate" $date # or: changeVar "LastUpdate" (Get-Date -UFormat %d-%m-%y)
  17. Not directly. However, if the option to "use the following variable as indicator for changes" is enabled with your version variable, then it checks the parsed "version" against your version variable and will only download if the version is different.
  18. Guest

    No caching 3

    Saving to a variable doesn't work either: everytime I access the variable it resolves its content again, i.e. it accesses the website again. Some websites I use have a quota and accessing the same content several times is counter-productive. Or maybe I'm just to stupid to do it right. For example, how would I make Ketarin read out the date and users of all posts of this conversation while accessing this site only once?
  19. It looks like there's a problem with synchronicity. The global variable for {run_kuppet} must not be getting parsed as frequently as it needs to be by Ketarin since Kuppet isn't staying alive long enough - or even launching at all if Ketarin has been open for an extended period of time. Since I always have Ketarin open this means that Kuppet often doesn't behave well. To resolve this problem I've rewritten several of my apps to avoid Cloudfront and rewrote the {run_kuppet} to simply: START "BIN\kuppet.exe" "8008 30000" This no longer checks for an existing instance of Kuppet, which means that subsequent calls will each attempt to load it, and will be ignored since an existing instance is already running. Since I don't have window:hidden flag, this results in several windows popping up briefly and disappearing almost instantaneously. This is a good thing since it indicates that the first instance is still running, and allows Kuppet to be reinstantiated on demand should it time out. Now almost every app that I'm using Kuppet for is working well, with a random stall on a couple sites that use site throttling and large files (but the file still downloads fine). I think increasing the Kuppet timeout (or eliminating it entirely) will resolve both of these problems.
  20. Hi all, this is my first template and i´m new on ketarin. So hints and tips are welcome ;-) Requirements: - You need WGET for Windows. Get it on Softpedia and place the wget.exe in the same DIR of Ketarin. - The variable {2DIR} is my custom directory, where the files are stored. Set, change or delete it as you wish under Ketarin. How it works: - First of all you´ll be asked for the URL of your desired Tool on Softpedia. Copy&paste the url of the main page of the tool on Softpedia. - Enter the desired name for your App Rest will done with Regex: - Finding the Linkpage for Download - Finding the Screenshot, defining the name and extension - Getting the "direct link" of redirection page - Parsing the short description As known, Sourceforge redirects are a bit tricky and this template will not work if Softpedia use those links. Unter "Commands" you´ll find some code. - WGET loads the first screenshot and saves it unter <Appname>.<original extension from server>. - ECHO will create a new file with the content of short description for your app The extension is .info and it´s a txt file. Feel free to rename the extension for your needs. Have fun Gozi Version 1.9.4 (working ONLY with > 1.5 beta 5) For Ketarin 1.4 please use version 1.91! Whats new: Little help instructions inside Added template version number. So you´ll see which template version was used Added License parsing from Softpedia <?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><placeholder name="Enter the Softopedia url" /></WebsiteUrl> <UserNotes><placeholder name="User Notes" variable="SetUserNotes"/></UserNotes> <LastFileSize>106681</LastFileSize> <LastFileDate>2010-09-26T23:50:38.7502</LastFileDate> <UserAgent>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)</UserAgent> <IgnoreFileInformation>false</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator>version</VariableChangeIndicator> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <HttpReferer>{WebsiteUrl}</HttpReferer> <Variables> <item> <key> <string>TemplateVersion</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>1.9.4</TextualContent> <Name>TemplateVersion</Name> </UrlVariable> </value> </item> <item> <key> <string>TemplateAutor</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>Gozi</TextualContent> <Name>TemplateAutor</Name> </UrlVariable> </value> </item> <item> <key> <string>AutorsEditoral</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>Version 1.9.4 by Gozi Requirements: Ketarin version > 1.5 b6 You need WGET for Windows. Get it on Softpedia and place the wget.exe in the same DIR of Ketarin. How it works: First of all you´ll be asked for the URL of your desired Tool on Softpedia. Copy and paste the url of the main page of the tool on Softpedia. Rest will done with Regex: This Template supports auto naming. Finding the Linkpage for Download Finding the Screenshot, defining the name and extension Getting the "direct link" of redirection page Parsing the short description Unter "Commands" you´ll find some code. WGET loads the first screenshot and saves it unter Appname.original extension from server. ECHO will create a new file with the content of short description for your app. The extension is .info and it´s a txt file. Feel free to rename the extension for your needs. Whats new: Parsing license from Sofpedia Site </TextualContent> <Name>AutorsEditoral</Name> </UrlVariable> </value> </item> <item> <key> <string>InfoPage</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>{property:WebsiteUrl}</TextualContent> <Name>InfoPage</Name> </UrlVariable> </value> </item> <item> <key> <string>License</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>href="http://www.softpedia.com/user/licensing.*?>([\S]*)</a></Regex> <Url>{InfoPage}</Url> <TextualContent>{property:WebsiteUrl}</TextualContent> <Name>License</Name> </UrlVariable> </value> </item> <item> <key> <string>APPName</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>5px;">([\s\w]*) description<</Regex> <Url>{InfoPage}</Url> <Name>APPName</Name> </UrlVariable> </value> </item> <item> <key> <string>version</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><title>Download {APPName} ([\s\d\w.]*) Free</Regex> <Url>{InfoPage}</Url> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>GetDownloadLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><a href="([^\s]*)" title="Download </Regex> <Url>{InfoPage}</Url> <Name>GetDownloadLink</Name> </UrlVariable> </value> </item> <item> <key> <string>GetFileLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><a href="([^\s]*)" title="Download </Regex> <Url>{GetDownloadLink}</Url> <Name>GetFileLink</Name> </UrlVariable> </value> </item> <item> <key> <string>GetRedirect</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex> If it doesn't, please <a href="([\d\s\w\S]*)" rel</Regex> <Url>{GetFileLink}</Url> <Name>GetRedirect</Name> </UrlVariable> </value> </item> <item> <key> <string>GetSSLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>href="http://www.softpedia.com/progScreenshots/([^\s]*)"</Regex> <Url>{InfoPage}</Url> <Name>GetSSLink</Name> </UrlVariable> </value> </item> <item> <key> <string>GetSSImage</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>href="http://www.softpedia.com/screenshots/([^\s]*)"</Regex> <Url>http://www.softpedia.com/progScreenshots/{GetSSLink}</Url> <Name>GetSSImage</Name> </UrlVariable> </value> </item> <item> <key> <string>ImageLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>http://www.softpedia.com/screenshots/{GetSSImage}</TextualContent> <Name>ImageLink</Name> </UrlVariable> </value> </item> <item> <key> <string>SetUserNotes</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>class="KonaBody"> ([\w\s\d\W]*) \[</Regex> <Url>{GetDownloadLink}</Url> <Name>SetUserNotes</Name> </UrlVariable> </value> </item> <item> <key> <string>url</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>{GetRedirect}</TextualContent> <Name>url</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand>wget {ImageLink} -O "{2DIR}\{appname}.{GetSSImage:split:.:1}" echo "{SetUserNotes}">"{2DIR}\{appname}.info" echo "License: {License}">>"{2DIR}\{appname}.info"</ExecuteCommand> <ExecutePreCommand></ExecutePreCommand> <Category> Tools</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation>q:\Software\WGET_1.5.3.1.zip</PreviousLocation> <DeletePreviousFile>false</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated>2010-09-26T23:50:38.7502</LastUpdated> <TargetPath>{2DIR}\{appname}_{version}.{url:ext}</TargetPath> <FixedDownloadUrl>{url}</FixedDownloadUrl> <Name><placeholder name="Enter desired application name" variable="APPName"/></Name> </ApplicationJob> </Jobs> Version 1.9.2 (working ONLY with 1.5 beta 6) With the new beta you´ll be able to set variables in your placeholder. Read more:http://ketarin.canneverbe.com/forum/viewtopic.php?pid=4140#p4140 THX to Floele for this great function :-) Auto naming: Replace the last Placeholder with following code, and Ketarin will name your application with the variable "APPName". For more details take a look into my template. <Name><placeholder name="Enter desired application name" variable="APPName"/></Name> Auto description: Replace the UserNotes-line with following Code, and Ketarin will store the short description. <UserNotes><placeholder name="User Notes" variable="SetUserNotes"/></UserNotes> Version 1.9.1 - Better parsing for Application Name - No question for updating the template - Setting Website variable now working (Ketarin 1.5 b5) <?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><placeholder name="Enter the Softopedia url" /></WebsiteUrl> <UserNotes></UserNotes> <LastFileSize>106681</LastFileSize> <LastFileDate>2010-09-26T23:50:38.7502</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>http://www.softpedia.com/</HttpReferer> <Variables> <item> <key> <string>InfoPage</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>{property:WebsiteUrl}</TextualContent> <Name>InfoPage</Name> </UrlVariable> </value> </item> <item> <key> <string>APPName</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>">([\S^/]+) description<</Regex> <Url>{InfoPage}</Url> <Name>APPName</Name> </UrlVariable> </value> </item> <item> <key> <string>version</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><title>Download {APPName} ([\s\d\w.]*) Free</Regex> <Url>{InfoPage}</Url> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>GetDownloadLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><a href="([^\s]*)" title="Download </Regex> <Url>{InfoPage}</Url> <Name>GetDownloadLink</Name> </UrlVariable> </value> </item> <item> <key> <string>GetFileLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex><a href="([^\s]*)" title="Download </Regex> <Url>{GetDownloadLink}</Url> <Name>GetFileLink</Name> </UrlVariable> </value> </item> <item> <key> <string>GetRedirect</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex> If it doesn't, please <a href="([\d\s\w\S]*)" rel</Regex> <Url>{GetFileLink}</Url> <Name>GetRedirect</Name> </UrlVariable> </value> </item> <item> <key> <string>GetSSLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>href="http://www.softpedia.com/progScreenshots/([^\s]*)"</Regex> <Url>{InfoPage}</Url> <Name>GetSSLink</Name> </UrlVariable> </value> </item> <item> <key> <string>GetSSImage</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>href="http://www.softpedia.com/screenshots/([^\s]*)"</Regex> <Url>http://www.softpedia.com/progScreenshots/{GetSSLink}</Url> <Name>GetSSImage</Name> </UrlVariable> </value> </item> <item> <key> <string>ImageLink</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>http://www.softpedia.com/screenshots/{GetSSImage}</TextualContent> <Name>ImageLink</Name> </UrlVariable> </value> </item> <item> <key> <string>SetUserNotes</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>class="KonaBody"> ([\w\s\d\W]*) \[</Regex> <Url>{GetDownloadLink}</Url> <Name>SetUserNotes</Name> </UrlVariable> </value> </item> <item> <key> <string>url</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>{GetRedirect}</TextualContent> <Name>url</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand>wget {ImageLink} -O "{2DIR}\{appname}.{GetSSImage:split:.:1}" echo "{SetUserNotes}">"{2DIR}\{appname}.info"</ExecuteCommand> <ExecutePreCommand></ExecutePreCommand> <Category> Tools</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation>q:\Software\WGET_1.5.3.1.zip</PreviousLocation> <DeletePreviousFile>false</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated>2010-09-26T23:50:38.7502</LastUpdated> <TargetPath>{2DIR}\{appname}_{version}.{url:ext}</TargetPath> <FixedDownloadUrl>{url}</FixedDownloadUrl> <Name><placeholder name="Enter desired application name" /></Name> </ApplicationJob> </Jobs>
  21. Unless you configure the option on the Advanced tab named "Use the following variable as indicator for changes" Ketarin will use its native HTTP header parsing capability to determine if the downloaded file would be newer/different than the last file it downloaded. Be aware that this does not work for some sites, so you should get in the habit early and parse your own version numbers from the source website so you have better control over whether the file is actually newer. For example, I download many ISO files for different operating systems and the last thing you want is to download an extra 8 copies of Fedora every time you run Ketarin because the Fedora site uses a new ETag and timestamp with every request, effectively breaking cache controls. Downloading an extra 40 GB of Fedora spins a couple times a day is a good way to waste bandwidth. Using a version variable which parses the changelog for the current release version, and "version" in the "Use the following variable as indicator for changes" field avoids this problem very nicely. Be aware that there's also an Advanced option to "ignore file information" that needs to be checked if you will be deleting the actual downloaded files after extracting their contents. If you don't have this option enabled then Ketarin will default to correcting the missing files by re-downloading them.
  22. If you suspect database corruption, the safest solution is to start with a blank one. First, backup what you have: For each app select it from the main interface window, CTRL+C (which copies that app profile to the clipboard as XML), then switch to Notepad++ (or a similar kick-ass multi-tab text editor) and paste each one into a new document (you don't have to save it in Notepad++, just leave the tab open). Repeat for each app profile you want to save. You *can* select all (in Ketarin) and CTRL+C to copy the entire list out to XML, but this has the potential of copying whatever broken app is causing problems, and is a little more work to split it back out afterwards. Before you're done with backups you'll also want a new text document where you can record the values of the global Ketarin preferences at File, Settings. Navigate each tab and record the results so you can recreate them later. Once the backup is complete, create a new jobs.db. You can either (with Ketarin *closed*) rename your old one to something else (like "jobs-20171209.db"), which will create a new jobs.db when you start Ketarin, or start Ketarin with the /database switch, as so: ketarin.exe /database=newjobs.db Ketarin will start with a new database and all of her settings will be reset. There will be no app profiles. Copy your settings back to File, Settings first. This ensures that any dependent variables are correctly assigned before parsing the jobs you add later. Now, ONE BY ONE, copy the individual app XML profiles (select all, copy, switch to Ketarin, paste, test) back from Notepad++. Your testing should help you identify which one of the apps is broken and causing you problems. If you find that the issue is actually one of invalid settings (like output path, which is a common problem for apps copied from elsewhere) you can perform a find/replace in Notepad++ to replace the matching defective path with the correct value (which I strongly recommend you use a variable or a dotted root (".\{category}\") to ensure that you don't have problems when moving the Ketarin setup to a new computer, path, or drive). If you experience an error during any phase of this process, or discover which apps are causing problems and it's not a simple path problem, let us know (share the XML for the defective app) and we'll do our best to help you fix it.
  23. You can use something like this. Variable software (link to your download, e.g. PhotoEQ) Textual content: http://www.softpedia.com/get/Multimedia/Graphic/Digital-Photo-Tools/PhotoEQ.shtml Variable version Contents from URL: {software} Use regular expression: (?<={appname}\s)[0-9.]{2,} Variable t Contents from URL: {software} Use regular expression: (?<=#download.+?t':)[0-9.]{2,} Variable id Contents from URL: {software} Use regular expression: (?<=#download.+?id':)[0-9.]{2,} Variable download Contents from URL: http://www.softpedia.com/_xaja/dlinfo.php?id={id}&t={t} Use regular expression: window.location='(.+?)' Variable url Contents from URL: {download} Use regular expression: (http[^\=]*exe) Now you can use {url} as download URL. To use it for other downloads, simply change the name of your application (same as the one on the Softpedia download page) and the content of the {software} variable (link to the Softpedia download page). Sorry for this quick and dirty style. It's my first try on Softpedia. I prefer direct downloads...
  24. This is most likely caused by the URLencoding of space and ampersand. You can either use the ":replace" or ":multireplace" functions or you can use the :urldecode/:urlencode functions - both of which can get what you're after, but depend on you knowing which ones need to be replaced for the specific website and downloaded files. "%20" is a space. "%26" is an ampersand. Many non-English characters may also be replaced - but only on some websites. Unfortunately, it's really a matter of observation and testing for the individual website. When I'm troubleshooting stuff like this I always echo the command to a text file so I can compare the values to what I expect vs what is actually being used. echo "H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name}.zip" "{DLpdf}" --no-check-certificate >>test.txt "H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name}.zip" "{DLpdf}" --no-check-certificate Then the file "test.txt" can be read to see what those variables are actually being replaced with. For example, the {01name} variable may include literal "%26" instead of "&" - which is a different file name, and that will result in the command failing in Ketarin. Changing it to this (using urldecode) might be enough: "H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name:urldecode}.zip" "{DLpdf:urldecode}" --no-check-certificate Good luck! Let us know how it goes. Also, when posting in the future it will help us (and you) if you better detail what the specific variables represent and what the values are that Ketarin is replacing them with. The same echo trick will work with that: echo "{file}" /// "{file:directory}" /// "{01name}" /// "{DLpdf}" >>test.txt
  25. Well that was easy. Thanks! Now I just need to figure out how to exclude the root folder that has the version name, or rename the folder once it's extracted.
×
×
  • 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.