Re: [Koha] Import in koha 21.05 all users from LDAP

2021-09-10 Thread Javi Legido
Hi there.

I'm not an expert on the subject, maybe others can reply, but this is the
classical behaviour of applications integrating with LDAP for
authentication (and sometimes also authorization): after first login the
application creates data in its database, in this example as "Patron".

No idea if there's anything out there, but a high level approach would be:

1. Create a test account in LDAP (Active Directory in your case)
2. Dump Koha database (one insert per line is useful)

mysqldump --extended-insert=FALSE my_koha_database -u root -psecret >
koha.sql

3. Perform first login with user created at step 1.
4. Repeat step 2:

mysqldump --extended-insert=FALSE my_koha_database -u root -psecret >
koha.after.sql

5. See differences

diff koha.sql koha_after.sql

Now you are very close to build the SQL statements to add a new Patron once
authenticated.

Cheers.

Javier

On Fri, 10 Sept 2021 at 10:46, Tadas G  wrote:

> Hello,
>
> We have Koha 21.05 installed and configured to work with AD. Everything is
> fine, users can login to Koha using AD credentials, but in Patron list they
> appear only after successful authorisation. It is quite annoying, because
> if you want to assign book to the reader, he/she has to be in patron list.
> Is it possible to create Cron job to import users to patron list
> automatically from AD (it is enough to import only a few fields, all other
> fields can be updated after user login)?
>
> Thanks for the answers
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Upgrade procedure

2021-08-23 Thread Javi Legido
Hi there.

I strongly advise you to:

1. Find and dump the koha database (I assume MySQL engine)
2. Move from installing software on baremetal to docker containers

Cheers.

Javier


On Mon, 23 Aug 2021 at 16:50, Tom Burke  wrote:

> Hello the list
>
> I am a new volunteer IT help for a small number of community libraries in
> Sheffield, UK. I have been tasked with researching what we need to do to
> upgrade our Koha installation, but so far have not been able to find any
> definitive guidance. (I may of course have been looking in the wrong
> place.) I’d welcome some advice from the list, please.
>
> We have a server running Debian Buster on which we have installed Koha
> 19.11 Common. Then we have 5 actual instances configured, one each for each
> of the community libraries. We would like to upgrade from 19.11 to a later
> release. I’ve gained some experience in installing and configuring Koha to
> a basic degree on local test sites and would now like to test the upgrade
> procedure; however, I have been unable to find any documentation about the
> procedure to follow.
>
> Among the questions I’ve got are:
> a) we assume that if we wanted to move from 19.11 to 20.11, we
> would have to do it in two stages, i.e. first to 20.05 and subsequently to
> 20.11 - is this a correct assumption?; and
> b) does the upgrade procedure amend the database schema, etc, for
> multiple instances that are using the same Koha Common installation?
>
> My apologies if I’m asking in the wrong place, or if I‘ve simply missed
> some clear instructions on all this.
>
> Tom Burke
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] (no subject)

2021-07-29 Thread Javi Legido
Try below solution:

http://kohageek.blogspot.com/2013/05/how-to-change-master-password-of-koha.html

On Fri, 30 Jul 2021 at 04:55, Sanjay Uchcharia 
wrote:

> Hello there, I've forgotten my koha password. How to get it back in Ubuntu
> 20.04.
>
>
> Thankyou. :)
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Encode 'ç' to import authority .marcxml file with authority

2021-07-20 Thread Javi Legido
Hi there.

I can confirm that re-adding '' fixed the issue.

Snippet from my templates:

a) Bibliographic

  
  00276nam a22001097a 4500

b) Authorities

  
  {% if authority_942_a == "PERSO_NAME" -%}
  00249nz  a2200109n  4500
  {% elif authority_942_a == "GEOGR_NAME" -%}
  00237nz  a2200109n  4500
  {% elif authority_942_a == "TOPIC_TERM" -%}
  00221nz  a2200109n  4500
  {% endif -%}

And in the other hand, but this is something a little bit of the scope of
this thread, I also introduced below changes in python code:

1. The output .marcxml file now is 'UTF-8' encoded:

with open(marcxml_filename, "w", encoding='utf8') as f:
f.write(self.marcxml_content)

Test:

file -i /tmp/authorities.1.marcxml
/tmp/authorities.1.marcxml: text/xml; charset=utf-8

2. Since 1) I no longer need to add the 'xmlcharrefreplace' hocus pocus:

return string.strip()

I still need to figure out '' format, since from now is hardcoded
in my templates.

Cheers.

Javier





On Tue, 20 Jul 2021 at 07:47, Javi Legido  wrote:

> Hi there.
>
> Thanks again for your time, I really appreciate it.
>
> I realized that omitting '' from .marcxml file is causing the
> issue with encoding, also in bibliographic.
>
> I did a little bit of reverse engineering to try to keep as simple as
> possible my bibliographic and authority templates.
>
> I will restore that XML key to my templates and keep testing.
>
> I will post my results in this thread for the records.
>
> Cheers.
>
> Javier
>
> On Mon, 19 Jul 2021 at 22:20, Harald Schaefer  wrote:
>
>> Hi Javier,
>>
>> it seems that your csv text is iso885 encoded,
>>
>> so you needed something in your python code like
>>
>>utf8str = iso8859str.decode('iso-8859-1').encode('utf8')
>>
>> You may search the internet for
>>
>>python read iso8859 strings and convert them to utf8
>>
>> Best regards, Harald
>>
>> Am 19.07.21 um 19:23 schrieb Javi Legido:
>> > Hi there.
>> >
>> > We are parsing a CSV file (DBText software) and convert it to MARCXML.
>> >
>> > Everything works fine, except for this super little detail.
>> >
>> > I will copy the files, since looks like the mailing list does not allows
>> > attach them.
>> >
>> > Thanks again for your time.
>> >
>> > Javier
>> >
>> > authorities.1.marcxml
>> >
>> > 
>> > > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
>> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
>> >  xmlns="http://www.loc.gov/MARC21/slim;>
>> >
>> >337
>> >OSt
>> >
>> >
>> >  OSt
>> >
>> >
>> >  VIENNEY,  Claude
>> >
>> >
>> >  PERSO_NAME
>> >
>> > 
>> > > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
>> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
>> >  xmlns="http://www.loc.gov/MARC21/slim;>
>> >
>> >338
>> >OSt
>> >
>> >
>> >  OSt
>> >
>> >
>> >  Formaci cooperativa
>> >
>> >
>> >  TOPIC_TERM
>> >
>> > 
>> > > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
>> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
>> >  xmlns="http://www.loc.gov/MARC21/slim;>
>> >
>> >338
>> >OSt
>> >
>> >
>> >  OSt
>> >
>> >
>> >  Frana
>> >
>> >
>> >  GEOGR_NAME
>> >
>> > 
>> >
>> > =
>> >
>> > bibliographic.marcxml
>> >
>> > 
>> > > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
>> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
>> >  xmlns="http://www.loc.gov/MARC21/slim;>
>> >
>> >OSt
>> >
>> >
>> >  2.903819.03.3
>> >
>> >
>> >  199900562
>> >
>> >

