Jump to content
Ketarin forum

shawn

Moderators
  • Posts

    1,181
  • Joined

  • Last visited

Posts posted by shawn

  1. I've found an example situation where I need to specify a user-agent for specific apps. SourceForge has now implemented some form of connection and user-agent monitoring, I suspect it's along the same lines as the CSS trick from the "Cookies for Comments" WP plugin (http://ocaoimh.ie/cookies-for-comments/).

     

    Anyway, back to the request. Since the SF site is now tracking user-agents and sessions (you can tell based on the specific content returned in the styles), I went looking for alternatives. I know that most linux admins (including myself) use wget to download various installation packages for our servers. So, I tried that. wget is still working fine, and it uses a user-agent of something like "wget/1.2.3" - this suggests that SF would allow Ketarin to operate fine if it used a wget user-agent. However, I know of some servers (including some I manage) that explicitly forbid certain user-agents, including wget, so it would be best if it were something I could assign dynamically for each app.

     

    While not directly related (I don't think), it would also be cool if we could re-order the variables within the variable list and assign the user-agent, referer or other advanced headers directly within the variable editor. Maybe treat variables named certain things as specific values for operations - that is, a variable named "user-agent" would be used as the user-agent for all HTTP requests. A variable named "website" and "notes" could take the place of the "website" and "notes" fields that appear on the "information" tab. Now that I'm using the variables functionality far more, I've really taken a liking to it's capabilities. But I find myself getting stuck when I want to make it do more without hacking the code.

     

     

    The user-agent thing is mentioned briefly here:

    http://ketarin.canneverbe.com/forum/viewtopic.php?id=266

  2. I managed to develop what I believe is a consistent successful download path for SF apps.

     

    It requires parsing the target app based on whatever you want to consume. This works fine for most apps with a parse like this (saved to "dl"):

    URL: http://sourceforge.net/projects/tuxtype/files/

    Pattern: [t'"]/projects/([^"']+)/download['"]

     

    The captured portion then gets passed to the download as:

    http://downloads.sourceforge.net{dl:replace:/files/:/}?download

     

    The captured portion in bold up there can be modified to help limit the version/type/style of the download (for example, x64, msi, 7z and so on).

  3. I know the feeling. I put in over 500 hours in May and am on track to do close to the same this month. It's painful. I've been using Ketarin to try to minimize the amount of manual work I have to do - but some sites (like CNET) require extra coding to keep things clean or change things often, and that's a PITA.

     

    Contact me by email if you're looking for work.

  4. To my knowledge, regexreplace provides several search strings, but only one *replacement* string. Am I misunderstanding it's operation? I don't see how it could be used to replace the month *name* with it's numeric equivalent in a single operation.

  5. I was using a very similar method to the "url: 'http://downloads.sourceforge.net/....exe'" method detailed above, but the problem is that it only publishes this information for the most recent download, which might be a beta. If you don't want the betas, this is bad. :(

  6. Per a discussion from here:

    http://ketarin.canneverbe.com/forum/viewtopic.php?id=150

     

     

    I'd really find it useful to be able to perform mass replacements on a variable by passing in an array of "find" and an array of "replace" values. This would work something like this:

    {myvar:arrayreplace:,:Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec:01,02,03,04,05,06,07,08,09,10,11,12}

     

    Where "arrayreplace" is the function name, "," is the delimiter, "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" is the find array, and "01,02,03,04,05,06,07,08,09,10,11,12" is the replacement array.

    {myvar:arrayreplace:delimiter:findarray:replacearray}

     

    Pushing that against the following values would yield these respective results:

     

    2010-May-08 = 2010-05-08

    Dec 11, 2004 = 12 11, 2004

    I hate June bugs = I hate 06e bugs

     

    Here's another place it would come in handy:

    {myvar:arrayreplace:|:, Build| Build | part | beta | b:.|.|.|.|-}

     

    This would convert:

    Picasa 3.6, Build 3622 = Picasa 3.6.3622

    Audacity 1.3 beta 22 = Audacity 1.3.22

    MyApp 2.9 b4 = MyApp 2.9-4

  7. For those with a version number, this is a better regex (I hope this comes thru):

    h1>[^<>]+\sv([\d\.]+)<

     

    And for those without, I've taken to parsing the updated date:

    Updated\:\s*([^<>]+)\s*<

     

    Then I play with the order a bit to try to organize it a little better. "2010May08" (mine) vs "May 8, 2010" (original).

     

    Hey, any chance of getting the ability to perform mutliple textual replacements on a variable? I'd like to be able to replace "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" with "01,02,03,04,05,06,07,08,09,10,11,12" - in some form of array replacement operation so the above version number could be transformed from "2010May08" to "20100508". I could see this being used on more than just dates, too.

  8. It seems to me that there are several common sites that we end up coding templates for, then plugging in various values to feed them. FileHippo handling is great, but the selection is limited and they only handle the 32bit versions of most apps, and that's not working for me. Since we end up creating a different template for each job even tho we are using the same sources. That means we have to update ALL the templates to fix each job that uses a different source when they change something (like the search form or directory structure).

     

    I think it would be better to have the ability to create prototemplates and then select them as the basis for our template, without having to actually rebuild the template from scratch each time. This would minimize most of the functional variables and scraping that had to be done on the backend for each of these templates, and really reduce maintenance time.

     

    Instead of a toggle between URL and FileHippo, make it a toggle between URL and a drop-down list to select the prototemplate base. FileHippo, MajorGeeks, CNET Downloads...or any other base XML file within a given folder or imported into the database.

  9. I've been thru the source now, and it looks like the only way to do what I'm after is to set variables for each of the values (which are enumerated thru in "ReplaceAllInString" on line 908 in Updater.cs), and I don't see a way to make them static. That is, it looks like all variables are assigned from URL content. I'm now able to do this using the "textual content" option from the "variables" page.

     

    Hopefully others that need to be able to do this will find this method. :)

  10. I had assumed this was a feature, actually. I have noticed the same behavior and assume that the idea is to ensure that the user can observe changes within groups without having it re-sort during processing. A simple refresh or click of the header re-sorts the list, so it makes sense that the presentation of the formerly "failed" items would let you see the current status after syncing again without losing your place or having to hunt them down.

  11. I'm trying to automate the post process for syncing with Ketarin. I need to be able to access all of the information from the application profile directly within the "default command to execute after updating" box.

     

    I've tried "usernotes", "notes", "website", "url", "websiteurl", "link" and others but can't find a way to access the data I stored in the "information" tab for an application profile.

     

    Can anyone offer me any tips?

     

    Thanks!

×
×
  • 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.