Re: [CODE4LIB] MarcEdit Tasks power?

2014-06-26 Thread Robert Haschart

Jonathan,

Using the as-yet-to-be-documented record editing capabilities of 
SolrMarc I think you can you what you want.


create a file namededitor338.properties  in the same directory and 
SolrMarc.jar  that contains:

338=true
338_0=and(subfieldmatches(a, online 
resource),not(subfieldmatches(b,cr)))=both(deletefield(),insertfield(338   
$aonline resource$bcr))


and run SolrMarc as a filter:

cat   my_records.mrc  |
java -Dsolrmarc.main.class=org.solrmarc.marc.MarcPrinter 
-Dmarc.reader.remap=editor338.properties  -jar SolrMarc.jar  translate  
my_edited_records.mrc



or you can even just add:

marc.reader.remap=editor338.properties

to your config.properties file, and the editing will be done as the 
records are read in for indexing.


-Bob


On 6/24/2014 12:39 PM, Jonathan Rochkind wrote:

Hi code4libbers,

I don't have much experience with MarcEdit, I'm hoping someone else 
does, especially with creating automated MarcEdit tasks, and can 
advise:


Would it be possible to create a MarcEdit task that:

= IF there is 338 field with subfield $a online resource, THEN 
erase all existing subfield $b's in that field, and add a single 
subfield $b cr.



We have records loaded from certain sources that have inconsistent 
338$a and $b, where the $a is the reliable one. I'm curious if I can 
send records from these sources through a MarcEdit Task to correct 
this known pattern of error.


Anyone know if this is possible in a MarcEdit task? And if you could 
supply some hints to a complete newbie to MarcEdit on how to do it, 
that would be quite kind of you!


Jonathan


[CODE4LIB] MarcEdit Tasks power?

2014-06-24 Thread Jonathan Rochkind

Hi code4libbers,

I don't have much experience with MarcEdit, I'm hoping someone else 
does, especially with creating automated MarcEdit tasks, and can advise:


Would it be possible to create a MarcEdit task that:

= IF there is 338 field with subfield $a online resource, THEN erase 
all existing subfield $b's in that field, and add a single subfield $b 
cr.



We have records loaded from certain sources that have inconsistent 338$a 
and $b, where the $a is the reliable one. I'm curious if I can send 
records from these sources through a MarcEdit Task to correct this known 
pattern of error.


Anyone know if this is possible in a MarcEdit task? And if you could 
supply some hints to a complete newbie to MarcEdit on how to do it, that 
would be quite kind of you!


Jonathan


Re: [CODE4LIB] MarcEdit Tasks power?

2014-06-24 Thread Terry Reese
Jonathan,

You can use the edit field function, using:
Field: 338
Field data: (\$aonline resource.*)(\$b.*)
Replace: $1$$bcr

Check use regular expressions.

This should be available as a single operation or to be stored as a
task.

Tr

Sent from my Windows Phone From: Jonathan Rochkind
Sent: ‎6/‎24/‎2014 12:39 PM
To: CODE4LIB@listserv.nd.edu
Subject: [CODE4LIB] MarcEdit Tasks power?
Hi code4libbers,

I don't have much experience with MarcEdit, I'm hoping someone else
does, especially with creating automated MarcEdit tasks, and can advise:

Would it be possible to create a MarcEdit task that:

= IF there is 338 field with subfield $a online resource, THEN erase
all existing subfield $b's in that field, and add a single subfield $b
cr.


We have records loaded from certain sources that have inconsistent 338$a
and $b, where the $a is the reliable one. I'm curious if I can send
records from these sources through a MarcEdit Task to correct this known
pattern of error.

Anyone know if this is possible in a MarcEdit task? And if you could
supply some hints to a complete newbie to MarcEdit on how to do it, that
would be quite kind of you!

Jonathan


Re: [CODE4LIB] MarcEdit Tasks power?

2014-06-24 Thread Terry Reese
Or I should say, that is my first inclination. Though I can't test it
because im out in the woods (as it were) in Ohio.

Ttr

Sent from my Windows Phone From: Jonathan Rochkind
Sent: ‎6/‎24/‎2014 12:39 PM
To: CODE4LIB@listserv.nd.edu
Subject: [CODE4LIB] MarcEdit Tasks power?
Hi code4libbers,

I don't have much experience with MarcEdit, I'm hoping someone else
does, especially with creating automated MarcEdit tasks, and can advise:

Would it be possible to create a MarcEdit task that:

= IF there is 338 field with subfield $a online resource, THEN erase
all existing subfield $b's in that field, and add a single subfield $b
cr.


We have records loaded from certain sources that have inconsistent 338$a
and $b, where the $a is the reliable one. I'm curious if I can send
records from these sources through a MarcEdit Task to correct this known
pattern of error.

Anyone know if this is possible in a MarcEdit task? And if you could
supply some hints to a complete newbie to MarcEdit on how to do it, that
would be quite kind of you!

Jonathan