Re: [Koha] Encode 'ç' to import authority .marcxml file with authority

2021-07-19 Thread Javi Legido
Hi there.

Thanks again for your time, I really appreciate it.

I realized that omitting '' from .marcxml file is causing the issue
with encoding, also in bibliographic.

I did a little bit of reverse engineering to try to keep as simple as
possible my bibliographic and authority templates.

I will restore that XML key to my templates and keep testing.

I will post my results in this thread for the records.

Cheers.

Javier

On Mon, 19 Jul 2021 at 22:20, Harald Schaefer  wrote:

> Hi Javier,
>
> it seems that your csv text is iso885 encoded,
>
> so you needed something in your python code like
>
>utf8str = iso8859str.decode('iso-8859-1').encode('utf8')
>
> You may search the internet for
>
>python read iso8859 strings and convert them to utf8
>
> Best regards, Harald
>
> Am 19.07.21 um 19:23 schrieb Javi Legido:
> > Hi there.
> >
> > We are parsing a CSV file (DBText software) and convert it to MARCXML.
> >
> > Everything works fine, except for this super little detail.
> >
> > I will copy the files, since looks like the mailing list does not allows
> > attach them.
> >
> > Thanks again for your time.
> >
> > Javier
> >
> > authorities.1.marcxml
> >
> > 
> >  >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
> >  xmlns="http://www.loc.gov/MARC21/slim;>
> >
> >337
> >OSt
> >
> >
> >  OSt
> >
> >
> >  VIENNEY,  Claude
> >
> >
> >  PERSO_NAME
> >
> > 
> >  >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
> >  xmlns="http://www.loc.gov/MARC21/slim;>
> >
> >338
> >OSt
> >
> >
> >  OSt
> >
> >
> >  Formaci cooperativa
> >
> >
> >  TOPIC_TERM
> >
> > 
> >  >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
> >  xmlns="http://www.loc.gov/MARC21/slim;>
> >
> >338
> >OSt
> >
> >
> >  OSt
> >
> >
> >  Frana
> >
> >
> >  GEOGR_NAME
> >
> > 
> >
> > =
> >
> > bibliographic.marcxml
> >
> > 
> >  >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> >  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
> > http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
> >  xmlns="http://www.loc.gov/MARC21/slim;>
> >
> >OSt
> >
> >
> >  2.903819.03.3
> >
> >
> >  199900562
> >
> >
> >  
> >  esbafrg
> >
> >
> >
> >  Francesa
> >  
> >
> >  c.0.9.3.4 |  c.1.1
> >
> >
> >  199900562
> >
> >
> >337
> >VIENNEY,  Claude
> >
> >
> >  Socio-economie des organisations
> > cooperatives
> >
> >
> >
> >Pars
> >CIEM
> >1982
> >
> >
> >333 p.24 cm.
> >Tomo II. Analyse compare des cooperatives
> > fonctionnant dans des sy
> >
> >
> >  Formaci cooperativa
> >
> >
> >  Frana
> >
> >
> >  ddc
> >  
> >  
> >
> >
> >
> >
> >  
> >  1234567890
> >  
> >  1234567890
> >  AB-125
> >
> >  
> >
> >
> >
> > 
> >
> > On Mon, 19 Jul 2021 at 18:48, Harald Schaefer 
> wrote:
> >
> >> Hi Javier,
> >>
> >> you must be careful when working with utf8.
> >>
> >> When the inputfile and your python script is encoded in utf8, you need
> >> in my view no encode command.
> >>
> >> I didn't not understand your python script. It reads somethng and then
> >> writes again a modified xml file?
> >>
> >> There was no attachment in the last mail
> >>
&

Re: [Koha] Encode 'ç' to import authority .marcxml file with authority

2021-07-19 Thread Javi Legido
Hi there.

We are parsing a CSV file (DBText software) and convert it to MARCXML.

Everything works fine, except for this super little detail.

I will copy the files, since looks like the mailing list does not allows
attach them.

Thanks again for your time.

Javier

authorities.1.marcxml


http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
xmlns="http://www.loc.gov/MARC21/slim;>

  337
  OSt
  
  
OSt
  
  
VIENNEY,  Claude
  
  
PERSO_NAME
  

http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
xmlns="http://www.loc.gov/MARC21/slim;>

  338
  OSt
  
  
OSt
  
  
Formaci cooperativa
  
  
TOPIC_TERM
  

http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
xmlns="http://www.loc.gov/MARC21/slim;>

  338
  OSt
  
  
OSt
  
  
Frana
  
  
GEOGR_NAME
  


=

bibliographic.marcxml


http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd;
xmlns="http://www.loc.gov/MARC21/slim;>

  OSt

  
2.903819.03.3
  
  
199900562
  
  

esbafrg
  

  
Francesa

  
c.0.9.3.4 |  c.1.1
  
  
199900562
  
  
  337
  VIENNEY,  Claude
  
  
Socio-economie des organisations
cooperatives
  

  
  Pars
  CIEM
  1982
  
  
  333 p.24 cm.
  Tomo II. Analyse compare des cooperatives
fonctionnant dans des sy
  
  
Formaci cooperativa
  
  
Frana
  
  
ddc


  


  

1234567890

1234567890
AB-125
  

  




On Mon, 19 Jul 2021 at 18:48, Harald Schaefer  wrote:

