[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#814852: RFS: openfst/1.5.1-1 -- weighted finite-state transducers library



* Giulio Paci <giuliopaci@gmail.com>, 2016-02-29, 13:24:
1) I need to package latest version, as the differences are not trivial anymore; 2) I have to convince upstream stop these bad practices (however it seems very hard, as they stop for one release and then start again a immediately after); 3) *mangle mechanism seems not enough in this case as we need some math (we have to compute "<something>+1") and the math has to be applied to a value that is not the current one

Nah, we don't have to do any arithmetic. The last revision number is written down on the download page. It's not part of any link, but we can use pagemangle to shove it into the href attribute. I've attached watch file that implements this idea.

--
Jakub Wilk
version=3
opts="pagemangle=s!<a href=\x22[^\x22]+/FstDownload/([^\x22]+)\x22>\1</a>\s*</td>\s*<td[^>]*>\s*r(\d+)!<a href=/twiki/bin/viewfile/FST/FstDownload?filename=$1&rev=$2>!g, uversionmangle=s/\.(\d+)$/+r$1/;s/\+r1$//, filenamemangle=s/.*filename=//;s/.rev=.*//, pgpmode=none" \
http://www.openfst.org/twiki/bin/view/FST/FstDownload \
/twiki/bin/viewfile/FST/FstDownload\?filename=openfst-(\d[\d\.]*)\.(?:zip|tgz|tbz2|txz|tar\.gz|tar\.bz2|tar\.xz)[&;]rev=(\d+)

Reply to: