[Koha-devel] MARC Framework Editor

paul POULAIN paul.poulain at biblibre.com
Tue Jan 13 14:54:10 CET 2009


Rachel Hamilton-Williams a écrit :
> Hi,
>   
Hi Rach,
> Paul were you having another crack at the MARC Framework editor as well 
> at the moment? or someone else?
>   
not me (and in fact, if you look at gitstats, you'll see I don't commit 
a lot those months...)

> Having just spent an hour or 2 working with it and giving up because 
> it's just tooo much clicking to delete all the fields you don't need, 
> we'll resort to a "programmer" method.
>
> However, it would be useful to be able to do 2 things
>
> 1/. Create a new framework based on either a "blank" or preferably, with 
> only the fields that are mandatory for Koha to work, so that you just 
> add in any fields you want, (usually about 20) rather than deleting all 
> the ones you don't (about 900!)
>   
A suggestion here : DELETE FROM marc_subfield_structure WHERE tab=-1 AND 
kohafield='' AND frameworkcode='WHATEVER_YOU_WANT'
should delete all unused subfields in a given framework.
then DELETE FROM marc_tag_structure WHERE (SELECT count(*) FROM 
marc_subfield_structure WHERE 
marc_subfield_structure.tag=marc_tag_structure.field)=0
UPDATE marc_subfield_structure SET tab=-1 WHERE frameworkcode='WHATEVER'
will "hide" every fields, you can then have the few you need reappear, 
and do the previous DELETE to clean things.

Note : previous SQL untested, it's basically the idea.

Once this is done, you can export marc_subfield_structure and 
marc_tag_structure, and get a SQL file quite interesting to have a 
simple cataloguing framework.
In UNIMARC, when you install Koha, you have the choice between 2 UNIMARC 
flavours : "complete MARC frameworks" or "public library MARC framework" 
(with much less fields !)

We did them with the previous commands.

It was boring to do the 1st time, but now, it's done !!!

-- 
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
Tel : (33) 4 91 81 35 08




More information about the Koha-devel mailing list