Re: [Koha] MARC modification templates problem

2023-08-09 Thread Eric Phetteplace
Hi Caroline,

That works! Thank you so much. Removing the if condition and using a more
specific regex substitution changed only the field I wanted and left the
other alone. Oddly, if I say I want to do this to the "1st" field it still
shows the problematic behavior (both fields are modified, the second
receives a copy of the first's $u subfield), but if I set it to "all" then
only the first field is modified. I will submit a bug report for that.

Best,

ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)

ephettepl...@cca.edu


*CCA is situated on the traditional unceded lands of the **Chochenyo and
Ramaytush Ohlone** peoples.*

Black-owned bookstores in Oakland: Ashay by the Bay
, Marcus Books


:(){ :|: & };:


On Wed, Aug 9, 2023 at 6:22 AM Caroline Cyr La Rose <
caroline.cyr-la-r...@inlibro.com> wrote:

> Hi Eric,
>
> Did you try without the if? The regex replace should only replace the
> example.com links and leave the other ones alone.
>
> I tried in 23.05.02 with
>
> Copy and replace All field(s) 856 u to 856 u RegEx s/^https?:\/\/
> example.com/https://proxy.cca.edu/url?=https://example.com/
>
> the record was
>
> 856 _ _ ‡uhttps://example.com‡yLink to proxy
> 856 _ _ ‡uhttps://www.cca.edu‡yLink to retain
>
> the modified record was
>
> 856 _ _ ‡uhttps://proxy.cca.edu/url?=https://example.com‡yLink to proxy
> 856 _ _ ‡uhttps://www.cca.edu‡yLink to retain
>
> You could write a bug report for the "1st" vs "every" thing. Personally,
> I've never understood the "1st" option. It's probably because as you said
> it's not necessarily the first visually. And I'm not sure if the first
> would always be the one you need to change in all the records, records
> being so different from each other.
>
> Best of luck!
>
> Caroline
> On 2023-08-08 18:39, Eric Phetteplace wrote:
>
> Hi Caroline,
>
> Yes, they do happen to have different domains, one I want to preserve and
> one I want to proxy. Thank you for the suggestion! Using a more qualified
> regex seemed like it should work, but Koha still clobbers the second 856$u
> subfield. Here's a modified example:
>
> Record
> 245 _ _ ‡aExample
> 856 4 0 ‡uhttps://example.com‡yLink to proxy
> 856 4 0 ‡uhttps://www.cca.edu‡yLink to retain
>
> MARC modification
> Copy and replace 1st field(s) 856 u to field 856 u
> Regex ✅ s/^https?://example\.com/
> https://proxy.cca.edu/url?=https://example.com/
> If field 856 u matches m/https://example.com/ Regex ✅
>
> Output record
> 245_aExample
> 856 40 _uhttps://proxy.cca.edu/url?=https://example.com
>_yLink to proxy
> 856 40 _uhttps://proxy.cca.edu/url?=https://example.com
>_yLink to retain
>
> As the "if" condition cannot stop the second field from being modified,
> the regex also cannot. Koha seems to take the first 856, check it against
> the if condition, and then copies the modified $u subfield to all other
> instances of 856$u no matter what is configured in the modification
> template. Again, I tested with both "all" and "1st" 856 fields and the
> result was the same. Saying "1st" 856 still modifies both 856s.
>
> So am I stuck writing a bug report? There's no way to modify only one of a
> set of the same fields even with if conditions? I would expect other
> templates dealing with commonly repeated fields like subject headings to
> run into trouble then. Maybe only the "copy and replace" action has
> problems so fewer templates are affected?
>
> Best,
>
> ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)
>
> ephettepl...@cca.edu
>
>
> *CCA is situated on the traditional unceded lands of the **Chochenyo and
> Ramaytush Ohlone** peoples.*
>
> Black-owned bookstores in Oakland: Ashay by the Bay
> , Marcus Books
> 
>
> :(){ :|: & };:
>
>
> On Mon, Aug 7, 2023 at 6:40 AM Caroline Cyr La Rose <
> caroline.cyr-la-r...@inlibro.com> wrote:
>
>> Hi Eric,
>>
>> This has been my experience as well. I haven't found a way to modify
>> only one field when there are more that one of the same tag in the same
>> record.
>>
>> Are the links you are trying to change all the same domain? Or a couple
>> of different domains? If so, you could match the regex on a longer part
>> of the URL e.g.
>> s/^
>> https://some-online-resource.com/https://proxy.cca.edu/url?=https://some-online-resource.com
>>
>> You can have many options in one modification template, so you can have
>> many "copy and replace" for various resources. Or you can do it by
>> batch. The latter is usually what I've done in the past: make a report
>> to have the URLs matching some-online-resource.com, batch modify those.
>> Then change the modification template, change the report to have the
>> URLs another-online-resource.com and batch modify those records, etc.
>>
>> Good luck!
>>
>> Caroline
>>
>> On 2023-08-04 11:31, Eric Phetteplace wrote:
>> > Hi collective wisdom,
>> >
>> > I'm running into a MARC modification 

