benibela / videlibri

:books: Cross-platform library client to automate any OPAC and library catalog from your local device, e.g. for renewing of borrowed books or searching for books available in the library in automated scripts.
https://www.videlibri.de/
GNU General Public License v3.0
36 stars 5 forks source link

Fix unknown function vl:raise-login #7

Closed tribut closed 2 months ago

tribut commented 1 year ago

Not sure if this is the correct way to fix it, but while trying to query Stadtbibliothek Chemnitz using xidel, I got an error:

$ xidel -e '$username:="XXX",
          $password:="XXX",
          $server:="https://opac2.stadtbibliothek-chemnitz.de/webOPACClient/",
          $startparams:="?Login=opsb"
    ' --template-action connect,update-all  \
      --module mockvidelibri.xqm --xmlns videlibri=https://www.videlibri.de --dot-notation=on \
      --template-file data/libraries/templates/sisis/template
[...]
Error:
err:XPST0017: unknown function: vl:raise-login #0

Did you mean: 
  In module math:   (namespace url: "http://www.w3.org/2005/xpath-functions/math")
    log #1:  (double?) as double?

in line 1 column 5
 vl:raise-login() 
    ^^^^^^^^^^^^^  error occurs around here

Multipage action trace:
update-all
login <call>
(pattern of action:login page:{$request})

The problem appears to be that vl:raise-login is called without argument from data/libraries/templates/sisis/template.

benibela commented 1 month ago

It took a while to merge, because I was trying to figure out how to deal with the "Verfified" label

If I merge it on Github, it does not synchronize with the sourceforge/gitlab mirrors.

There is no verified label in the associated patch: https://github.com/benibela/videlibri/pull/7.patch (and a hgtags file. that comes from the mirroring, but it should not be in the patch)

Now I have merged it on Github, but the "Verified" label got lost anyways