Metadata-Version: 2.3
Name: goldrush
Version: 0.0.2
Summary: Generate Gold Rush key for pymarc records
Author: Jane Sandberg, Ed Summers
Author-email: Jane Sandberg <js7389@princeton.edu>, Ed Summers <ehs@pobox.com>
License: Redistribution and use in source and binary forms, with or without
         modification, are permitted provided that the following conditions are met:
         
         1. Redistributions of source code must retain the above copyright notice, this
         list of conditions and the following disclaimer.
         
         2. Redistributions in binary form must reproduce the above copyright notice,
         this list of conditions and the following disclaimer in the documentation
         and/or other materials provided with the distribution.
         
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
         ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
         WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
         FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
         DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
         SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
         OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
         OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
         
         Copyright for this project is held by its many contributors, including:
         
         Max Kadel <mkadel@gmail.com>
         Jane Sandberg <js7389@princeton.edu>
         Ed Summers <ehs@pobox.com>
Requires-Dist: pymarc>=5.3.1
Requires-Dist: unidecode>=1.4.0
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# goldrush

**Note: This is alpha software. If you rely on this library you should do so with the
understanding that you might find errors in the Gold Rush key that is generated.
Lets make it better together!**

---

[![Build status](https://gitlab.com/pymarc/goldrush/badges/main/pipeline.svg)](https://gitlab.com/pymarc/goldrush/-/commits/main)

*goldrush* is a Python implementation of the [Gold Rush match key algorithm]
for identifying "duplicate" MARC records, or records that appear to be about
the same book. It provides a function that you pass a pymarc Record and get
back the Gold Rush key as a string.

goldrush was largely adapted from [pymarc_dedupe], which included other
functionality unrelated to Gold Rush, and was not available on PyPI as a
dependency.

## Usage

First install:

```
pip install goldrush
```

Then load a pymarc record and generate a key:

```python
>>> from goldrush import goldrush
>>> from pymarc import MARCReader
>>> record = next(MARCReader(open('marc.dat', 'rb')))
>>> goldrush(record)
'pragmaticprogrammerfromjourneymantomaster_____________________________2000321____addisa_______________________________________________________hunt________________p'
```

[Gold Rush match key algorithm]: https://coalliance.org/sites/default/files/GoldRush-Match_KeyJanuary2024_0.doc
[pymarc_dedupe]: https://github.com/pulibrary/pymarc_dedupe
