Re: [Koha-devel] Random XSLT knowledge

2024-03-07 Thread Marcel de Rooy via Koha-devel
Hi David,
Thanks for sharing.
Would you have an example of how you use register_function with Koha functions 
to share?

Marcel


Van: Koha-devel  namens David Cook 
via Koha-devel 
Verzonden: vrijdag 8 maart 2024 03:02
Aan: 'Koha Devel' 
Onderwerp: [Koha-devel] Random XSLT knowledge


Hi all,



I’ve been working on performance issues, and in the process I got looking at 
XSLTs.



I just wanted to share that it’s possible to pass strings to the XSLT’s 
transform() method:



-return $engine->transform($xmlrecord, $xslfilename ); #file or URL

+return $engine->transform({

+xml => $xmlrecord,

+file => $xslfilename,

+parameters => {

+test => "'$test_str'",

+},

+}); #file or URL



It’s somewhat limited in that you can only pass strings and I think there’s a 
small limit on the number of parameters you can pass (not sure if it’s 32 or 
255), but I thought it was interesting. It would allow you to pass some data 
that you have at hand on a per-XML record basis without having to mangle the 
XML record (like we do with items and system preferences).



In the end, I didn’t end up using it though. Instead, I use 
XML::LibXSLT->register_function() to provide access to Koha functions from the 
XSLT, and in this case that meets my needs.



Anyway, back to it..



David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia



Office: 02 9212 0899

Online: 02 8005 0595


___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


[Koha-devel] SMTP servers requiring XOAUTH2

2024-03-07 Thread David Cook via Koha-devel
Hey folks,

 

Is anyone using Koha with SMTP servers requiring XOAUTH2?

 

It doesn't look like the Perl libraries used by Koha are anywhere near ready
for it, but it looks like Postfix has an experimental plugin available:
https://github.com/tarickb/sasl-xoauth2 or
https://packages.debian.org/experimental/sasl-xoauth2

 

I think both Gmail and Microsoft require it these days.

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


[Koha-devel] Random XSLT knowledge

2024-03-07 Thread David Cook via Koha-devel
Hi all,

 

I've been working on performance issues, and in the process I got looking at
XSLTs.

 

I just wanted to share that it's possible to pass strings to the XSLT's
transform() method:

 

-return $engine->transform($xmlrecord, $xslfilename ); #file or URL

+return $engine->transform({

+xml => $xmlrecord,

+file => $xslfilename,

+parameters => {

+test => "'$test_str'",

+},

+}); #file or URL

 

It's somewhat limited in that you can only pass strings and I think there's
a small limit on the number of parameters you can pass (not sure if it's 32
or 255), but I thought it was interesting. It would allow you to pass some
data that you have at hand on a per-XML record basis without having to
mangle the XML record (like we do with items and system preferences).

 

In the end, I didn't end up using it though. Instead, I use
XML::LibXSLT->register_function() to provide access to Koha functions from
the XSLT, and in this case that meets my needs.

 

Anyway, back to it..

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


[Koha-devel] Choose your preferred dates for a Gloabl Bug Squashing Day in March

2024-03-07 Thread Magnus Enger via Koha-devel

Kia ora!

Trying to get another Gloabl Bug Squashing Day (GBSD) going.

Which dates would you prefer?
https://terminplaner6.dfn.de/en/p/4939a0075ab483d3d337f955859f824f-633050
Please reply by Wednesday 2024-03-13.

What's a GBSD, you say? It's fun, that's what it is! See this old page 
for an example and some more information:

https://wiki.koha-community.org/wiki/2020-02-14_Global_bug_squashing_day

TL; DR: Get your name as high up the "Signoffs" list on 
https://dashboard.koha-community.org/ as you can in a given day. (Or the 
other lists, if you prefer.)


Best regards,
Magnus
Libriotech/imCode

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


Re: [Koha-devel] Ponderings on locations

2024-03-07 Thread Wagner, Alexander via Koha-devel
Hello!

> I was recently looking at Shelving location actually, and this was the
> thing the librarian who wanted it mentioned, how to show the shelving
> location on the OPAC.  I found there are a couple relevant system
> preferences.
> 
> OpacLocationOnDetail : controls if shelving location is shown in the same
> column as one of the branch fields, or in its own column, or is not shown.

I'll check out our settings there. I didn't know this one yet. Thanks!

> OpacAdvancedSearchTypes and AdvancedSearchTypes : controls whether the
> shelving location is presented in a tab group on the search page with the
> item types.  The other field that can be in that tab group is Collection.

Those are indeed set up already.

-- 
Kind regards,

Alexander Wagner

Deutsches Elektronen-Synchrotron DESY
Library and Documentation

Building 01d Room OG1.444
Notkestr. 85
22607 Hamburg

