CybTekSol Posted February 21, 2009 Report Share Posted February 21, 2009 My LifeHacker.com Exclusive Downloads Generic template: This template uses Google's search engine to compensate for URL changes at LifeHacker. NOTE: This is a 'generic' template which I use for LifeHacker.com Exclusive Downloads when they are 'featured' on their site on any given day. It may require a small tweak or two each time due to their inconsistencies in page layout, but, it will give to something to play with. 1) There are two user defined global variables used, download_url={download_url} (used as an alternative to {url}) and root_folder=Insert YOUR download destination ROOT folder here [for example C:\Latest-Apps]. 2) The latest version of Ketarin (.0.9.9.22) released January 18, 2009 or later is required as this revision uses the new 'placeholder' feature implemented by Florian. 3) The template follows: <?xml version="1.0" encoding="utf-16"?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <HttpReferer>{find}</HttpReferer> <Variables> <item> <key> <string>LifeHackerPageName</string> </key> <value> <UrlVariable> <VariableType>Textual</VariableType> <Regex /> <TextualContent><placeholder name="LifeHacker.com Page Name from URL [Example: belvedere-automates-your-self+cleaning-pc]" /></TextualContent> <Name>LifeHackerPageName</Name> </UrlVariable> </value> </item> <item> <key> <string>find</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>(?<=Search[ ]Results.*?a href=")http://lifehacker.com/[\d]+/.+?(?=")</Regex> <Url>http://www.google.com/search?hl=en&hl=en&as_q=&as_epq={LifeHackerPageName}&as_sitesearch=lifehacker.com</Url> <Name>find</Name> </UrlVariable> </value> </item> <item> <key> <string>version</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>Version.*?(Beta.+?Build.+?|Beta.+?|Build.+?|\d.*?)[?:\:|<|&]</Regex> <Url>{find}</Url> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>download_url</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>[a-z]+[ ]only:.*?a href="([a-z]+://.*?\.[a-z]{3})"</Regex> <Url>{find}</Url> <Name>download_url</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <Category>LifeHacker-Exclusive-Apps</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation /> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated xsi:nil="true" /> <TargetPath>{root_folder}\{category}\{appname:replace: :_}_v{version:replace: :_}.{url:ext}</TargetPath> <FixedDownloadUrl>{download_url}</FixedDownloadUrl> <Name><placeholder name="Application Name" /></Name> </ApplicationJob> </Jobs> To use it: 1) Define the user defined global variables under 'Settings' in Ketarin to YOUR preferences 2) Edit the template externally to reflect these modifications (if you choose not to use mine) and change the <TargetPath> line to YOUR preferences 3) Then: a) Import it (Obviously) Enter the information needed as requested as a result of the 'placeholder' prompts... it will ask for the LifeHacker.com Page Name from URL [Example: belvedere-automates-your-self+cleaning-pc] and the application's name c) Modify the Category to YOUR preferences d) Change the 'Advanced Settings' to YOUR preferences e) TWEAK the regular expressions for {version} and {download_url} f) VERIFY...VERIFY...VERIFY that ALL regex matches WORK and MAKE ADJUSTMENTS to them as necessary! REFINE it to YOUR NEEDS! Enjoy! CybTekSol Link to comment Share on other sites More sharing options...
floele Posted February 21, 2009 Report Share Posted February 21, 2009 I'll add a new attribute for placeholders in Ketarin 1.0.3. Then you can do the following: <TargetPath><placeholder name="Target path" value="{root_folder}\{category}\{appname:replace: :_}_v{version:replace: :_}.{url:ext}" /></TargetPath> Seems most user friendly to me. Link to comment Share on other sites More sharing options...
CybTekSol Posted February 21, 2009 Author Report Share Posted February 21, 2009 I'll add a new attribute for placeholders in Ketarin 1.0.3. Then you can do the following: <TargetPath><placeholder name="Target path" value="{root_folder}\{category}\{appname:replace: :_}_v{version:replace: :_}.{url:ext}" /></TargetPath> Seems most user friendly to me. I'm confused... the user would have to input this each time or could this be generated from a custom global variable preset by the user under 'Settings' from {Target path}=whatever ? Link to comment Share on other sites More sharing options...
floele Posted February 21, 2009 Report Share Posted February 21, 2009 Yeah, he'd had to. But the text box would already be populated with that value. He sees your suggestion and can then decide wheter or not he likes that. Link to comment Share on other sites More sharing options...
CybTekSol Posted February 21, 2009 Author Report Share Posted February 21, 2009 The text box would already be populated with that value...can then decide whether or not he likes that. Cool... sounds GOOD to me! Link to comment Share on other sites More sharing options...
CybTekSol Posted February 21, 2009 Author Report Share Posted February 21, 2009 I'll add a new attribute for placeholders in Ketarin 1.0.3.Not until 1.0.3 Flo? Does that mean you're going to jump from 1.0.2.215 to 1.0.3? Link to comment Share on other sites More sharing options...
FranciscoR Posted February 21, 2009 Report Share Posted February 21, 2009 (edited) I like this ideia =), what I do not like is the aditional placeholder pop-up that comes with it. =( Pop-ups are annoying, and we already have a lot. A pop-up for this placeholder... a pop-up for that placeholder... a pop-up for the other placeholder... and final pop-up for target placeholder (as suggested). I think a much better way for user to handle placeholders, is to have a single pop-up window with all placeholders in it, e.g., some sort of placeholder info window, like P.S. Sorry for the unhauthorized Photoshop tweak Flo, the font is also not correct but I think you will get idea/request. ONE SINGLE pop-up for ALL placeholders requests. Edited February 21, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
CybTekSol Posted February 22, 2009 Author Report Share Posted February 22, 2009 @FranciscoR, Not a bad idea from my viewpoint as long as the window would auto-size to accommodate descriptive text for the required input and not truncate it. FWIW, my viewpoint doesn't carry much weight in the final decision... that's all up to Flo obviously. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 Yes and yes (as always). Link to comment Share on other sites More sharing options...
floele Posted February 22, 2009 Report Share Posted February 22, 2009 I think that it migt look quite ugly if you have multiple placeholders with huge differences in length (especially with very long placeholder names). Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 (edited) THAT graphical design doesn't work obviously. I just picked the pre-existing placeholder window and apply a simple tweak, with the single purpose to comunicate ideia. I don't like the looks either. If it helps some graphical design alternatives, I will be happy to provide them. But very long placeholder names is something we can control... CybTekSol names are usually larger than myne... anyway, whathever you say. I would like to have that. =) Edited February 22, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
floele Posted February 22, 2009 Report Share Posted February 22, 2009 How else would you put all placeholders into one window? Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 Not sure if I understand question... you mean from an implementation point of view ? Link to comment Share on other sites More sharing options...
floele Posted February 22, 2009 Report Share Posted February 22, 2009 Just the GUI point of view. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 OK, gimme some time to think about it. P.S. 1. What text font are you using in placeholders and it's size ? 2. Are there specific placeholders names combinations you would like me to test ? Or I can use existing templates placeholders names... Link to comment Share on other sites More sharing options...
floele Posted February 22, 2009 Report Share Posted February 22, 2009 1. I'm not using any specifc font. Usually, it will result in mS Sans Serif or Segoe UI, size 10. 2. Just check some of those already used in templates. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 OK. =) Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 (edited) Example using CybTekSol Firefox (3 extra-extra-large placeholders =)): Note: I don't have your fonts installed, so I am using Arial 11. The point here is that even with extra-extra-large placeholders (=CybTekSol) this can be done. The window is based on the Edit window on GUI, difference is height and width would be variable (with exception of the last 3 fields, Application Name, Category and Save to file/folder, where height would be fixed). A base width could be the one you're using for Edit window, that would grow as large as placeholder name would require. Edited February 22, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
CybTekSol Posted February 22, 2009 Author Report Share Posted February 22, 2009 @FranciscoR, I LIKE the above example and think it is VISUALLY APPEALING! I hope Flo feels the same as IMHO, it is a viable solution. Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 A "normal" template with just *1* placeholder (excluding name) would look like Link to comment Share on other sites More sharing options...
CybTekSol Posted February 22, 2009 Author Report Share Posted February 22, 2009 And maybe the 'Category' could be pre-populated with 'New'. Then the 'Save to file' or 'Save in folder' selection could be determined from how the majority of the apps within your personal Jobs.db are configured, and likewise the <targetpath> pre-populated in the same manner? If this is possible... MAN... templates would really rock! Addendum: Of course, if it is a new Jods.db, it could default to the template author's 'placeholder' input for population... Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 (edited) Then the 'Save to file' or 'Save in folder' selection could be determined from how the majority of the apps within your personal Jobs.db are configured, and likewise the <targetpath> pre-populated in the same manner? Like a drop-down menu pre-populated with existing data OR empty with a new DB ? Fine by me. =) Edited February 22, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
floele Posted February 22, 2009 Report Share Posted February 22, 2009 Hm...I'm a bit reluctant to duplicate those controls of the application dialog. But you made nice suggestions and I'll look into it Link to comment Share on other sites More sharing options...
FranciscoR Posted February 22, 2009 Report Share Posted February 22, 2009 @floele: Thanks ! @CybTekSol: MAN, you do get excited with some simple Photoshop tweaks ! =D Link to comment Share on other sites More sharing options...
FranciscoR Posted February 23, 2009 Report Share Posted February 23, 2009 (edited) Flo, I promise I'll be quiet now but I got too excited last night. Better ? =) Edited February 23, 2009 by FranciscoR 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