Upstream Release Monitoring for Insight
Paul W. Frields
stickster at gmail.com
Fri Mar 25 17:05:13 UTC 2011
On Fri, Mar 25, 2011 at 12:09:29PM -0400, Paul W. Frields wrote:
> On Wed, Mar 23, 2011 at 05:50:43PM +0100, Peter Borsa wrote:
> > Hi!
> >
> > I am trying to figure out, how to monitoring upstream projects.
> > http://fedoraproject.org/wiki/Upstream_Release_Monitoring
> > I am using the drupal modules' RSS feed as URL.
> > For example:
> > Views module URL: http://drupal.org/node/38878/release/feed
> > Regex: views-(.*?).tar.gz
> >
> > It's working but there are duplicated matches, and I have another
> > problem, there is different package name in Fedora. (Fedora package
> > name: drupal6-views-2.12-2.el6, upstream: views-6.x-2.12.tar.gz
> >
> > Any idea, how to fix these problem?
>
> Actually, here's how you could do it. Just parse the HTML page for
> the project. This has two useful benefits:
>
> 1. It downloads a lot less information, just one short HTML page for
> the individual project, as opposed to the big listing of everything in
> the files/projects/ area upstream.
>
> 2. By using the name of the module, you can make this more
> programmatic, since you don't need to know a node number on drupal.org
> ahead of time.
>
> So, for any project named <name>:
>
> URL: http://drupal.org/project/<name>
> Regex: (?s)Recommended releases.*>6.x-(.*?)</a>.*Other releases
>
> The (?s), by the way, accepts any character including newline, so this
> becomes a multiline regex.
Gets easier, this works just as well and takes better advantage of the
non-greediness modifier:
Regex: (?s)Recommended releases.*?>6.x-([^<]*)
--
Paul W. Frields http://paul.frields.org/
gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233 5906 ACDB C937 BD11 3717
http://redhat.com/ - - - - http://pfrields.fedorapeople.org/
Red Hat Summit/JBossWorld -- Register now! http://.theredhatsummit.com
More information about the logistics
mailing list