> Hi Javier,
>
> you must be careful when working with utf8.
>
> When the inputfile and your python script is encoded in utf8, you need
> in my view no encode command.
>
> I didn't not understand your python script. It reads somethng and then
> writes again a modified xml file?
>
> There was no attachment in the last mail
>
> Regards, Harald
>
> Am 19.07.21 um 18:12 schrieb Javi Legido:
> > Hi Harold.
> >
> > Many thanks for your quick reply.
> >
> > Changing encoding:
> >
> > -return string.strip().encode("ascii",
> > "xmlcharrefreplace").decode("ascii")
> > +return string.strip().encode("utf8",
> > "xmlcharrefreplace").decode("utf8")
> >
> > Produces a MARCXML file which produces "0 records in file", so I can't
> > import it. The string was:
> >
> > França
> >
> > Attached the MARCXML record for authorities and bibliographic which works
> > (meaning that can be imported) but only for authorities produces the
> wrong
> > encoding.
> >
> > Thanks.
> >
> > Javier
> >
> > On Mon, 19 Jul 2021 at 17:26, Harald Schaefer 
> wrote:
> >
> >> Hi,
> >>
> >> you should use the utf8 encoding, when creating a python file.
> >>
> >> The marcxml file should have in the first line encoding='UTF-8'
> >>
> >> In python you should use encode('utf8')
> >>
> >> Regards, Harald
> >>
> >> Am 19.07.21 um 16:10 schrieb Javi Legido:
> >>> Hi there.
> >>>
> >>> I'm trying to import an authority type 'GEOGR_NAME' with 'ç' in its
> name
> >>> (field '151 a'):
> >>>
> >>> França
> >>>
> >>> So far:
> >>>
> >>> 1. If I manually add it from GUI (I want to import it from .marcxml
> file)
> >>> it works typing 'ç' character. If I save the record as MARCXML I get
> >> below
> >>> encoding:
> >>>
> >>>   Frana
> >>>
> >>> 2. If I use python to encode it:
> >>>
> >>>   return string.strip().encode("ascii",
> >>> "xmlcharrefreplace").decode("ascii")
> >>>
> >>> The generated MARCXML line looks like:
> >>>
> >>>   Frana
> >>>
> >>> In the GUI looks like 'Franȧ', and if I save it as MARCXML looks like:
> >>>
> >>>   Fran
> >>>
> >>> Worth mentioning that the bibliographic bit referencing this authority
> >>> looks perfect, and it was created exactly the same as for authority, so
> >> the
> >>> only

Re: [Koha] Encode 'ç' to import authority .marcxml file with authority

2021-07-19 Thread Javi Legido
Hi Harold.

Many thanks for your quick reply.

Changing encoding:

-return string.strip().encode("ascii",
"xmlcharrefreplace").decode("ascii")
+return string.strip().encode("utf8",
"xmlcharrefreplace").decode("utf8")

Produces a MARCXML file which produces "0 records in file", so I can't
import it. The string was:

França

Attached the MARCXML record for authorities and bibliographic which works
(meaning that can be imported) but only for authorities produces the wrong
encoding.

Thanks.

Javier

On Mon, 19 Jul 2021 at 17:26, Harald Schaefer  wrote:

> Hi,
>
> you should use the utf8 encoding, when creating a python file.
>
> The marcxml file should have in the first line encoding='UTF-8'
>
> In python you should use encode('utf8')
>
> Regards, Harald
>
> Am 19.07.21 um 16:10 schrieb Javi Legido:
> > Hi there.
> >
> > I'm trying to import an authority type 'GEOGR_NAME' with 'ç' in its name
> > (field '151 a'):
> >
> > França
> >
> > So far:
> >
> > 1. If I manually add it from GUI (I want to import it from .marcxml file)
> > it works typing 'ç' character. If I save the record as MARCXML I get
> below
> > encoding:
> >
> >  Frana
> >
> > 2. If I use python to encode it:
> >
> >  return string.strip().encode("ascii",
> > "xmlcharrefreplace").decode("ascii")
> >
> > The generated MARCXML line looks like:
> >
> >  Frana
> >
> > In the GUI looks like 'Franȧ', and if I save it as MARCXML looks like:
> >
> >  Fran
> >
> > Worth mentioning that the bibliographic bit referencing this authority
> > looks perfect, and it was created exactly the same as for authority, so
> the
> > only problem is with authority.
> >
> > Does anybody faced similar problem before? In other words I need to
> > generate programatically a MARCXML file to later on import it to koha
> > (21.x), and some of the records (authorities) contains 'ç' and are not
> > being encoded right.
> > ___
> >
> > Koha mailing list  http://koha-community.org
> > Koha@lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] Encode 'ç' to import authority .marcxml file with authority

2021-07-19 Thread Javi Legido
Hi there.

I'm trying to import an authority type 'GEOGR_NAME' with 'ç' in its name
(field '151 a'):

França

So far:

1. If I manually add it from GUI (I want to import it from .marcxml file)
it works typing 'ç' character. If I save the record as MARCXML I get below
encoding:

Frana

2. If I use python to encode it:

return string.strip().encode("ascii",
"xmlcharrefreplace").decode("ascii")

The generated MARCXML line looks like:

Frana

In the GUI looks like 'Franȧ', and if I save it as MARCXML looks like:

Fran

Worth mentioning that the bibliographic bit referencing this authority
looks perfect, and it was created exactly the same as for authority, so the
only problem is with authority.

Does anybody faced similar problem before? In other words I need to
generate programatically a MARCXML file to later on import it to koha
(21.x), and some of the records (authorities) contains 'ç' and are not
being encoded right.
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Add separator from fields 245a and 245c

2021-07-13 Thread Javi Legido
Hi there.

Many thanks for your reply.

In our case the solution was a simple edition in .xls file.

From:

  


To:

 |
   

Cheers.

Javier



On Wed, 14 Jul 2021 at 00:56, Charles Kelley  wrote:

