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?
-- Peter Borsa
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.
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:
- 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.
- 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-([^<]*)
logistics@lists.fedoraproject.org