![](https://secure.gravatar.com/avatar/e550abd8e0394240c7e32acb8d07d1bc.jpg?s=120&d=mm&r=g)
On Sun, Sep 07, 2003 at 11:16:43PM +0200, Simone Rota wrote:
Hi everybody,
Hi Simone, hi all,
I'm putting together a set of scripts to automatically check for new releases of packages.
I've checked your script and and written my own, because I'm not satisfied with the overall performance when checking a large number of web pages. The attached ruby script has, hopefully, some improvements: - it's multi-threading, a configurable number of threads fetches the pages parallel to each other. Default is a max. of 20 threads, this can be changed at the top of the script (variable threads_max). - a regular expression can be applied to each page, only the matching part is used for comparison and saved for later use. For example: 'apache md5 http://www.apache.de/dist/httpd/ httpd-2[0-9.]*' This is usefully if e.g. daily snapshots are one the same page. - a kind of macro-expansion can be used in the configuration file, e.g you can define '@sf@ http://unc.dl.sourceforge.net' and use later a configuration line like: 'pure-ftpd md5 @sf@/pureftpd/' - restricting the pages to process is possible by applying a regexp on the command-line, e.g. 'ck4up ruby' will only check configuration lines which contains the string ruby. - data's are stored in a gdbm database '~/ck4up/ck4up.dbm', this is, of course, not a improvement but a feature ;) The included sample configuration file is somewhat commented and _MUST_ be manually installed as '~/ck4up/ck4up.conf'. No other docu actually. A 'ck4up -h' gives some help about command-line switches. I've included also a little bash-script (ck4up.sh), which starts mozilla with the different pages, or open them in new tabs, if mozilla is already running. I'm curious about your feedback, and, hopefully, this script will be useful for someone other. I know, ruby isn't a very popular scripting language right now, but give it a try, it's a wonderful and very lightweight language (~5M on my hd). And, maybe, you've it installed already, because you're using yapo ;) kind regards Jürgen -- juergen.daubert@t-online.de