> Hello, Javi et al!
>
> In our latest exchange, on 30 June 2021 at 9:01 [JST] I received the
> following from you:
>
> We have below XML:
>>
>>   
>> Gestin empresarial. El caso de dieciocho
>> cooperativas
>> 
>> Consultores Asociados (Coord.)
>>   
>>
>> Which leads to below string both in admin and OPAC:
>>
>> Gestión empresarial. El caso de dieciocho cooperativas Consultores Asociados
>> (Coord.)
>>
>> Question: how to add a string (let's say " | ") between fiedls 245a and
>> 245c?
>>
>> Thanks.
>>
>> Javier
>>
>
>
> My library faced this problem when we migrated from one machine to
> another. It turned out that it was original records were missing the
> punctuation marks and they had to be instroduced.
>
> We exported the entire catalog from Koha in MARC format and fixed the
> problem -- or at least most of the problem -- with MarcEdit. MarcEdit has a
> tool called "Build New Field." It allows one to copy or replace fieldsin a
> group with a new version.
>
> After fixing the records, we imported them back into Koha.
>
> It worked like a charm for us. Mind you, it wasn't perfect: we had to
> be especially watchful of parallel titles in 245 $b since they are preceded
> by an equal sign. And we had to make sure every subfield was copied, and
> then empty subfields deleted.
>
> But overall it worked, and worked well; and it save a lot of staff
> matter, energy, time, and space.
>
> Terry Reese presents a few tutorials online about MarcEdit. That may
> be your best way if you want to avoid a painstaking top-to-bottom
> record-by-record correction in records. I don't know enough about XML to
> advise about that.
>
> Hope that helps.
>
> --
>
> 気を付けて。 /ki wo tukete/ = Take care.
>
> -- Charles.
>
> Charles Kelley, MLS
> PSC 704 Box 1029
> APO AP 96338
>
> Charles Kelley
> Tsukimino 1-Chome 5-2
> Tsukimino Gaadenia #210
> Yamato-shi, Kanagawa-ken
> 〒242-0002 JAPAN
>
> +1-301-741-7122 [US cell]
> +81-80-4356-2178 [JPN cell]
>
> mnogoja...@aol.com [h]
> cmkelley...@gmail.com [p]
>
> linkedin.com/in/cmkelleymls 
> Meeting Your Information Needs. Virtually.
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Add separator from fields 245a and 245c

2021-07-11 Thread Javi Legido
Good morning.

Thanks Katrin, I was able to do my first tests modifying XSLT file.

Cheers.

Javier

On Sat, 10 Jul 2021 at 12:21, Katrin Fischer 
wrote:

> Hi Javier,
>
> usually the punctuation is added to the data in MARC21. At the moment
> there is no feature in Koha to assist in adding those while cataloguing
> or adding them to the displays.
>
> What you could do is make a copy of the default XSLT files that are used
> to generate the display in the detail view and result lists and modify
> them in order to generate separators. The new XSLT files can be
> activated using the XSLT system preferences.
>
> There is a XSLT library in the wiki that shows some examples of
> modifications people have made:
>
> https://wiki.koha-community.org/wiki/XSLT_Library
>
> Hope this helps,
>
> Katrin
>
> On 29.06.21 18:11, Javi Legido wrote:
> > Hi there.
> >
> > We have below XML:
> >
> >
> >  Gestin empresarial. El caso de dieciocho
> > cooperativas
> >  
> >  Consultores Asociados (Coord.)
> >
> >
> > Which leads to below string both in admin and OPAC:
> >
> > Gestión empresarial. El caso de dieciocho cooperativas Consultores
> > Asociados (Coord.)
> >
> > Question: how to add a string (let's say " | ") between fiedls 245a and
> > 245c?
> >
> > Thanks.
> >
> > Javier
> > ___
> >
> > Koha mailing list  http://koha-community.org
> > Koha@lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Field 830v won't display

2021-07-08 Thread Javi Legido
Amazing!

It worked like a charm.

merci beaucoup Caroline.

On Wed, 30 Jun 2021 at 19:33, Caroline Cyr-La-Rose <
caroline.cyr-la-r...@inlibro.com> wrote:

> Hi Javi,
>
> Sounds like the subfield is missing or hidden in the framework. You can
> check in Administration > MARC bibliographic frameworks.
>
> Action > MARC structure
>
> Search for 830
>
> Actions > Edit subfields
>
> Click on v
>
> Make sure it is "Managed in tab"  8 and Editor is checked.
>
>
> Good luck!
>
> Caroline
>
> On 21-06-30 10 h 23, Javi Legido wrote:
> > Hi there.
> >
> > =Steps to reproduce=
> >
> > 1. Login admin interface
> >
> > 2. Click 'Cataloging'
> >
> > 3. Click 'New record' button
> >
> > 4. Click 'Default framework'
> >
> > 5. Click '8' tab
> >
> > 6. Click '830 SERIES ADDED ENTRY...' to expand it
> >
> > =Expected behavior=
> >
> > Find a text box with 'v Volume/sequential designation', as per:
> >
> > https://www.loc.gov/marc/bibliographic/bd830.html
> >
> > =Found behavior=
> >
> > Missing that field
> >
> > =Errors=
> >
> > None
> >
> > Any guidance will be appreciated.
> >
> > Thanks.
> > ___
> >
> > Koha mailing list  http://koha-community.org
> > Koha@lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
> --
> Caroline Cyr La Rose, M.L.I.S.
> Librarian | Product Manager
>
> Phone: 1-833-465-4276, ext. 221
> caroline.cyr-la-r...@inlibro.com <mailto:caroline.cyr-la-r...@inlibro.com>
>
> INLiBRO | Document Technologies Specialists | www.inLibro.com
> <http://www.inLibro.com>
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] Field 830v won't display

2021-06-30 Thread Javi Legido
Hi there.

=Steps to reproduce=

1. Login admin interface

2. Click 'Cataloging'

3. Click 'New record' button

4. Click 'Default framework'

5. Click '8' tab

6. Click '830 SERIES ADDED ENTRY...' to expand it

=Expected behavior=

Find a text box with 'v Volume/sequential designation', as per:

https://www.loc.gov/marc/bibliographic/bd830.html

=Found behavior=

Missing that field

=Errors=

None

Any guidance will be appreciated.

Thanks.
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] Add separator from fields 245a and 245c

2021-06-29 Thread Javi Legido
Hi there.

We have below XML:

  
Gestin empresarial. El caso de dieciocho
cooperativas

Consultores Asociados (Coord.)
  

Which leads to below string both in admin and OPAC:

Gestión empresarial. El caso de dieciocho cooperativas Consultores
Asociados (Coord.)

