Tweaking import filter

Users asking other users for import filters.
Post Reply
NilsMS
Posts: 60
Joined: Mon Sep 16, 2013 10:13 am

Tweaking import filter

Post by NilsMS »

I have a custom MARC import filter and would like to import the following line correctly:

Code: Select all

995    $a ANA $b 001567007 $l DAI01 $n Archaeologia Austriaca, 102 (2018)
"Archaeologia Austriaca" is the name of the journal, and "102" the volume. The rest of the line is to be ignored.

This is my setup in the Source-tab:

Source 1 tag: 995
to n -> Ignore
to , -> Journal
to ( -> Vol (Issue)
to end -> Ignore

However, I end up with "Archaeologia Austriaca, 102 (2018)" in the Journal field. Any ideas what goes wrong?
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Tweaking import filter

Post by Jon »

There is an "n" in ANA, so the first line stops there.

I haven't tried it, but you might have to search for "$" 4 times, then "n", then parse.

Jon
Sonny Software
NilsMS
Posts: 60
Joined: Mon Sep 16, 2013 10:13 am

Re: Tweaking import filter

Post by NilsMS »

Thank you for your suggestion!

As it turned out, I had overlooked/forgotten a "995n"-tag in the General panel, which, according to the guidebook, overrides the Source-tab, and this was responsible for the entry "Archaeologia Austriaca, 102 (2018)" in the Journal field. Without this tag in the General panel, the Journal field remains empty, regardless of what I try.
Even the most simple solution

Source 1 tag: "995"
to end -> Journal

does not work.

@Jon: Any more ideas?
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Tweaking import filter

Post by Jon »

It's possible that the source parser doesn't work with MARC records (which are treated differently from any other source). This code was written many years ago -- I tried it, and like you the tag wasn't imported.

Jon
Sonny Software
NilsMS
Posts: 60
Joined: Mon Sep 16, 2013 10:13 am

Re: Tweaking import filter

Post by NilsMS »

Thank your for the frank answer!

Related to this format: Is there a way to get rid of ending full stops (".")? At the moment, each line ends with one, and this is imported into BE. I know that I could remove all incidences with the command "Remove these characters from all fields" but this would also delete full stops I do not want to remove.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Tweaking import filter

Post by Jon »

There is a global change -> find/replace, but that also wouldn't distinguish between periods in the title or at the end. It might be possible to do a Regex search for references whose titles have only one period, which occurs at t the end, and then do the global change on those. I'm not enough of an expert about Regex to design that search, but maybe you are (or someone else reading this can).

Jon
Sonny Software
Post Reply