somerandomhash Posted February 13, 2009 Report Share Posted February 13, 2009 This will download Active Perl Windows (32) I am posting it in the hope that some of you reg expressions experts can tweak it to work with the other Active state to produce the 'final' template for Active Perl , TCL and Komodo Edit which are all very handy apps for Windows Category is DeveloperTools and {global_path} is equiv to {target} and it's 'Save as File' <?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 /> <Variables> <item> <key> <string>version</string> </key> <value> <UrlVariable> <VariableType>StartEnd</VariableType> <Regex /> <Url>http://www.activestate.com/activeperl/downloads/</Url> <StartText>ActivePerl/Windows/</StartText> <EndText>/ActivePerl</EndText> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>build</string> </key> <value> <UrlVariable> <VariableType>StartEnd</VariableType> <Regex /> <Url>http://www.activestate.com/activeperl/downloads/</Url> <StartText><a href=" [url]http://downloads.activestate.com/ActivePerl/Windows/5.10/</StartText>[/url] <EndText>.msi ">Download</a></EndText> <Name>build</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <Category>DeveloperTools</Category> <SourceType>FixedUrl</SourceType> <PreviousLocation /> <DeletePreviousFile>false</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated xsi:nil="true" /> <TargetPath>{root_folder}\{category}\{appname:replace: :_}_v{version:replace: :_}.{url:ext}</TargetPath> <FixedDownloadUrl>http://downloads.activestate.com/ActivePerl/Windows/{version}/{build}.msi</FixedDownloadUrl> <Name>Active Perl</Name> </ApplicationJob> </Jobs> Link to comment Share on other sites More sharing options...
CybTekSol Posted February 14, 2009 Report Share Posted February 14, 2009 I am posting it in the hope that some of you reg expressions experts can tweak it to work with the other Active state to produce the 'final' template for Active Perl , TCL and Komodo Edit which are all very handy apps for Windows.'Final' template? I don't believe there is any such creature! It has been my experience that just when one believes their template has been perfected... webmasters redesign their site which cripples it until a redo/tweak. As for a 'universal' template for ActiveState, if you are only interested in a few of their downloads, it would be easier to develop a 'generic' template that could be imported for those few apps and tweak its regex as I have done hundreds of times. Regex is an absolute must for a 'generic' or 'universal' template (as I refer to them) sheerly due to its power and flexibility. Clever use of regex can result in the refinement of a 'generic' template as I previously mentioned that increases productivity dramatically. My database is now over 700 apps and growing every day... all of which use some form of regex as I am a consummate geek, according to my wife. I have invested many hours in honing my regex skills as a result of Ketarin... worth every minute. I may post a 'watered down' version of my 'generic' template to give users an idea of what I am describing. I suspect FranciscoR has already developed one as you can see an example of the regex skills used in the PortableApps.com template he recently posted. REMEMBER... regex is our friend! Link to comment Share on other sites More sharing options...
FranciscoR Posted February 15, 2009 Report Share Posted February 15, 2009 (edited) Yeah, templates are not that easy... but not that difficult also. It's not enough to post some working XML... and call that a "template". The first time regex is the only one difficult. Check appyface tutorial on the subject, also the links and comments below in that post, it's a good starting point. Nobody starts writing regexes like CybTekSol MajorGeeks. Start with something SIMPLE, the fundamental is that you understand what your doing, and DO IT. Because regex is very ambiguous, because it can be confusing. For testing, an app like Expresso is a real time saver (the 30 mins tutorial bundled is also good for staters), you can do complete and partial matches, quickly edit and replace problematic expressions, subexpression, characters... I've learn how to use regex - altoghether with Expresso - in just a couple of days. Regulator is another interesting software that allows you to search expressions online, but personally I stick with Expresso, I don't like this ready-made thing. I like to control it, to develop it. I start writing regex only after a careful inspection of HTML with Firebug, nothing is predifined for me, except the goals (what to DL). To find the correct HTML anchors if often more difficult than to write regex itself. I am no developer, and I have no ambitions or knowledge as IT Pro (I count on people like Flo for it), so I can tell you that right now I use regex in the majority of my programs: OpenOffice, Pspad, Total Commander (oh bugger, I was forgetting Ketarin ??? =D )... learning it was a major event for me. Good luck ! Edited February 16, 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