Re: [Koha] MARC modification templates problem

2023-08-09 Thread Caroline Cyr La Rose

Hi Eric,

Did you try without the if? The regex replace should only replace the 
example.com links and leave the other ones alone.


I tried in 23.05.02 with

Copy and replace All field(s) 856 u to 856 u RegEx 
s/^https?:\/\/example.com/https://proxy.cca.edu/url?=https://example.com/


the record was

856 _ _ ‡uhttps://example.com‡yLink to proxy
856 _ _ ‡uhttps://www.cca.edu‡yLink to retain

the modified record was

856 _ _ ‡uhttps://proxy.cca.edu/url?=https://example.com‡yLink to proxy
856 _ _ ‡uhttps://www.cca.edu‡yLink to retain

You could write a bug report for the "1st" vs "every" thing. Personally, 
I've never understood the "1st" option. It's probably because as you 
said it's not necessarily the first visually. And I'm not sure if the 
first would always be the one you need to change in all the records, 
records being so different from each other.


Best of luck!

Caroline

On 2023-08-08 18:39, Eric Phetteplace wrote:

Hi Caroline,

Yes, they do happen to have different domains, one I want to preserve 
and one I want to proxy. Thank you for the suggestion! Using a more 
qualified regex seemed like it should work, but Koha still clobbers 
the second 856$u subfield. Here's a modified example:


Record
245 _ _ ‡aExample
856 4 0 ‡uhttps://example.com ‡yLink to proxy
856 4 0 ‡uhttps://www.cca.edu ‡yLink to retain

MARC modification
Copy and replace 1st field(s) 856 u to field 856 u 
Regex ✅ s/^https?://example\.com/https://proxy.cca.edu/url?=https://example.com/

If field 856 u matches m/https://example.com/ Regex ✅

Output record
245    _aExample
856 40 _uhttps://proxy.cca.edu/url?=https://example.com 


       _yLink to proxy
856 40 _uhttps://proxy.cca.edu/url?=https://example.com 


       _yLink to retain

As the "if" condition cannot stop the second field from being 
modified, the regex also cannot. Koha seems to take the first 856, 
check it against the if condition, and then copies the modified $u 
subfield to all other instances of 856$u no matter what is configured 
in the modification template. Again, I tested with both "all" and 
"1st" 856 fields and the result was the same. Saying "1st" 856 still 
modifies both 856s.


So am I stuck writing a bug report? There's no way to modify only one 
of a set of the same fields even with if conditions? I would expect 
other templates dealing with commonly repeated fields like subject 
headings to run into trouble then. Maybe only the "copy and replace" 
action has problems so fewer templates are affected?


Best,

ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)

ephettepl...@cca.edu


/CCA is situated on the traditional unceded lands of the //Chochenyo 
and Ramaytush Ohlone// peoples./


Black-owned bookstores in Oakland: Ashay by the Bay 
, Marcus Books 



:(){ :|: & };:



On Mon, Aug 7, 2023 at 6:40 AM Caroline Cyr La Rose 
 wrote:


Hi Eric,

This has been my experience as well. I haven't found a way to modify
only one field when there are more that one of the same tag in the
same
record.

Are the links you are trying to change all the same domain? Or a
couple
of different domains? If so, you could match the regex on a longer
part
of the URL e.g.

s/^https://some-online-resource.com/https://proxy.cca.edu/url?=https://some-online-resource.com

You can have many options in one modification template, so you can
have
many "copy and replace" for various resources. Or you can do it by
batch. The latter is usually what I've done in the past: make a
report
to have the URLs matching some-online-resource.com
, batch modify those.
Then change the modification template, change the report to have the
URLs another-online-resource.com
 and batch modify those
records, etc.

Good luck!

Caroline

On 2023-08-04 11:31, Eric Phetteplace wrote:
> Hi collective wisdom,
>
> I'm running into a MARC modification template problem and I
can't tell if
> I'm missing something or there's a bug/limitation. I know I could
> accomplish these edits with MARCEdit or a script, but I was
hoping to use
> Koha's tools.
>
> I have a record with two 856 fields with links, I want to apply
our proxy
> server prefix to one link but not the other. That seems to be
impossible;
> Koha clobbers the second link with a copy of the first. Here's a
minimal
> example.
>
> Record
> 245 _ _ ‡aExample
> 856 4 0 ‡uhttps://example.com ‡yLink to proxy
> 856 4 0 ‡uhttps://www.cca.edu ‡yLink to retain
>
> MARC modification
> Copy and replace 1st field(s) 856 u to field 856 u Regex ✅ s/^http/
> 

Re: [Koha] MARC modification templates problem

2023-08-08 Thread Eric Phetteplace
Hi Caroline,

Yes, they do happen to have different domains, one I want to preserve and
one I want to proxy. Thank you for the suggestion! Using a more qualified
regex seemed like it should work, but Koha still clobbers the second 856$u
subfield. Here's a modified example:

Record
245 _ _ ‡aExample
856 4 0 ‡uhttps://example.com‡yLink to proxy
856 4 0 ‡uhttps://www.cca.edu‡yLink to retain

MARC modification
Copy and replace 1st field(s) 856 u to field 856 u
Regex ✅ s/^https?://example\.com/
https://proxy.cca.edu/url?=https://example.com/
If field 856 u matches m/https://example.com/ Regex ✅

Output record
245_aExample
856 40 _uhttps://proxy.cca.edu/url?=https://example.com
   _yLink to proxy
856 40 _uhttps://proxy.cca.edu/url?=https://example.com
   _yLink to retain

As the "if" condition cannot stop the second field from being modified, the
regex also cannot. Koha seems to take the first 856, check it against the
if condition, and then copies the modified $u subfield to all other
instances of 856$u no matter what is configured in the modification
template. Again, I tested with both "all" and "1st" 856 fields and the
result was the same. Saying "1st" 856 still modifies both 856s.

So am I stuck writing a bug report? There's no way to modify only one of a
set of the same fields even with if conditions? I would expect other
templates dealing with commonly repeated fields like subject headings to
run into trouble then. Maybe only the "copy and replace" action has
problems so fewer templates are affected?

Best,

ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)

ephettepl...@cca.edu


*CCA is situated on the traditional unceded lands of the **Chochenyo and
Ramaytush Ohlone** peoples.*

Black-owned bookstores in Oakland: Ashay by the Bay
, Marcus Books


:(){ :|: & };:


On Mon, Aug 7, 2023 at 6:40 AM Caroline Cyr La Rose <
caroline.cyr-la-r...@inlibro.com> wrote:

> Hi Eric,
>
> This has been my experience as well. I haven't found a way to modify
> only one field when there are more that one of the same tag in the same
> record.
>
> Are the links you are trying to change all the same domain? Or a couple
> of different domains? If so, you could match the regex on a longer part
> of the URL e.g.
> s/^
> https://some-online-resource.com/https://proxy.cca.edu/url?=https://some-online-resource.com
>
> You can have many options in one modification template, so you can have
> many "copy and replace" for various resources. Or you can do it by
> batch. The latter is usually what I've done in the past: make a report
> to have the URLs matching some-online-resource.com, batch modify those.
> Then change the modification template, change the report to have the
> URLs another-online-resource.com and batch modify those records, etc.
>
> Good luck!
>
> Caroline
>
> On 2023-08-04 11:31, Eric Phetteplace wrote:
> > Hi collective wisdom,
> >
> > I'm running into a MARC modification template problem and I can't tell if
> > I'm missing something or there's a bug/limitation. I know I could
> > accomplish these edits with MARCEdit or a script, but I was hoping to use
> > Koha's tools.
> >
> > I have a record with two 856 fields with links, I want to apply our proxy
> > server prefix to one link but not the other. That seems to be impossible;
> > Koha clobbers the second link with a copy of the first. Here's a minimal
> > example.
> >
> > Record
> > 245 _ _ ‡aExample
> > 856 4 0 ‡uhttps://example.com‡yLink to proxy
> > 856 4 0 ‡uhttps://www.cca.edu‡yLink to retain
> >
> > MARC modification
> > Copy and replace 1st field(s) 856 u to field 856 u Regex ✅ s/^http/
> > https://proxy.cca.edu/url?=http/
> > If field 856 u matches m/https://example.com/  Regex ✅
> >
> > Output record
> > 245_aExample
> > 856 40 _uhttps://proxy.cca.edu/url?=https://example.com
> > _yLink to proxy
> > 856 40 _uhttps://proxy.cca.edu/url?=https://example.com
> > _yLink to retain
> >
> > This happens whether I set the modification template to use the "1st" or
> > "every"  856 field. I don't understand why the second 856 is touched at
> > all, since it does not meet the "if" condition, much less why instead of
> > receiving its own link proxied it gets the first 856 URL proxied.
> >
> > Based on a few tests, it also seems like the "1st" field with respect to
> > modification actions is not always the one that's visually first when I
> > edit a record. I tried a set of three actions which 1) copied the first
> > field to another, unused field, 2) modified it there, and then 3) copied
> it
> > back, but Koha copied the second field instead.
> >
> > Best,
> >
> > ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)
> >
> > ephettepl...@cca.edu
> >
> >
> > *CCA is situated on the traditional unceded lands of the **Chochenyo and
> > Ramaytush Ohlone** peoples.*
> >
> > Black-owned bookstores in Oakland: Ashay by the Bay
> > , Marcus 

Re: [Koha] MARC modification templates problem

2023-08-07 Thread Caroline Cyr La Rose

Hi Eric,

This has been my experience as well. I haven't found a way to modify 
only one field when there are more that one of the same tag in the same 
record.


Are the links you are trying to change all the same domain? Or a couple 
of different domains? If so, you could match the regex on a longer part 
of the URL e.g. 
s/^https://some-online-resource.com/https://proxy.cca.edu/url?=https://some-online-resource.com


You can have many options in one modification template, so you can have 
many "copy and replace" for various resources. Or you can do it by 
batch. The latter is usually what I've done in the past: make a report 
to have the URLs matching some-online-resource.com, batch modify those. 
Then change the modification template, change the report to have the 
URLs another-online-resource.com and batch modify those records, etc.


Good luck!

Caroline

On 2023-08-04 11:31, Eric Phetteplace wrote:

Hi collective wisdom,

I'm running into a MARC modification template problem and I can't tell if
I'm missing something or there's a bug/limitation. I know I could
accomplish these edits with MARCEdit or a script, but I was hoping to use
Koha's tools.

I have a record with two 856 fields with links, I want to apply our proxy
server prefix to one link but not the other. That seems to be impossible;
Koha clobbers the second link with a copy of the first. Here's a minimal
example.

Record
245 _ _ ‡aExample
856 4 0 ‡uhttps://example.com‡yLink to proxy
856 4 0 ‡uhttps://www.cca.edu‡yLink to retain

