FranciscoR Posted June 8, 2009 Report Share Posted June 8, 2009 (edited) Q: Is there a Ketarin tutorial?See http://cdburnerxp.se/help/kb/20Q: How do I define a path for jobs.db, so Ketarin can be used as portable application?There are several ways to do this, see http://ketarin.org/forum/viewtopic.php?pid=2923Q: How do I create a new job using a PAD file?Insert the PAD file URL in the URL field, as shown bellow. Make sure that the developer keeps the PAD file up-to-date or application will not update.Q: How do I capture an author name from PAD file?Only version and download path are scraped by Ketarin, if you want to scrape any other available content - release date, author, etc. - you need to create additional custom variables, using (for instance) the regular expressions provided in the PAD Specification.PAD Specification - http://www.asp-shareware.org/pad/spec/spec.phpQ: Are there any recommended databases of PAD files?Not really. But you can use for instance http://en.padfile.info/ http://paddatabase.com/ http://www.asp-shareware.org/pad/repository/user/search.php?Home=user Some developers like NirSofer have their own PAD databases http://www.nirsoft.net/pad/pad-links.txtQ: How do I create a new job using Online DB?Go to Add new application > Import from online database. Type anything ('sql' in the example) and press search:To import an application, select it and press 'Import'.Q: Previously I've imported some broken applications from online DB, is there a way to prevent this?Yes, right-click the selected application from online DB and select Properties.A new window (greyed) will pop-up. You can see exactly what you are about to import, if there's a version variable, if variables match, if application is updated, etc.Q: How do I share an application?Go to Edit > Advanced settings > Share this application online with others. Just put a checkmark there and press OK, database updates in a second (if the job doesn't exist already).Q: How do I create a new job using the default application setting?Customize whatever you like and press 'Save as default'. The following new jobs will keep the saved settings.For instance, I created a default new job using 'Test' as Category and '{target}\{category}\{appname}_{version}.{url:ext}' as target path / filename. When I click 'Add new application' both fields are populated as expected. All I have to do is to enter the remaining info (appname, urlpath, filehippoid, etc.).Starting from version 1.0.8.285b1 there's another functional use for default application values as Ketarin uses those values (if saved) while importing applications from online DB - this doesn't apply to the category field.Q: How do I create a new job using copy and paste?This is as simple as to use Ctrl+C and Ctrl+V (or right-click and you will see the copy/paste options in the context menu). Another interesting use for copy/paste is to select a job, type Ctrl+C and paste that content into notepad (equivalent to File > Export Selected > Save as *.xml but limited to a single job). If you edit the resulting XML while keeping the GUID (top right of the XML) and import the job back into Ketarin, the original job is overwritten. If you edit XML and remove the GUID, a new job is created. The copy/paste procedure is also valid while pasting some XML here at the forum.Q: How do I create a new job using a Filehippo ID?Copy and paste the URL of the application into the FileHippo ID text field.Using the Advanced Settings tab you can also choose whether or not to download 'Betas'. The 'Use default' setting is connected with the File > Settings > 'Avoid beta versions on Filehippo'. If the later is checked, 'Use default' will not download betas. If 'Avoid beta versions on Filehippo' is unchecked, you can use the 'Avoid' not to download betas.Q: What is and how do I use the HTTP Referer?Some web servers verify from which page you are actually downloading the files. To prevent a 403 error from being returned, Ketarin allows you to spoof the referer and will automatically use the first variable's URL as referer, if no other referer is set. Note: this is usually not needed.Q: What is a template?A template is an application minus some information. There is no GUID attached to it, so you can import it multiple times.Q: How do I create a template?If you want to share templates or create your own, you can export an existing application as template by choosing “Application Template” as output file type for File –> Export. After that, you can add placeholders manually to the exported XML. When a user imports an application template with placeholders, he will be asked to insert values for them.Q: How do I insert placeholders?Just add <placeholder name="This will be shown to the user" /> to the exported XML. The user will only be prompted once for multiple placeholders with the same name. You can also add pre-selected values and options using <placeholder name="This will be shown to the user" value="Suggested value" options="A|B|C"/> Neither values or options are mandatory, so you can use one and not the other. Please refer to the 'Notes on XML Syntax' chapter for some recommendations on XML edits.Q: How about some practical examples?See the examples by CybtekSol in the following post http://ketarin.org/forum/viewtopic.php?id=311Q: Is there a template repository available?Yes, go to http://ketarin.org/forum/viewforum.php?id=5Q: How do I import a template from the Forum?1- Select the template code you wish to use and copy it;2- Paste it into a Notepad with BOM (Notepad2, Notepad++, Pspad...);3- Save as XML w/ UTF-8 encoding4- Import template to Ketarin. Placeholders - if any - will pop-up:Q: How do I test regexes?For complex regular expressions, we recommend using Expresso, which is a nifty tool for building and testing .NET regular expressions. It's available at http://www.ultrapico.com/Expresso.htm. In alternative RegexBuddy http://www.regexbuddy.com/ is also very popular, and if you prefer something in the clouds you might also want to consider http://gskinner.com/RegExr/ (needs Adobe Flash Player installed).Q: Is there a .NET regular expression reference?Yep, go to http://msdn.microsoft.com/en-us/library/az24scfc.aspxQ: What other recommended resources about Regular Expressions are there?http://www.codeproject.com/dotnet/regextutorial.asp http://www.regular-expressions.info/quickstart.html http://www.regular-expressions.info/tutorial.html http://www.regular-expressions.info/reference.html http://www.regular-expressions.info/refadv.html http://www.regular-expressions.info/refflavors.html http://regexlib.com/CheatSheet.aspx http://regexlib.com/DisplayPatterns.aspx http://regexlib.com/Resources.aspx http://xenon.stanford.edu/~xusch/regexp/ http://www.oreilly.com/catalog/regex2/ http://www.oreilly.com/catalog/regex3/chapter/ch04.pdf http://www.oreilly.com/catalog/regex2/chapter/ch08.pdf http://www.oreilly.com/catalog/regex2/chapter/ch09.pdf http://www.regular-expressions.info/hipowls.html Q: I'm having problems importing XML, what can I do?It depends, but in general you need to respect the XML syntax, a good summary is available at http://www.w3schools.com/xml/xml_syntax.aspQ: Can I validate a XML prior to import?Yes, go to http://validator.w3.org/#validate-by-inputQ: Can I extract data from sqlite DB?Yes, using a third-party Sqlite util you can run SQL queries to view or extract data from Ketarin SQLite database.Q: I don't know how to use SQLite syntax.SQLite understands most of the standard SQL language, for starters you can use the W3Schools tutorial, http://www.w3schools.com/sql/sql_intro.asp. But remember some features are omited http://sqlite.org/omitted.html. For instance, this is the SQL I've used to extract all different paths: SELECT DISTINCT targetpath FROM jobs ORDER BY targetpath ASC Another example, using an SQL function to do some quick stats in http://ketarin.org/forum/viewtopic.php?pid=2874#p2874.select variablename, count(*) from variables group by variablename order by count(*) desc Q: Is there a reference for commands I can use?The basic reference is available at http://technet.microsoft.com/en-us/library/bb491071.aspx. You can also download a file to use localy from http://www.microsoft.com/downloads/details.aspx?familyid=5fb255ff-72da-4b08-a504-1b10266cf72a&displaylang=en. Also, refer to your third-party documentation for aditional command line options.Q: How about some practical examples on how to use commands?For instance, using dir and tree to create a change log and a list of updates at http://ketarin.org/forum/viewtopic.php?id=93. Or, using 7-zip command line to unpack compressed files at http://ketarin.org/forum/viewtopic.php?id=204. CybtekSol as also included several alternative commands in his placeholder examples, http://ketarin.org/forum/viewtopic.php?id=311.Q: I need to combine several commands, is there a way to do this?Yes, you need to use 'windows conjunctions', see http://commandwindows.com/command1.htmWildcards (*,?) are also generally usefull, see http://www.ahuka.com/dos/lesson11.htmlQ: I read something about using Environment variables...?Environment variables are a set of dynamic named values. The variables can be used both in scripts and on the Ketarin command line. See the following article http://en.wikipedia.org/wiki/Environment_variable for more details.Q: Can I use Ketarin built-in variables with commands?Yes, for instance{rem} {7z}7z x {file} -o{a}{appname}\ -y (note: {a} and {rem} are global variables, {file} and {appname} are built-in variables)Another example,(note: {shared} is a globalvar, 'd:\shared')Q: Are there some examples of built-in functions?Please refer to http://ketarin.org/forum/viewtopic.php?id=83 and to http://ketarin.org/forum/viewtopic.php?pid=2285#p2285 for some examples. In http://ketarin.org/forum/viewtopic.php?pid=2740#p2740 some examples of "directory" and "filename" functions are provided.Q: I'm having trouble with some function characters like "}" or ":".You can use "}" or ":" within function parameters if you escape them with "\}". With "\\" you can use "\", so "\\\}" results in "\}".Q: Can I use buil-in variables and functions with regex?Yep. Given a 'normal' regexSyncBackSE V(\d+[\.\d]+)\s+?(?:<) You can use a global variable {v1}=\d+[\.\d]+SyncBackSE V({v1})\s+?(?:<) ... you can use a variable (more details here)http://({durl1}(?:\d.*?)?)\.zip(?=") ... or a function (more details here)http://({durl:regex:(ghisler\.fileburst\.com/.+?)(\d.*?)?\.zip:1}(?:\d.*?)?)\.zip(?=") Q: What is POST data and how can I use it?See the following thread and follow the links provided http://ketarin.org/forum/viewtopic.php?id=295Q: Are there any independent reviews available?http://lifehacker.com/5120497/ketarin-keeps-installer-packages-up-to-date http://www.rarst.net/software/ketarin/ http://www.mydigitallife.info/2009/01/08/ketarin-auto-download-latest-installers-to-keep-your-installed-applications-up-to-date/ http://thefreewarejunkie.com/2009/01/keeping-your-install-packages-updated.html http://www.downloadsquad.com/tag/ketarin/ http://www.portablefreeware.com/forums/viewtopic.php?p=18700 http://www.raymond.cc/blog/archives/2009/03/15/easily-and-automatically-keep-your-software-setup-installers-up-to-date/ http://www.instantfundas.com/2009/04/automatically-update-setup-packages.html http://www.ghacks.net/tag/ketarin/ http://www.technibble.com/repair-tool-of-the-week-ketarin/ http://www.whatsmypass.com/tech-toolkit-10 http://www.ghacks.net/2009/07/24/computer-repair-toolkit-for-tech-support/ Edited June 5, 2014 by floele Link to comment Share on other sites More sharing options...
CybTekSol Posted June 10, 2009 Report Share Posted June 10, 2009 Thanks FranciscoR! I believe Ketarin users will find this a welcome addition. Link to comment Share on other sites More sharing options...
FranciscoR Posted June 10, 2009 Author Report Share Posted June 10, 2009 (edited) Just my Ketarin 'flavor', no doubt there is also a Floele, CybTekSol, Stalker (...) Ketarin 'flavors'. I've been testing some regexes optimizations, maybe i'll update tutorial with that because now window seems a lot more responsive with long and somewhat complex regexes. Basically you have to avoid 'lazy dots', backtracking whenever you can and be certain that your regex growth is linear. Unfortunatelly Expresso 'stopwatch bechmarks' are no good to test this and i'm not aware of a free regex debugger that achives this. Edited June 10, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
dutchclimber Posted June 14, 2009 Report Share Posted June 14, 2009 As always, good job. Please include any of the stuff which was discussed here. I will leave the pdf on its current location for a couple more weeks. If any of you would like to have the originating word document, just drop me a line. Despite my well meant intentions, I have not been able to update the start of 'my' 'tutorial' recently as I have accepted a new job and spend most of my time in Dubai now. It just makes more sense to me if the tutorial is handled by someone more regular then I am. So long and thanks for all the fish, R Link to comment Share on other sites More sharing options...
FranciscoR Posted June 14, 2009 Author Report Share Posted June 14, 2009 Above are some examples and links, mostly extracted from the forum, that may help user to understand Ketarin's power and flexibility, but it is not my intention to replace Ketarin main tutorial or to write a manual. Link to comment Share on other sites More sharing options...
CybTekSol Posted June 18, 2009 Report Share Posted June 18, 2009 So long and thanks for all the fish... I wish you the best dutchclimber... stop by and say hi when you can. Link to comment Share on other sites More sharing options...
Osni Posted June 23, 2009 Report Share Posted June 23, 2009 Hi FranciscoR and dutchclimber, I am new to Ketarin and really appreciate your efforts! Currently I am trying to learn regular expressions and I got stuck with the following: Webpage: http://www.cpuid.com/cpuz.php Extracted code: [...]<b>CPU-Z 1.51 .zip</b>[...] With the following expression I am able to extract the string "1.51" both from Ketarin and Expresso: (?<=CPU-Z\s)[0-9.]+(?=\s.zip) But this one only works in Expresso: (?<=CPU-Z\s).+(?=\s.zip) Could someone explain to me why the second expression doesn't work with Ketarin? Thanks! Link to comment Share on other sites More sharing options...
andreone Posted June 23, 2009 Report Share Posted June 23, 2009 (edited) Hi, I can't help you direclty on your question (I don't have Expresso and don't know the code of Ketarin). However, for cpu-z I use CPU-Z\s(\d+(?:\.\d+)+) and it works fine so far. Anyway, welcome PS: Also, I you have a new question, please create a new post for it, it makes more sense. Edited June 23, 2009 by andreone Link to comment Share on other sites More sharing options...
FranciscoR Posted June 23, 2009 Author Report Share Posted June 23, 2009 (edited) You have the string <b>CPU-Z 1.51 setup</b> before <b>CPU-Z 1.51 .zip</b> so the regex will match everything from that \s until '.zip' -> error. Unless you paste a big portion of that string into Expresso, you will not be able to reproduce this behaviour. Try to use (?<=CPU-Z\s)([0-9.]+?)(?=\s\.zip) or (?<=CPU-Z\s)([0-9.]+?)(?=\s(?:setup|\.zip)) PS. I haven't seen it before, but the expression suggested by andreone works as well. You choose. Edited June 23, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
Osni Posted June 23, 2009 Report Share Posted June 23, 2009 @andreone: Thanks for the info and the welcome, I'll create a new topic next time. =) @FranciscoR: Unless you paste a big portion of that string into Expresso, you will not be able to reproduce this behaviour. That's what I don't get, I pasted the whole html code in Expresso... I'll use the first expression I posted, it's similar to yours but without the "?". Thanks for answering. Link to comment Share on other sites More sharing options...
FranciscoR Posted June 23, 2009 Author Report Share Posted June 23, 2009 I'll use the first expression I posted Good choice, if it works it's the best (-> fastest). Well, as Flo says, regular expression parsing can be different. Link to comment Share on other sites More sharing options...
CybTekSol Posted June 26, 2009 Report Share Posted June 26, 2009 I have witnessed numerous anomalies between the processing of regex in Ketarin vs. Expresso when developing regexs for templates. I suspect there are slight differences in the .NET implementation/interpretation that could be the culprit. I have been wrong before though. LOL Link to comment Share on other sites More sharing options...
djago Posted April 24, 2014 Report Share Posted April 24, 2014 Links are pointing to canneverve.com. Is there a way to look at the correct links? Link to comment Share on other sites More sharing options...
necrox Posted June 5, 2014 Report Share Posted June 5, 2014 Not at moment. Using ketarin.org instead does not work. Floele? Link to comment Share on other sites More sharing options...
floele Posted June 5, 2014 Report Share Posted June 5, 2014 Fixed the links. Edit: No actually even the right domain does not work. This links still refer to the old forum software we had and need to be updated entirely (= we need to find the right topics). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now