phone:  +49-40-8998-1758
e-mail: alexander.wag...@desy.de
___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


Re: [Koha-devel] Ponderings on locations

2024-03-07 Thread Wagner, Alexander via Koha-devel
Hello Emily!

> Many of the things you're trying to do can be done in Koha through some other
> mechanism.

:)
 
>> E.g. if it has been requested and is prepared for some patron
>> another one will not find it in the shelves, so IMHO it is a good
>> idea to show in OPAC that it is in a different location.
> 
> In Koha we would do this by placing a hold on the item for that patron, and 
> then
> check the item in 

and confirm the hold, right?

IOW the _status_ `on hold` describes that the item _is already_ on the shelf of 
items prepared for our patrons. (What we called `Library Desk HH`). 

> then Koha will display it as "On hold" in the OPAC and
> "Waiting hold for such-and-such patron" on the Staff Intranet.

So in Koha

   Current library: DESY Hamburg Library
   Location: Main
   Status: On hold

is the same thing as

   Library: DESY Hamburg Library
   Location: Library Desk HH

I'll just correct my thinking here and adopt Kohas view. :)

>> Unfortunately, the strict `not for loan` doesn't work well for us. We
[...]
>> immediately send a recall letter`. (Current procedure.)
> 
> One way you could do this would be to define a NOTFORLOAN item type, and then
> edit the Circulation and Fines Rules to give that item type a loan period of 2
> days with no renewals.

This is what I actually did already together with changing all `not for loan` 
loan periods we have right now. I just mentioned the not for loan feature as it 
entered this "where is the book right now" game somewhat unexpectedly (for me). 
What got me confused quite a bit was that there is 

- `UpdateItemLocationOnCheckin`: Ok, this is plausible. If I check in an item 
it is in some other place. Especially, if I explicitly treat CART as a 
location, which is sensible. (That we didn't till now is more a failure in our 
current system, that I will not fix any more.)
- `UpdateNotForLoanStatusOnCheckin`: This however, I found completely 
unrelated, cause the loan period is independent from the items location.

So I played with both of them and noticed that they both also trigger displays 
in OPAC. Both basically use the same kind of translation tables (if status is x 
change it to y once an item is checked in) while I noticed that only the 
`UpdateNotForLoanStatusOnCheckin` managed all stages as described in the 
translation tables while `UpdateItemLocationOnCheckin` behaved "stange" at 
first sight as I got this incorrect permanent location set. I think, I now got 
why the `not for loan`-status entered the game, though it is still a bit 
strange to me and as mentioned it does not work as a work around for 
exhibtions, new itmes etc. (But loan periods and not for loan handling in Koha 
is completely different to our current system anyway, so I'll just have to 
adopt to Kohas view.)

> If you want Koha to automatically send a recall letter
> for those that is different than the standard due/overdue notice, that would
> take a bit of doing when adjusting the notice template, but off the top of my
> head I believe it would be possible.

I think if I have a short loan period they'd trigger the first recall, so this 
should be fine. But I'll double check.

(I'll have to dive a bit more into the recall procedures, as I fear not all of 
our patrons return their items after the 3rd notice, but that's another issue.)

> That being said, it certainly would be nice to have more flexibility in 
> defining
> temporary locations for items (such as displays or mending) - there is (at
> least one) bug for that in Bugzilla if you want to follow and/or comment:
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14962

Somehow I knew that my thinking isn't too strange. Thanks for the poiner! I 
think 14962 is indeed pretty spot on.

One thing I do not understand is, why CART and PROC have to be special in the 
first place. If the mapping table just works on `location` and leaves 
`permanent_location` alone (like it does for PROC and CART) I think things work 
as expected once in some final steps I map `: _PERM_`. IOW I do not 
understand why checkin touches a permanent location that was set during 
cataloguing as some conscious decision: we shelve this item in the special 
reading room etc.

> Our library system is currently in the process of working with ByWater to
> sponsor/co-sponsor a feature like that.

As mentioned, unless I overlook something deep in some other areas not too much 
feature may be required, but more removal of magic. 14962 describes yet another 
location, but I think this is not required as `items.location` is basically the 
described temp-location. But I am to new to Koha to understand all implications.
 
> Finally, I just want to clarify that Shelving Location does indeed consist of
> both a "location" and "permanent location" (separate from homebranch and
> holdingbranch), though that's not necessarily obvious depending on where 
> you're
> looking, and you're right that the distinction mostly exists for the benefit 
> of
> the 

Re: [Koha-devel] koha SIP" over HTTPS

2024-03-07 Thread Mark Hofstetter via Koha-devel

Am 07.03.2024 um 09:36 schrieb Marcel de Rooy:

Look for stunnel. This seems to be the usual way to secure SIP2 traffic.



thx, yes I am a aware of stunnel, but it adds a different protocol/port 
which makes it hard(er) to deploy behind corporate firewalls and https 
loadbalancers



so back to the original question does anybody use sip2 over https - or 
is it just a stupid idea?



cheers

Mark




*Van:* Koha-devel  namens 
Mark Hofstetter via Koha-devel 

*Verzonden:* donderdag 7 maart 2024 09:21
*Aan:* koha-devel@lists.koha-community.org 


*Onderwerp:* [Koha-devel] koha SIP" over HTTPS
Hi,

we need (at least I think) SIP2 over https. I found some clues googling
but no actual code for koha

Is there something, does somebody do it, does it need implementing?

thx for hints

Mark


--
--
Mag. Mark Hofstetter
2452 Mannersdorf
Zwischen den Weingärten 3
+43 676 7345660

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.koha-community.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fkoha-devel=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085503915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=jmSISfnJbsVypUPxk6kDOStt%2B7VmmAdFBMqeUylx670%3D=0 

website : 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.koha-community.org%2F=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085512421%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=nmEwtwJ50HazqrOpIA2TieLFiqkswStK%2Fc0NHoUFQ80%3D=0 

git : 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.koha-community.org%2F=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085519494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=WapKIWa6JrLuVGeV3r17VMCgkzyIXiDq9HapKTzsRi8%3D=0 

bugs : 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.koha-community.org%2F=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085525429%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=Dl8GdvPp4BXK%2BSWzoJSb%2B5pEHhNhMn4NczZt44i4Jn4%3D=0 




--
--
Mag. Mark Hofstetter
2452 Mannersdorf
Zwischen den Weingärten 3
+43 676 7345660

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


Re: [Koha-devel] koha SIP" over HTTPS

2024-03-07 Thread Lari Taskula via Koha-devel
Koha-Suomi, the company maintaining Koha installations for public libraries in 
Finland, has implemented this as a Koha plugin. See 
https://github.com/KohaSuomi/koha-plugin-SIPoHTTP
-- 
Lari Taskula
CEO, Hypernova Oy
PL 16
80101 Joensuu, Finland

On March 7, 2024 10:21:33 AM GMT+02:00, Mark Hofstetter via Koha-devel 
 wrote:
>Hi,
>
>we need (at least I think) SIP2 over https. I found some clues googling but no 
>actual code for koha
>
>Is there something, does somebody do it, does it need implementing?
>
>thx for hints
>
>Mark
>
>
>-- 
>--
>Mag. Mark Hofstetter
>2452 Mannersdorf
>Zwischen den Weingärten 3
>+43 676 7345660
>
>___
>Koha-devel mailing list
>Koha-devel@lists.koha-community.org
>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>website : https://www.koha-community.org/
>git : https://git.koha-community.org/
>bugs : https://bugs.koha-community.org/
___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


Re: [Koha-devel] koha SIP" over HTTPS

2024-03-07 Thread Marcel de Rooy via Koha-devel
Look for stunnel. This seems to be the usual way to secure SIP2 traffic.


Van: Koha-devel  namens Mark 
Hofstetter via Koha-devel 
Verzonden: donderdag 7 maart 2024 09:21
Aan: koha-devel@lists.koha-community.org 
Onderwerp: [Koha-devel] koha SIP" over HTTPS

Hi,

we need (at least I think) SIP2 over https. I found some clues googling
but no actual code for koha

Is there something, does somebody do it, does it need implementing?

thx for hints

Mark


--
--
Mag. Mark Hofstetter
2452 Mannersdorf
Zwischen den Weingärten 3
+43 676 7345660

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.koha-community.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fkoha-devel=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085503915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=jmSISfnJbsVypUPxk6kDOStt%2B7VmmAdFBMqeUylx670%3D=0
website : 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.koha-community.org%2F=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085512421%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=nmEwtwJ50HazqrOpIA2TieLFiqkswStK%2Fc0NHoUFQ80%3D=0
git : 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.koha-community.org%2F=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085519494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=WapKIWa6JrLuVGeV3r17VMCgkzyIXiDq9HapKTzsRi8%3D=0
bugs : 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.koha-community.org%2F=05%7C02%7Cm.de.rooy%40rijksmuseum.nl%7Ca8e089486cbd4fc318a008dc3e7f9f78%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638453965085525429%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=Dl8GdvPp4BXK%2BSWzoJSb%2B5pEHhNhMn4NczZt44i4Jn4%3D=0
___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


[Koha-devel] koha SIP" over HTTPS

2024-03-07 Thread Mark Hofstetter via Koha-devel

Hi,

we need (at least I think) SIP2 over https. I found some clues googling 
but no actual code for koha


Is there something, does somebody do it, does it need implementing?

thx for hints

Mark


--
--
Mag. Mark Hofstetter
2452 Mannersdorf
Zwischen den Weingärten 3
+43 676 7345660

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/