MARC modification
Copy and replace 1st field(s) 856 u to field 856 u Regex ✅ s/^http/
https://proxy.cca.edu/url?=http/
If field 856 u matches m/https://example.com/  Regex ✅

Output record
245_aExample
856 40 _uhttps://proxy.cca.edu/url?=https://example.com
_yLink to proxy
856 40 _uhttps://proxy.cca.edu/url?=https://example.com
_yLink to retain

This happens whether I set the modification template to use the "1st" or
"every"  856 field. I don't understand why the second 856 is touched at
all, since it does not meet the "if" condition, much less why instead of
receiving its own link proxied it gets the first 856 URL proxied.

Based on a few tests, it also seems like the "1st" field with respect to
modification actions is not always the one that's visually first when I
edit a record. I tried a set of three actions which 1) copied the first
field to another, unused field, 2) modified it there, and then 3) copied it
back, but Koha copied the second field instead.

Best,

ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)

ephettepl...@cca.edu


*CCA is situated on the traditional unceded lands of the **Chochenyo and
Ramaytush Ohlone** peoples.*

Black-owned bookstores in Oakland: Ashay by the Bay
, Marcus Books


:(){ :|: & };:
___

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

--
Logo inLibro Caroline Cyr-La-Rose
Bibliothécaire | Responsable de produit

T 833-INLIBRO (465-4276) , poste 221
C caroline.cyr-la-r...@inlibro.com

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] MARC modification templates problem

2023-08-04 Thread Eric Phetteplace
Hi collective wisdom,

I'm running into a MARC modification template problem and I can't tell if
I'm missing something or there's a bug/limitation. I know I could
accomplish these edits with MARCEdit or a script, but I was hoping to use
Koha's tools.

I have a record with two 856 fields with links, I want to apply our proxy
server prefix to one link but not the other. That seems to be impossible;
Koha clobbers the second link with a copy of the first. Here's a minimal
example.

Record
245 _ _ ‡aExample
856 4 0 ‡uhttps://example.com‡yLink to proxy
856 4 0 ‡uhttps://www.cca.edu‡yLink to retain

MARC modification
Copy and replace 1st field(s) 856 u to field 856 u Regex ✅ s/^http/
https://proxy.cca.edu/url?=http/
If field 856 u matches m/https://example.com/ Regex ✅

Output record
245_aExample
856 40 _uhttps://proxy.cca.edu/url?=https://example.com
   _yLink to proxy
856 40 _uhttps://proxy.cca.edu/url?=https://example.com
   _yLink to retain

This happens whether I set the modification template to use the "1st" or
"every"  856 field. I don't understand why the second 856 is touched at
all, since it does not meet the "if" condition, much less why instead of
receiving its own link proxied it gets the first 856 URL proxied.

Based on a few tests, it also seems like the "1st" field with respect to
modification actions is not always the one that's visually first when I
edit a record. I tried a set of three actions which 1) copied the first
field to another, unused field, 2) modified it there, and then 3) copied it
back, but Koha copied the second field instead.

Best,

ERIC PHETTEPLACE Systems Librarian, Libraries (he/him)

ephettepl...@cca.edu


*CCA is situated on the traditional unceded lands of the **Chochenyo and
Ramaytush Ohlone** peoples.*

Black-owned bookstores in Oakland: Ashay by the Bay
, Marcus Books


:(){ :|: & };:
___

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


Re: [Koha] MARC modification templates w/ indicators?

2021-10-23 Thread Katrin Fischer

Hi Tasha,

I believe at the moment it's not possible to use indicators in the MARC
modification tool:

*Bug 21860*
 - Marc
modification templates cannot check or change indicators

Katrin

On 23.10.21 01:41, Bales (US), Tasha R wrote:

Do MARC modification templates support changes based on, or to, MARC indicators?

For instance, I'd like to change all instances of 856 _8 to 956 _ _.  However, 
I don't see a clear way to specify or insert indicators w/ or w/o RegEx.  Are 
the indicators considered part of the field data?

I could do this with MarcEdit, but I'd rather just do it here.  Is MarcEdit the 
only option?

