Hi all, We are doing some tests to see if Koha is the right choice for our small social justice library. Does any of you know if there is a quick way to set all the MARC fields/subfields to "ignore" in the MARC structure for a given framework? I would like to do that and then map only the fields that we are going to use. Thanks! Gianmarco S. SFPIRG Social Justice Library
It depends on what you mean. If you want everything to be hidden in the editor, run some sql to set all the subfields' hidden field (in the table marc_subfields_structure) to -6, then set it back to 0 for everything you want to be visible. -- Jesse
Jesse <pianohacker@...> writes:
It depends on what you mean. If you want everything to be hidden in the
editor, run some sql to set all the subfields' hidden field (in the table marc_subfields_structure) to -6, then set it back to 0 for everything you want to be visible.-- Jesse
_______________________________________________ Koha mailing list Koha@... http://lists.katipo.co.nz/mailman/listinfo/koha
Thanks Jesse, I actually planned to move all of them to the "ignore" tab, as opposed to just hiding them, but in principle it is the same. Unfortunately, I have no idea of how to write such a script, I guess I'll have to learn some SQL. By the way, isn't marc_subfield_structure a perl script? If I could find the table where all this info is stored I would be halfway done, but so far I haven't managed to understand the mechanics of Koha. One last think: Has anyone written such a script yet? It looks like a pretty common task to me. Thanks for the quick answer! -Gianmarco-
No, marc_subfields_structure is a table in your koha database. You want to edit the data there, not the logic of how it processed (in perl). To access your database from the command-line mysql client, you would do something like this: mysql -uUSER -pPASS DB_NAME Get the right USER, PASS and DB_NAME from your KOHA_CONF file. This accesses your database and gives you the mysql command-line, where you do something like: mysql> describe marc_subfield_structure; +------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------+-------+ | tagfield | varchar(3) | NO | PRI | | | | tagsubfield | varchar(1) | NO | PRI | | | | liblibrarian | varchar(255) | NO | | | | | libopac | varchar(255) | NO | | | | | repeatable | tinyint(4) | NO | | 0 | | | mandatory | tinyint(4) | NO | | 0 | | | kohafield | varchar(40) | YES | MUL | NULL | | | tab | tinyint(1) | YES | | NULL | | | authorised_value | varchar(10) | YES | | NULL | | | authtypecode | varchar(10) | YES | | NULL | | | value_builder | varchar(80) | YES | | NULL | | | isurl | tinyint(1) | YES | | NULL | | | hidden | tinyint(1) | YES | | NULL | | | frameworkcode | varchar(4) | NO | PRI | | | | seealso | varchar(255) | YES | | NULL | | | link | varchar(80) | YES | | NULL | | | defaultvalue | text | YES | | NULL | | +------------------+--------------+------+-----+---------+-------+ 17 rows in set (0.00 sec) You might want a command like: UPDATE marc_subfield_structure SET hidden=-6 WHERE tagfield="XYZ" and tagsubfield="ABC" --joe atzberger On Tue, Mar 18, 2008 at 8:02 PM, Gianmarco Spiga <gsa25@sfu.ca> wrote:
Jesse <pianohacker@...> writes:
It depends on what you mean. If you want everything to be hidden in the
editor, run some sql to set all the subfields' hidden field (in the table marc_subfields_structure) to -6, then set it back to 0 for everything you want to be visible.-- Jesse
Thanks Jesse, I actually planned to move all of them to the "ignore" tab, as opposed to just hiding them, but in principle it is the same. Unfortunately, I have no idea of how to write such a script, I guess I'll have to learn some SQL. By the way, isn't marc_subfield_structure a perl script? If I could find the table where all this info is stored I would be halfway done, but so far I haven't managed to understand the mechanics of Koha.
One last think: Has anyone written such a script yet? It looks like a pretty common task to me.
Thanks for the quick answer!
-Gianmarco-
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
participants (3)
-
Gianmarco Spiga -
Jesse -
Joe Atzberger