Question: how to add a string (let's say " | ") between fiedls 245a and
245c?

Thanks.

Javier
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Reoccurring DBMS auto increment issue

2021-06-22 Thread Javi Legido
Hi there.

Given that web application logs are so laconic maybe you can temporary
enable SQL query logging in your database to see which query is producing
the error.

Cheers.

Javier

On Tue, 22 Jun 2021 at 09:48, Michael Kuhn  wrote:

> Hi Jonathan
>
> You wrote:
>
>  > Hi Michael, what do you have in the Koha log files?
>
> When trying to delete a user, logfile "/var/log/koha/embl/plack.log" says:
>
> 192.168.210.80 - - [21/Jun/2021:17:16:58 +0200] "GET
> /intranet/members/deletemem.pl?member=83 HTTP/1.1" 200 32438
> "
> https://libcatalog-testusers.embl.de/cgi-bin/koha/members/moremember.pl?borrowernumber=84;
>
> "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
> 192.168.210.80 - - [21/Jun/2021:17:17:44 +0200] "GET
> /intranet/members/
> deletemem.pl?csrf_token=9aea7e6464047b5c52c5ee3c6af5955bbf1b78a6%2Cbfb8e2961b2275e44a1fa49235060091ccece7fe%2C1624288618=83=delete_confirmed
> HTTP/1.1" 500 136
> "
> https://libcatalog-testusers.embl.de/cgi-bin/koha/members/deletemem.pl?member=84;
>
> "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
>
> At the same time "/var/log/apache2/other_vhosts_access.log" says:
>
> libcatalog-test.embl.de:443 192.168.210.80 - - [21/Jun/2021:17:16:58
> +0200] "GET /cgi-bin/koha/members/deletemem.pl?member=83 HTTP/1.1" 200
> 7192
> "
> https://libcatalog-testusers.embl.de/cgi-bin/koha/members/moremember.pl?borrowernumber=84;
>
> "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
> libcatalog-test.embl.de:443 192.168.210.80 - - [21/Jun/2021:17:17:44
> +0200] "GET
> /cgi-bin/koha/members/
> deletemem.pl?csrf_token=9aea7e6464047b5c52c5ee3c6af5955bbf1b78a6%2Cbfb8e2961b2275e44a1fa49235060091ccece7fe%2C1624288618=83=delete_confirmed
> HTTP/1.1" 500 532
> "
> https://libcatalog-testusers.embl.de/cgi-bin/koha/members/deletemem.pl?member=84;
>
> "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
>
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
>
>
>
> > Le lun. 21 juin 2021 à 21:01, Michael Kuhn  a écrit :
> >>
> >> Hi
> >>
> >> We are working with Debian GNU/Linux 10, MariaDB 10.3.27 and Koha
> >> 20.11.00 (using Shibboleth authentication).
> >>
> >> To avoid auto increment issues we have implemented the solution
> >> described in
> >>
> https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix#Single_instance_setup
> >> - of course replacing "koha_kohadev" with the name of our own database,
> >> then restarted MariaDB.
> >>
> >> We did this even if the page says only versions prior to MariaDB 10.2.24
> >> are affected. However, if we implement the fix or not, the following
> >> problem occurs:
> >>
> >> When we manually create a new Koha user (e. g. 84) and then try to
> >> delete it in the staff client, the message appears "An Error Occurred /
> >> 500 Internal Server Error". In Koha menu "About Koha > System
> >> information" it says "The following ids exist in both tables borrowers
> >> and deletedborrowers: 84".
> >>
> >> So we delete that number in MariaDB using SQL statement "DELETE FROM
> >> deletedborrowers where borrowernumber=84;". After that table
> >> "deletedborrowers" is empty and Koha menu "About Koha > System
> >> information" says "No warnings.". Again we try to delete the user, the
> >> internal server error occurs, etc ad infinitum.
> >>
> >> Are we doing something wrong?
> >>
> >> Best wishes: Michael
> >> --
> >> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> >> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> >> T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
> >> ___
> >>
> >> Koha mailing list  http://koha-community.org
> >> Koha@lists.katipo.co.nz
> >> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
>
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Error

2021-05-29 Thread Javi Legido
Hi.

Check the xml format. Maybe start wirh just one record and see what happens.

Cheera.

El sáb., 29 may. 2021 7:25, Himanshu Aggarwal 
escribió:

> While doing batch record modification I am getting following error Cannot
> enqueue this job. (The error was: Job has not been enqueued. See the Koha
> logfile for more information). Kindly help
>
> --
> Assistant Librarian,
> Confucius Institute Scholar 13-14,
> R.D. National College,
> Bandra (W.)
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Continued koha-common Upgrade Challenges

2021-04-28 Thread Javi Legido
Hi there.

Not sure if in your scenario there's the option, but I would strongly
recommend start using docker instead of installing packages.

If you agree with this approach let me know, I can give you some hints.

Cheers.

Javier

On Wed, 28 Apr 2021 at 17:55,  wrote:

> Our koha installation is on Debian 10.  I have previously engaged the list
> for upgrade challenges specifically related to the outcome of the Debian
> package koha-common upgrade scripts. We are stuck at koha-common version
> 20.05.xx at this point.  My latest attempt to upgrade to 20.11.04-1
> resulted in the following three error messages.  Is there any way to
> manually alter the correct table(s) to fix the database issues? I'm not
> sure what the "Failed to enable unit" message means.
>
> 
> Setting up koha-common (20.11.04-1) ...
> Installing new version of config file /etc/cron.daily/koha-common ...
> Installing new version of config file /etc/init.d/koha-common ...
> Installing new version of config file /etc/koha/SIPconfig.xml ...
> Installing new version of config file
> /etc/koha/apache-shared-intranet-plack.conf ...
> Installing new version of config file
> /etc/koha/apache-shared-intranet.conf ...
> Installing new version of config file /etc/koha/apache-shared-opac.conf ...
> Installing new version of config file /etc/koha/koha-conf-site.xml.in ...
> Installing new version of config file /etc/koha/log4perl-site.conf.in ...
> Installing new version of config file /etc/koha/plack.psgi ...
> Installing new version of config file
> /etc/koha/zebradb/etc/phrases-icu.xml ...
> Installing new version of config file
> /etc/koha/zebradb/etc/word-phrase-utf.chr ...
> Upgrading database schema for [database]
> ...
> Upgrade to 20.06.00.031 done [10:19:38]: Bug 22789 - Add non_priority
> column on reserves and old_reserves tables
> DBD::mysql::db do failed: Row size too large. The maximum row size for the
> used table type, not counting BLOBs, is 8126. This includes storage
> overhead, check the manual. You have to change some columns to TEXT or
> BLOBs [for Statement "ALTER TABLE `items` ADD COLUMN
> `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER
> `new_status`"] at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
> updatedatabase.pl line 22709.
>
> DBD::mysql::db do failed: Row size too large. The maximum row size for the
> used table type, not counting BLOBs, is 8126. This includes storage
> overhead, check the manual. You have to change some columns to TEXT or
> BLOBs [for Statement "ALTER TABLE `deleteditems` ADD COLUMN
> `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER
> new_status`"] at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
> updatedatabase.pl line 22715.
> ..
> Failed to enable unit: Unit
> /run/systemd/generator.late/koha-common.service is transient or generated.
>
> 
>
> NOTE: When I then run "/usr/share/koha/bin/migration_tools/
> rebuild_zebra.pl -b -a -z" in this post-upgrade state I get the following
> error for each biblio record:
>
>
> DBD::mysql::st execute failed: Unknown column
> 'me.exclude_from_local_holds_priority' in 'field list' [for Statement
> "SELECT `me`.`itemnumber`, `me`.`biblionumber`, `me`.`biblioitemnumber`,
> `me`.`barcode`, `me`.`dateaccessioned`, `me`.`booksellerid`,
> `me`.`homebranch`, `me`.`price`, `me`.`replacementprice`,
> `me`.`replacementpricedate`, `me`.`datelastborrowed`, `me`.`datelastseen`,
> `me`.`stack`, `me`.`notforloan`, `me`.`damaged`, `me`.`damaged_on`,
> `me`.`itemlost`, `me`.`itemlost_on`, `me`.`withdrawn`, `me`.`withdrawn_on`,
> `me`.`itemcallnumber`, `me`.`coded_location_qualifier`, `me`.`issues`,
> `me`.`renewals`, `me`.`reserves`, `me`.`restricted`, `me`.`itemnotes`,
> `me`.`itemnotes_nonpublic`, `me`.`holdingbranch`, `me`.`timestamp`,
> `me`.`location`, `me`.`permanent_location`, `me`.`onloan`,
> `me`.`cn_source`, `me`.`cn_sort`, `me`.`ccode`, `me`.`materials`,
> `me`.`uri`, `me`.`itype`, `me`.`more_subfields_xml`, `me`.`enumchron`,
> `me`.`copynumber`, `me`.`stocknumber`, `me`.`new_status`,
> `me`.`exclude_from_local_holds_priority` FROM `items` `me` WHERE (
> `me`.`itemnumber` = ? )" with ParamValues: 0=1] at
> /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
> error retrieving biblio 1 at /usr/share/koha/bin/migration_tools/
> rebuild_zebra.pl line 686.
>
> Any help would be greatly appreciated.  I fear we are getting farther and
> farther behind on koha-common versions since we cannot seem to get past the
> database schema upgrade errors.
>
> Scott Leafe
> Scriptel Ministries
> Houston, Texas
>
> ___
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: 

Re: [Koha] Step by step guide to enable REST API koha 20.11

2021-03-26 Thread Javi Legido
Good afternoon.

Many thanks, it worked like a charm!

I'll post the steps at the end of this e-mail. Regarding
koha-testing-docker I've just tried now and it gave me an error, maybe I'll
fill a bug, but thanks in advance.

Steps with buster.

buster
koha 20.11

docker stop test && docker rm test
docker run \
  --name test \
  --cap-add=SYS_NICE \
  --cap-add=DAC_READ_SEARCH \
  -p 8080:8080 \
  -p 80:80 \
  -d debian:buster \
bin/sh -c "while true; do echo hello world; sleep 1; done"
docker exec -ti test bash

apt-get update && apt-get install -y \
  wget \
  gnupg

wget -q -O- https://debian.koha-community.org/koha/gpg.asc | apt-key add -

echo 'deb http://debian.koha-community.org/koha stable main' | tee
/etc/apt/sources.list.d/koha.list

apt-get update && apt-get install -y \
  koha-common \
  mariadb-server

service mysql start

a2enmod rewrite \
  cgi \
  headers \
  proxy_http \
  && a2dissite 000-default

koha-create --create-db mykoha

koha-plack --enable mykoha

koha-plack --start mykoha

service apache2 restart

GUI install

docker exec -ti test koha-passwd mykoha

http://mykoha-intra.mydnsname.org

koha_mykoha
*

http://mykoha-intra.mydnsname.org/api/v1/.html

Voila!

On Fri, 26 Mar 2021 at 12:50, Tomas Cohen Arazi 
wrote:

> Those look correct.
>
> Have you seen koha-testing-docker?
>
> Kind regards
>
> El vie, 26 mar 2021 a las 8:44, Javier Legido at Kedu (<
> javier.leg...@kedu.coop>) escribió:
>
>> Good morning.
>>
>> Many thanks for your quick reply Tomas.
>>
>> I will do the test with stable debian version just right now, but maybe
>> you (or someone else) can confirm or discard if the provided steps are
>> accurate in order to get the REST API up and running.
>>
>> Thanks.
>>
>> --
>>
>> Javier Legido Martínez
>> javier.leg...@kedu.coop
>> +34 600 840 948
>>
>> Kedu SCCL
>> https://kedu.coop
>> i...@kedu.coop
>>
>> On Fri, 26 Mar 2021 at 12:36, Tomas Cohen Arazi 
>> wrote:
>>
>>> Hi, we don't support Debian testing (things change often regarding
>>> dependencies and available packages).
>>>
>>> Please use the debian:buster image instead.
>>>
>>> Kind regards
>>>
>>> El vie., 26 mar. 2021 1:50, Javi Legido  escribió:
>>>
>>>> Hi there.
>>>>
>>>> I would like to enable REST API, but so far i got 404 while trying to
>>>> access:
>>>>
>>>> http://mykoha-intra.mydnsname.org/api/v1/.html
>>>>
>>>> http://mykoha.myDNSname.org/api/v1/.html
>>>>
>>>> I enabled below options:
>>>>
>>>>  OPACBaseURL => http://mykoha.myDNSname.org
>>>>  OpacPublic
>>>>  RESTBasicAuth
>>>>  RESTOAuth2ClientCredentials
>>>>  RESTPublicAnonymousRequests
>>>>  RESTPublicAPI
>>>>
>>>> I see below errors in '/var/log/koha/mykoha/plack.log':
>>>>
>>>> 172.17.0.1 - - [26/Mar/2021:04:42:52 +] "GET /api/v1/
>>>> app.pl/api/v1/.html
>>>> HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0)
>>>> Gecko/20100101 Firefox/78.0"
>>>>
>>>> Many thanks in advice.
>>>>
>>>> Now verbose things, configuration files and step by step ways to
>>>> reproduce
>>>> the issue:
>>>>
>>>> 1. Configuration files
>>>>
>>>> /etc/apache2/sites-enabled/mykoha.conf
>>>>
>>>> # Koha instance mykoha Apache config.
>>>>
>>>> # OPAC
>>>> 
>>>>   = 2.4>
>>>>Define instance "mykoha"
>>>>   
>>>>Include /etc/koha/apache-shared.conf
>>>> #  Include /etc/koha/apache-shared-disable.conf
>>>>   Include /etc/koha/apache-shared-opac-plack.conf
>>>>Include /etc/koha/apache-shared-opac.conf
>>>>
>>>>ServerName mykoha.myDNSname.org
>>>>SetEnv KOHA_CONF "/etc/koha/sites/mykoha/koha-conf.xml"
>>>>AssignUserID mykoha-koha mykoha-koha
>>>>
>>>>ErrorLog/var/log/koha/mykoha/opac-error.log
>>>> #  TransferLog /var/log/koha/mykoha/opac-access.log
>>>> 
>>>>
>>>> # Intranet
>>>> 
>>>>   = 2.4>
>>>>Define instance "mykoha"
>>>>   
>>>>Include /etc/koha/apache-shared.conf
>>>> #  Include /etc/koha/apache-shared-disable.conf
>>&

Re: [Koha] Batch insert of records

2021-03-26 Thread Javi Legido
Good afternoon.

Many thanks, I'll have a look.

Thanks.


On Fri, 26 Mar 2021 at 12:52, Tomas Cohen Arazi 
wrote:

> Take a look at the following scripts:
>
> - stage_file.pl
> - commit_file.pl
>
> They can be used the same way the UI two-step process is done.
>
> El vie, 26 mar 2021 a las 2:59, Javi Legido () escribió:
>
>> Hi there.
>>
>> We would like to add some records (7k) to our koha 20.11 instance. After
>> reading [1] the manual is not clear to me if this adding operation is
>> currently possible through REST API or any other API.
>>
>> So far we only now how to do it through GUI, but there's any other way to
>> automate the process through API?
>>
>> Thanks in advance.
>>
>> Javier
>>
>> [1]
>>
>> https://koha-community.org/manual/20.11/en/html/webservices.html#versioned-restful-api-effort
>> ___
>>
>> Koha mailing list  http://koha-community.org
>> Koha@lists.katipo.co.nz
>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>>
>
>
> --
> Tomás Cohen Arazi
> Theke Solutions (http://theke.io)
> ✆ +54 9351 3513384
> GPG: B2F3C15F
>
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Step by step guide to enable REST API koha 20.11

2021-03-26 Thread Javi Legido
Good morning.

Many thanks for your quick reply Tomas.

I will do the test with stable debian version just right now, but maybe you
(or someone else) can confirm or discard if the provided steps are accurate
in order to get the REST API up and running.

Thanks.


On Fri, 26 Mar 2021 at 12:36, Tomas Cohen Arazi 
wrote:

> Hi, we don't support Debian testing (things change often regarding
> dependencies and available packages).
>
> Please use the debian:buster image instead.
>
> Kind regards
>
> El vie., 26 mar. 2021 1:50, Javi Legido  escribió:
>
>> Hi there.
>>
>> I would like to enable REST API, but so far i got 404 while trying to
>> access:
>>
>> http://mykoha-intra.mydnsname.org/api/v1/.html
>>
>> http://mykoha.myDNSname.org/api/v1/.html
>>
>> I enabled below options:
>>
>>  OPACBaseURL => http://mykoha.myDNSname.org
>>  OpacPublic
>>  RESTBasicAuth
>>  RESTOAuth2ClientCredentials
>>  RESTPublicAnonymousRequests
>>  RESTPublicAPI
>>
>> I see below errors in '/var/log/koha/mykoha/plack.log':
>>
>> 172.17.0.1 - - [26/Mar/2021:04:42:52 +] "GET /api/v1/
>> app.pl/api/v1/.html
>> HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0)
>> Gecko/20100101 Firefox/78.0"
>>
>> Many thanks in advice.
>>
>> Now verbose things, configuration files and step by step ways to reproduce
>> the issue:
>>
>> 1. Configuration files
>>
>> /etc/apache2/sites-enabled/mykoha.conf
>>
>> # Koha instance mykoha Apache config.
>>
>> # OPAC
>> 
>>   = 2.4>
>>Define instance "mykoha"
>>   
>>Include /etc/koha/apache-shared.conf
>> #  Include /etc/koha/apache-shared-disable.conf
>>   Include /etc/koha/apache-shared-opac-plack.conf
>>Include /etc/koha/apache-shared-opac.conf
>>
>>ServerName mykoha.myDNSname.org
>>SetEnv KOHA_CONF "/etc/koha/sites/mykoha/koha-conf.xml"
>>AssignUserID mykoha-koha mykoha-koha
>>
>>ErrorLog/var/log/koha/mykoha/opac-error.log
>> #  TransferLog /var/log/koha/mykoha/opac-access.log
>> 
>>
>> # Intranet
>> 
>>   = 2.4>
>>Define instance "mykoha"
>>   
>>Include /etc/koha/apache-shared.conf
>> #  Include /etc/koha/apache-shared-disable.conf
>>   Include /etc/koha/apache-shared-intranet-plack.conf
>>Include /etc/koha/apache-shared-intranet.conf
>>
>>ServerName mykoha-intra.myDNSname.org
>>SetEnv KOHA_CONF "/etc/koha/sites/mykoha/koha-conf.xml"
>>AssignUserID mykoha-koha mykoha-koha
>>
>>ErrorLog/var/log/koha/mykoha/intranet-error.log
>> #  TransferLog /var/log/koha/mykoha/intranet-access.log
>> 
>>
>> /etc/koha/apache-shared-opac-plack.conf
>>
>> # Apache configuration settings that are shared for every Koha instance.
>> # This file contains settings for the Plack configuration of the OPAC.
>> #
>> # This file should be included from an instance's
>> # /etc/apache2/site-available file, from within the VirtualHost section
>> # for the OPAC.
>>
>> # Plack is only available out-of-the-box for Apache 2.4.7+ setups
>> = 2.4.8>
>> 
>>
>> ProxyPreserveHost On
>>
>> RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS
>>
>> # Point the OPAC site to Plack
>> ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|
>> http://localhost/opac/opac-main.pl;
>> ProxyPassReverse /index.html
>> "unix:/var/run/koha/${instance}/plack.sock|
>> http://localhost/opac/opac-main.pl;
>> ProxyPass /cgi-bin/koha
>> "unix:/var/run/koha/${instance}/plack.sock|
>> http://localhost/opac;
>> ProxyPassReverse /cgi-bin/koha
>> "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac;
>>
>> # Point the /api endpoint to Plack
>> RewriteCond %{REQUEST_URI} !^/api/v[0-1]+/app.pl
>> RewriteRule ^/api/(v[0-9]+)/(.*)$ /api/$1/app.pl/api/$1/$2 [L,PT]
>>
>> ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|
>> http://localhost/api;
>> ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|
>> http://localhost/api;
>>
>> 
>> 
>>
>> /etc/koha/apache-shared-intranet-plack.conf
>>
>> # Apache configuration settings that are shared for every Koha instance.
>> # This file contains settings for the

[Koha] Batch insert of records

2021-03-25 Thread Javi Legido
Hi there.

We would like to add some records (7k) to our koha 20.11 instance. After
reading [1] the manual is not clear to me if this adding operation is
currently possible through REST API or any other API.

So far we only now how to do it through GUI, but there's any other way to
automate the process through API?

Thanks in advance.

Javier

[1]
https://koha-community.org/manual/20.11/en/html/webservices.html#versioned-restful-api-effort
___

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] Step by step guide to enable REST API koha 20.11

2021-03-25 Thread Javi Legido
Hi there.

I would like to enable REST API, but so far i got 404 while trying to
access:

http://mykoha-intra.mydnsname.org/api/v1/.html

http://mykoha.myDNSname.org/api/v1/.html

I enabled below options:

 OPACBaseURL => http://mykoha.myDNSname.org
 OpacPublic
 RESTBasicAuth
 RESTOAuth2ClientCredentials
 RESTPublicAnonymousRequests
 RESTPublicAPI

I see below errors in '/var/log/koha/mykoha/plack.log':

172.17.0.1 - - [26/Mar/2021:04:42:52 +] "GET /api/v1/app.pl/api/v1/.html
HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0)
Gecko/20100101 Firefox/78.0"

Many thanks in advice.

Now verbose things, configuration files and step by step ways to reproduce
the issue:

1. Configuration files

/etc/apache2/sites-enabled/mykoha.conf

# Koha instance mykoha Apache config.

# OPAC

  = 2.4>
   Define instance "mykoha"
  
   Include /etc/koha/apache-shared.conf
#  Include /etc/koha/apache-shared-disable.conf
  Include /etc/koha/apache-shared-opac-plack.conf
   Include /etc/koha/apache-shared-opac.conf

   ServerName mykoha.myDNSname.org
   SetEnv KOHA_CONF "/etc/koha/sites/mykoha/koha-conf.xml"
   AssignUserID mykoha-koha mykoha-koha

   ErrorLog/var/log/koha/mykoha/opac-error.log
#  TransferLog /var/log/koha/mykoha/opac-access.log


# Intranet

  = 2.4>
   Define instance "mykoha"
  
   Include /etc/koha/apache-shared.conf
#  Include /etc/koha/apache-shared-disable.conf
  Include /etc/koha/apache-shared-intranet-plack.conf
   Include /etc/koha/apache-shared-intranet.conf

   ServerName mykoha-intra.myDNSname.org
   SetEnv KOHA_CONF "/etc/koha/sites/mykoha/koha-conf.xml"
   AssignUserID mykoha-koha mykoha-koha

   ErrorLog/var/log/koha/mykoha/intranet-error.log
#  TransferLog /var/log/koha/mykoha/intranet-access.log


/etc/koha/apache-shared-opac-plack.conf

# Apache configuration settings that are shared for every Koha instance.
# This file contains settings for the Plack configuration of the OPAC.
#
# This file should be included from an instance's
# /etc/apache2/site-available file, from within the VirtualHost section
# for the OPAC.

# Plack is only available out-of-the-box for Apache 2.4.7+ setups
= 2.4.8>


ProxyPreserveHost On

RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS

# Point the OPAC site to Plack
ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/opac/opac-main.pl;
ProxyPassReverse /index.html
"unix:/var/run/koha/${instance}/plack.sock|
http://localhost/opac/opac-main.pl;
ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/opac;
ProxyPassReverse /cgi-bin/koha
"unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac;

# Point the /api endpoint to Plack
RewriteCond %{REQUEST_URI} !^/api/v[0-1]+/app.pl
RewriteRule ^/api/(v[0-9]+)/(.*)$ /api/$1/app.pl/api/$1/$2 [L,PT]

ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/api;
ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/api;




/etc/koha/apache-shared-intranet-plack.conf

# Apache configuration settings that are shared for every Koha instance.
# This file contains settings for the Plack configuration of the intranet.
#
# This file should be included from an instance's
# /etc/apache2/site-available file, from within the VirtualHost section
# for the intranet.

# Plack is only available out-of-the-box for Apache 2.4.8+ setups
= 2.4.8>


# FIXME: These scripts should be fixed so they
# don't break under plack/starman
ProxyPass "/cgi-bin/koha/offline_circ/process_koc.pl" "!"
ProxyPass "/cgi-bin/koha/tools/background-job-progress.pl" "!"
ProxyPass "/cgi-bin/koha/tools/batchMod.pl" "!"
ProxyPass "/cgi-bin/koha/tools/export.pl" "!"
ProxyPass "/cgi-bin/koha/tools/manage-marc-import.pl" "!"
ProxyPass "/cgi-bin/koha/tools/stage-marc-import.pl" "!"
ProxyPass "/cgi-bin/koha/tools/upload-cover-image.pl" "!"
ProxyPass "/cgi-bin/koha/svc/cataloguing/metasearch" "!"

ProxyPreserveHost On

RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS

# Point the intranet site to Plack
ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/intranet/mainpage.pl;
ProxyPassReverse /index.html
"unix:/var/run/koha/${instance}/plack.sock|
http://localhost/intranet/mainpage.pl;
ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/intranet;
ProxyPassReverse /cgi-bin/koha
"unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet;

# Point the /api endpoint to Plack
RewriteCond %{REQUEST_URI} !^/api/v[0-1]+/app.pl
RewriteRule ^/api/(v[0-9]+)/(.*)$ /api/$1/app.pl/api/$1/$2 [L,PT]

ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|
http://localhost/api;
ProxyPassReverse