Thanks!!


Tasha Bales
Enterprise Services
http://isesi.web.boeing.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] MARC modification templates w/ indicators?

2021-10-22 Thread Bales (US), Tasha R
Do MARC modification templates support changes based on, or to, MARC indicators?

For instance, I'd like to change all instances of 856 _8 to 956 _ _.  However, 
I don't see a clear way to specify or insert indicators w/ or w/o RegEx.  Are 
the indicators considered part of the field data?

I could do this with MarcEdit, but I'd rather just do it here.  Is MarcEdit the 
only option?

Thanks!!


Tasha Bales
Enterprise Services
http://isesi.web.boeing.com/

___

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


Re: [Koha] MARC modification templates question

2020-06-24 Thread Carlos Lopez
Hi all

Never mind - it looks as though there is no need to escape : nor / when 
modifying strings with MARC modification templates.

With kind regards from the Dalton McCaughey Library Team

Carlos Lopez

Dalton McCaughey Library | 29 College Crescent, Parkville, VICTORIA 3052
Ph: 03 9340  ext.1 | libr...@dml.vic.edu.au | library.dmlibrary.org.au 

-Original Message-
From: Koha  On Behalf Of Carlos Lopez
Sent: Wednesday, 24 June 2020 10:21 AM
To: koha 
Subject: [Koha] MARC modification templates question

Hi all

We're about to batch change several thousand records because we're modifying 
the URL used to access our proxy server. To do this should we do the following?

Add a new MARC modification template
Add a new action to it: Copy and Replace > Every > 856 > u > to field > 856 > u 
> regex > s/[portion of URL to be changed]/[replacement string for new URL]/g > 
if > field > 856 > u > matches > m/[portion of URL to be changed]/ >regex

Does that look right?

Also, with escaping the strings to find/replace, would the regex look like this 
(assuming that we're looking for 'http://proxy.dml.vic.edu.au:2048/' and 
replacing it with 'https://proxy.dml.vic.edu.au/')?

s/http\:\/\/proxy.dml.vic.edu.au\:2048\//https\:\/\/proxy.dml.vic.edu.au\//g

With kind regards from the Dalton McCaughey Library Team

Carlos Lopez

Dalton McCaughey Library | 29 College Crescent, Parkville, VICTORIA 3052
Ph: 03 9340  ext.1 | libr...@dml.vic.edu.au<mailto:libr...@dml.vic.edu.au> 
| library.dmlibrary.org.au

___

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] MARC modification templates question

2020-06-23 Thread Carlos Lopez
Hi all

We're about to batch change several thousand records because we're modifying 
the URL used to access our proxy server. To do this should we do the following?

Add a new MARC modification template
Add a new action to it: Copy and Replace > Every > 856 > u > to field > 856 > u 
> regex > s/[portion of URL to be changed]/[replacement string for new URL]/g > 
if > field > 856 > u > matches > m/[portion of URL to be changed]/ >regex

Does that look right?

Also, with escaping the strings to find/replace, would the regex look like this 
(assuming that we're looking for 'http://proxy.dml.vic.edu.au:2048/' and 
replacing it with 'https://proxy.dml.vic.edu.au/')?

s/http\:\/\/proxy.dml.vic.edu.au\:2048\//https\:\/\/proxy.dml.vic.edu.au\//g

With kind regards from the Dalton McCaughey Library Team

Carlos Lopez

Dalton McCaughey Library | 29 College Crescent, Parkville, VICTORIA 3052
Ph: 03 9340  ext.1 | libr...@dml.vic.edu.au 
| library.dmlibrary.org.au

___

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


Re: [Koha] MARC Modification Templates & indicators

2016-08-30 Thread Jonathan Druart
Hi Eric,

I confirm that MARC modification templates do not deal with indicators so far.

Regards,
Jonathan

