shawn Posted December 23, 2010 Report Share Posted December 23, 2010 (edited) Updated 2012-10-28: fixes several bugs, but still doesn't work due to a filetime parsing issue. Any ideas? Updated 2011-08-25: fixed another version parsing bug. Updated 2010-12-28: fixed version number check for a number of codeplex apps. This still has problem with a few apps (bluetooth radar, iExporter, ilyrics, iringtones, mdownloader, pst view tool, smtp4dev - possibly others). Here's a working Codeplex template with variables for the app name, category, slug, title and version preservation. Based on discussion from this thread. The template below was tested successfully with a full dozen apps on Codeplex without any problems. Enjoy! <?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="debb1deb-1024-1975-abcd-000000000004"> <Name><placeholder name="App name?" value="" /></Name> <Category><placeholder name="Application Category?" value="Unassigned" options="Unassigned|Browsers|Capture|Codecs|Converters|Development|Drivers|Editors|Education|Email|IM|Internet|Media|Plugins|Security|Tools|Viewers|VM|Web" /></Category> <WebsiteUrl /> <UserAgent>Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)</UserAgent> <UserNotes /> <IgnoreFileInformation>false</IgnoreFileInformation> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <CheckForUpdatesOnly>false</CheckForUpdatesOnly> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <ExclusiveDownload>false</ExclusiveDownload> <HttpReferer>{sdownload}</HttpReferer> <SetupInstructions /> <Variables> <item> <key> <string>slug</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent><placeholder name="Codeplex application slug:" value="" /></TextualContent> <Name>slug</Name> </UrlVariable> </value> </item> <item> <key> <string>title</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent><placeholder name="Codeplex application title:" value="" /></TextualContent> <Name>title</Name> </UrlVariable> </value> </item> <item> <key> <string>schangelog</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>http://{slug}.codeplex.com/releases/view/{releaseId}</TextualContent> <Name>schangelog</Name> </UrlVariable> </value> </item> <item> <key> <string>swebsite</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>http://{slug}.codeplex.com/</TextualContent> <Name>swebsite</Name> </UrlVariable> </value> </item> <item> <key> <string>snotes</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent /> <Name>snotes</Name> </UrlVariable> </value> </item> <item> <key> <string>releaseId</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>href="http://{slug}.codeplex.com/releases/view/(\d+)"</Regex> <Url>http://{slug}.codeplex.com/releases/</Url> <Name>releaseId</Name> </UrlVariable> </value> </item> <item> <key> <string>fileId</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>fileId="([\d]+)" [^<>]+></Regex> <Url>http://{slug}.codeplex.com/releases/view/{releaseId}</Url> <Name>fileId</Name> </UrlVariable> </value> </item> <item> <key> <string>buildId</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>FileListItem.+?/v(\d+)/.+?".+?{fileId}</Regex> <Url>http://{slug}.codeplex.com/releases/view/{releaseId}</Url> <Name>buildId</Name> </UrlVariable> </value> </item> <item> <key> <string>filetime</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>{fileId}".+?smartDate dateOnly" title="([^"]+)"</Regex> <Url>http://{slug}.codeplex.com/releases/view/{releaseId}</Url> <Name>filetime</Name> </UrlVariable> </value> </item> <item> <key> <string>ft</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>\[(.+)\]</Regex> <Url>http://12pd.com/filetime.php?t={filetime}</Url> <Name>ft</Name> </UrlVariable> </value> </item> <item> <key> <string>version</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>RegularExpression</VariableType> <Regex>(?:[\S\s][\.\sv])?([\d.]+?)(?:\s-\s[^\d]+?)?(?:\s\(.+?\))?[\r\n]*</title></Regex> <Url>http://{slug}.codeplex.com/releases/view/{releaseId}</Url> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>sdownload</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>http://download.codeplex.com/Download/Release?ProjectName={slug}&DownloadId={fileId}&FileTime={ft}9900000&Build={buildId}</TextualContent> <Name>sdownload</Name> </UrlVariable> </value> </item> <item> <key> <string>spost</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>http://convert-get-proxy.appspot.com/server/?method=POST&url={sdownload:multireplace:,:&,?:%26,%3F}</TextualContent> <Name>spost</Name> </UrlVariable> </value> </item> <item> <key> <string>spc</string> </key> <value> <UrlVariable> <RegexRightToLeft>false</RegexRightToLeft> <VariableType>Textual</VariableType> <Regex /> <TextualContent>codeplex</TextualContent> <Name>spc</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <ExecutePreCommand /> <ExecuteCommandType>Batch</ExecuteCommandType> <ExecutePreCommandType>Batch</ExecutePreCommandType> <SourceType>FixedUrl</SourceType> <DeletePreviousFile><placeholder name="Delete Previous Version?" value="true" options="true|false" /></DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <TargetPath>.\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}</TargetPath> <FixedDownloadUrl>{sdownload}</FixedDownloadUrl> </ApplicationJob> </Jobs> Edited October 29, 2012 by shawn Updated to current broken version Link to comment Share on other sites More sharing options...
Tomorrow Posted December 23, 2010 Report Share Posted December 23, 2010 Awesome.Been waiting for something like this. Link to comment Share on other sites More sharing options...
shawn Posted December 29, 2010 Author Report Share Posted December 29, 2010 I think the issue with those codeplex apps that don't work is a cookie handling thing (which should be "Cookie: LicenseAccepted{fileId}=true"). I've submitted a changeset to the proxy app on appengine that this uses and hopefully it'll get implemented soon. If so, cookie handling can be added and this *should* then work for all apps on Codeplex. Link to comment Share on other sites More sharing options...
jadog Posted January 3, 2011 Report Share Posted January 3, 2011 I'm a little new to this, so bear with me as I'm learning. Just tried importing your template, but I'm not sure what to place in the prompted fields for "Codeplex application slug" and "Codeplex application title". I tried using the url for the slug but I just got an error. Any help would be appreciated! Link to comment Share on other sites More sharing options...
Tomorrow Posted January 3, 2011 Report Share Posted January 3, 2011 I'm a little new to this, so bear with me as I'm learning. Just tried importing your template, but I'm not sure what to place in the prompted fields for "Codeplex application slug" and "Codeplex application title". I tried using the url for the slug but I just got an error. Any help would be appreciated! slug is the name of the app as it appreas on the address.For example: http://anolis.codeplex.com/ the slug is "anolis"(without quotes).Title is a bit more complex as some apps have title while others do not.Bringing anolis a an example it has a title called "Resourcer" that can be seen at http://{slug}.codeplex.com/releases/view/{releaseId} Link to comment Share on other sites More sharing options...
jadog Posted January 3, 2011 Report Share Posted January 3, 2011 Awesome, thanks for the quick reply. Working perfect now! Link to comment Share on other sites More sharing options...
Tomorrow Posted January 6, 2011 Report Share Posted January 6, 2011 I have a problem with vidcoder.Namely i want the x64 version but x86 is always downloaded.As i understand there is adjusted regex needed for FileId variable. Perhaps update template so when creating an app user can choose to download reccomended file or other file.Obviously the could be problems if app has more than 2 versions for download so maybe something like: "always download file number 1/2/3 etc"? Link: http://vidcoder.codeplex.com/releases/view/58650 Link to comment Share on other sites More sharing options...
shawn Posted January 10, 2011 Author Report Share Posted January 10, 2011 When I have some time I'll modify the template to add the ability to stuff/search substrings into the filename. Link to comment Share on other sites More sharing options...
CybTekSol Posted May 28, 2011 Report Share Posted May 28, 2011 Excellent Shawn! Link to comment Share on other sites More sharing options...
Tomorrow Posted May 28, 2011 Report Share Posted May 28, 2011 So any update on the whole x64 issue? Link to comment Share on other sites More sharing options...
shawn Posted May 28, 2011 Author Report Share Posted May 28, 2011 Not yet, sorry. It's still on my to-do list, but I haven't had any real free time in well over 2 months. Link to comment Share on other sites More sharing options...
TerDale Posted May 30, 2011 Report Share Posted May 30, 2011 Hi Shawn, Sounds like the beginning of the regex for the version must now be changed from "<Regex>{slug} - Release" to "<Regex>{slug} - Download" HTH (and thanks for this great template) Link to comment Share on other sites More sharing options...
shawn Posted May 30, 2011 Author Report Share Posted May 30, 2011 Actually, there are other changes as well. Sometimes the download/release appear before the slug, and sometimes there is a tag name that appears after the slug (like a brief subtitle). I had been trying to find a consistent method for pulling the info to be able to consistently parse it, but got distracted with that paid work stuff. As soon as I have a few hours to dig around with the Codeplex site I'll make it work the way it should. Link to comment Share on other sites More sharing options...
UksusoFF Posted September 11, 2011 Report Share Posted September 11, 2011 Thanks! Worked fine Link to comment Share on other sites More sharing options...
UksusoFF Posted May 23, 2012 Report Share Posted May 23, 2012 template now not worked any updates? Link to comment Share on other sites More sharing options...
shawn Posted May 24, 2012 Author Report Share Posted May 24, 2012 It's on my "to do" list, but I just don't have the time right now to investigate. It might be a week or more before I do, too. Link to comment Share on other sites More sharing options...
Guest Richard Posted June 8, 2012 Report Share Posted June 8, 2012 I can't get this template to work. Is UksusoFF right, is it broken? Link to comment Share on other sites More sharing options...
shawn Posted June 8, 2012 Author Report Share Posted June 8, 2012 Yes, this template is currently broken. It looks like CodePlex is actively preventing the POST gateway used within the application from operating correctly. There is a URL change as well ({sdownload} should be changed to " http://{slug}.codeplex.com/releases/captureDownload?fileId={fileId}&allowRedirectToAds=false"), but with this change it should be working fine, and it's not. I don't have time at the moment to investigate further. Link to comment Share on other sites More sharing options...
shawn Posted June 12, 2012 Author Report Share Posted June 12, 2012 I finally managed to get around their new deflection method (a filetime value that was near impossible to decipher). I have *one* working download from CodePlex now. I'll reverse engineer the changes and post the updated template (as long as it works reliably) soon. Link to comment Share on other sites More sharing options...
UksusoFF Posted July 31, 2012 Report Share Posted July 31, 2012 shawn, any news? Link to comment Share on other sites More sharing options...
shawn Posted August 2, 2012 Author Report Share Posted August 2, 2012 Sadly, no. I can't figure out how they're parsing the exact date and time based on the data they provide thru Codeplex. I'm in the middle of several large jobs right now that are all time-sensitive, but as soon as I have a free moment I'm going to rewrite this using a .net parsing method to post the .net form back to itself (the way a normal browser would operate). This should make it work 100% of the time, but will require me to delve into newer aspects of Ketarin i haven't used much. I have no estimate for when I'll be able to do this - it'll probably be another month or so. Link to comment Share on other sites More sharing options...
UksusoFF Posted October 17, 2012 Report Share Posted October 17, 2012 shawn, any news? Link to comment Share on other sites More sharing options...
shawn Posted October 23, 2012 Author Report Share Posted October 23, 2012 Been *very* busy. It's on my to-do list, but it'll be a month or so before I can look into it again. Link to comment Share on other sites More sharing options...
MAPJe71 Posted October 28, 2012 Report Share Posted October 28, 2012 @shawn Could you post what you found up till now so someone else can give it a try? Thnx Link to comment Share on other sites More sharing options...
shawn Posted October 29, 2012 Author Report Share Posted October 29, 2012 The most current template is in the first post. The issue I'm facing is that the file references require compiling a 64-bit filetime value from insufficient data (as far as I can tell). I was able to get it working for a couple individual files, but the formula used was invalid on different builds and apps, so it doesn't work reliably. If you have *any* ideas, I'm open to them, or you can just fix the template and share your revision with us. 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