Library - unsorted

From Helpful
Revision as of 18:33, 10 April 2022 by Helpful (talk | contribs) (Created page with "{{Library related}} {{stub}} =Semi-sorted= ==On what various common identifiers really are, and what that means to mapping between them== {{stub}} <!-- '''Mapping betwee...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


Semi-sorted

On what various common identifiers really are, and what that means to mapping between them

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.




MARC field 035 (Local System Number) will often store a (bracketed) string identifier to disambiguate the type of identifier stored there, including:

You might for example see 035 $a(OCoLC)ocm69983298


When OCLC numbers are used in the MARC field 001(verify), they are prefixed using:

  • ocm for eight-digit numbers (≤99999999)
  • ocn for nine-digit numbers (≥100000000)


PyZ3950

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Installation

You need the python PLY package or you will get ImportError: No module named lex. Also as of this writing, ubuntu's python-ply package seems to be broken, but since the modules are pure python, manually unpacking lex.py and yacc.py from the download (into the z3950 directory in your site-packages, for example) also works.

The 2.04 tarball has a bug in the install scripts that causes it to raise:

AttributeError: 'float' object has no attribute 'replace'

This seems to mean the version in vers.py should be a string, not a float.


Docs & notes


How to deal with slow/timeouting connects?


Documentation example: from PyZ3950 import zoom conn = zoom.Connection('z3950.loc.gov', 7090) conn.databaseName = 'VOYAGER' conn.preferredRecordSyntax = 'USMARC'

  1. for exxample with CCL (there are other options)

query = zoom.Query('CCL', 'ti="this and that"') results = conn.search(query)

for result in results:

   print result

conn.close()