2016-08-30 1:19 GMT+01:00 Eric Phetteplace :
> Hi collective wisdom,
>
> We're trying to fix up an issue with our records by copying information
> from the 810 MARC field (series added entry) to 490 (series statement)
> using MARC Modification Templates. Our template currently is just one
> action that looks like this:
>
> Copy All field(s) 810 __ to field 490 __
>
> with no "if" condition or regex specified. The blank underlines represent
> the fact that we're copying all the subfields from one tag to the other
> without modification. But the problem is our cataloger wants to follow
> standards and make the 490 indicators "1_", that is: first indicator 1 for
> "series traced", second blank. Our 800 tags have first indicator set to "2"
> and there doesn't appear to be any way to change them via the templates.
>
> Am I missing something or do the MARC modification templates simply not
> interact with indicators? I know I can export the records and edit them
> with an external tool like MARCedit or a pymarc script but I wanted to try
> accomplishing this purely in Koha.
>
> Best,
> Eric Phetteplace
> Systems Librarian
> California College of the Arts
> libraries.cca.edu | vault.cca.edu
> 510.594.3660
> 2>/dev/null
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] MARC Modification Templates & indicators

2016-08-29 Thread Eric Phetteplace
Hi collective wisdom,

We're trying to fix up an issue with our records by copying information
from the 810 MARC field (series added entry) to 490 (series statement)
using MARC Modification Templates. Our template currently is just one
action that looks like this:

Copy All field(s) 810 __ to field 490 __

with no "if" condition or regex specified. The blank underlines represent
the fact that we're copying all the subfields from one tag to the other
without modification. But the problem is our cataloger wants to follow
standards and make the 490 indicators "1_", that is: first indicator 1 for
"series traced", second blank. Our 800 tags have first indicator set to "2"
and there doesn't appear to be any way to change them via the templates.

Am I missing something or do the MARC modification templates simply not
interact with indicators? I know I can export the records and edit them
with an external tool like MARCedit or a pymarc script but I wanted to try
accomplishing this purely in Koha.

Best,
Eric Phetteplace
Systems Librarian
California College of the Arts
libraries.cca.edu | vault.cca.edu
510.594.3660
2>/dev/null
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] MARC modification templates

2015-05-13 Thread Katelyn Browne
Hi all,

I've just about got our MARC modification template set up, but I have one
major issue I can't solve: moving and modifying item prices.

Here's what I do with MARCedit:
--move all of 852 (where our vendor puts items) to 952
--(do other stuff on other subfields)
--move 952$9 to 952$g
--remove P and usd from the price (which come as, for example,
*P10.99usd* instead of *10.99*)
--copy 952$g into 952$v

I've attempted to reproduce these steps in our modification template, but
952$g and 952$v come up blank when I import the records. I suspect the
problem is with the P/usd issue and requires some regular expressions
(which are not my expertise).

If you are good at RegEx, or you have addressed a similar problem, can you
make some suggestions?

Thanks!

--Katelyn.


Katelyn Browne
High School Librarian  Technology Teacher
Capital City Public Charter School
100 Peabody Street NW
Washington, DC 20011
(202) 387-0309 x1745
kbro...@ccpcs.org
http://www.ccpcs.org/library/
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Marc Modification Templates

2014-07-09 Thread Jonathan Druart
Hi Nicole,

I am not sure if that works in 3.16, but you can try the following rule:
Copyfield 856$u with 856$u using the regexp s/^/PROXY_URL/

I am sure this works with the improvements I developed on bugs 11319
and 11413 (not in master yet).

Regards,
Jonathan

2014-07-09 4:27 GMT+02:00 Nicole Engard neng...@gmail.com:
 Hi all,

 I'm looking for a way to add a proxy URL to the front of an existing 856$u
 using the MARC modification templates. I'm sure it's Regex, I'm just not so
 good at Regex so if you can provide and example I'd appreciate it and I'll
 even include it in the manual for all.

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


[Koha] Marc Modification Templates

2014-07-08 Thread Nicole Engard
Hi all,

I'm looking for a way to add a proxy URL to the front of an existing 856$u
using the MARC modification templates. I'm sure it's Regex, I'm just not so
good at Regex so if you can provide and example I'd appreciate it and I'll
even include it in the manual for all.

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