{"id":22621423,"url":"https://github.com/cca/koha_qa","last_synced_at":"2025-03-29T02:24:23.528Z","repository":{"id":210279089,"uuid":"725360986","full_name":"cca/koha_qa","owner":"cca","description":"MARC record utilities for Koha \u0026 Summon","archived":false,"fork":false,"pushed_at":"2024-09-10T17:11:58.000Z","size":137,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-09-10T19:04:43.397Z","etag":null,"topics":["koha","marc","summon"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cca.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T01:23:07.000Z","updated_at":"2024-09-10T17:12:01.000Z","dependencies_parsed_at":"2023-12-13T22:26:40.064Z","dependency_job_id":"eca3b084-ab45-498e-9a71-83558cb5f4a8","html_url":"https://github.com/cca/koha_qa","commit_stats":null,"previous_names":["cca/summon-record-check","cca/koha_qa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fkoha_qa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fkoha_qa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fkoha_qa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fkoha_qa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cca","download_url":"https://codeload.github.com/cca/koha_qa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246127720,"owners_count":20727776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["koha","marc","summon"],"created_at":"2024-12-08T23:08:47.276Z","updated_at":"2025-03-29T02:24:23.505Z","avatar_url":"https://github.com/cca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koha Records QA\n\nVarious bibliographic metadata tools.\n\n## Setup\n\nTo use summon.py, obtain a Summon API key from the Ex Libris Developer Network, see [their documentation](https://knowledge.exlibrisgroup.com/Summon/Product_Documentation/Configuring_The_Summon_Service/Configurations_Outside_of_the_Summon_Administration_Console/Summon%3A_Using_the_Summon_API). To use summon-update.py, add our Summon SFTP credentials to the .env file.\n\nThis project is an experiment in using [uv](https://github.com/astral-sh/uv) for python package management. Prefix python commands with `uv run` to use the project's virtual environment.\n\n```sh\nuv sync\ncp example.env .env\nvim .env # edit in secret values\n```\n\nTo see outdated dependencies, run `uv tree --outdated`. To upgrade a direct dependency, run `uv add package==x.y.z` where \"package\" is the dep and \"x.y.z\" is the target version. To upgrade transitive dependencies, delete and recreate the lockfile: `rm uv.lock \u0026\u0026 uv lock`.\n\n## break.py\n\nSplit MARC files into smaller subsets named like `records-1.mrc`, `records-2.mrc`, etc. This is the same as MARCEdit's MARCSplit feature if you would prefer not to use the command line. Koha can only process so many records at once without failing so we tend to batch record imports at 500 or 1000 records at a time.\n\n```sh\nUsage: break.py [OPTIONS] N file.mrc\n\n  break MARC file into smaller ones of N or less records\n\nOptions:\n  -h, --help  Show this message and exit.\n```\n\n## comicsplus.py\n\nAdd our proxy server prefix to Comics Plus MARC records and warn if there are any corrected or deleted records. See [our wiki page](https://sites.google.com/cca.edu/librarieswiki/home/cataloging/ebook-import/comicsplus) on Comics Plus for more information and why we cannot accomplish this with Koha's MARC modification templates.\n\n```sh\nusage: comicsplus.py [-h] \u003cfile.mrc\u003e [\u003coutput.mrc\u003e]\n\nProcess Comics Plus MARC records\n\npositional arguments:\n  \u003cfile.mrc\u003e    MARC file to process\n  \u003coutput.mrc\u003e  Output filename, defaults to YYYY-MM-DD-comicsplus.mrc\n\noptions:\n  -h, --help    show this help message and exit\n```\n\n## linkcheck.py\n\nCheck URLs in Koha 856$u fields. See [the readme](./linkcheck/readme.md) for details.\n\n## summon.py\n\nCheck if MARC record(s) are in CCA's Summon index.\n\n```sh\n# search for single title with detailed search results output\n\u003e pipenv run python summon.py --debug \"the color purple\"\nhttps://cca.summon.serialssolutions.com/search?s.q=%22the+color+purple%22\u0026s.fvf=SourceType%2CLibrary+Catalog%2Cf\nSearch Results: 10\nTitle: The color purple\nAuthors: Walker, Alice\nPublication Date: 1983.\nISBNs: 0671668781, 9780671668785, 0156031825, 9780156031820, 0671617028, 9780671617028, 9780151191543, 0151191549\nType: Book\nSummon Link: https://cca.summon.serialssolutions.com/search?bookMark=...\n# more search results printed...\n\n# iterate over MARC records with summary output and CSV of missing records\n\u003e pipenv run python summon.py --missing missing.csv file.mrc\n\nTotal Records:      50\nHad Search Results: 50\nHad ISBN:           46\nISBN Matches:       45\n```\n\nA record is considered \"missing\" if there is no ISBN match in Summon, records without ISBNs are not considered missing. The Summon search is a title search, so records with short, generic titles like \"Art Now\" can be considered \"missing\" because the record with the matching ISBN isn't in the first page of 10 search results returned.\n\n## summon-update.py\n\nUpdate our Summon index with a file of MARC records. Can delete or update records. A \"full\" update requires contacting support but this script can upload the file. Export records from Koha staff side \u003e Cataloging \u003e [Export data](https://library-staff.cca.edu/cgi-bin/koha/tools/export.pl).\n\n```sh\nUsage: summon-update.py [OPTIONS] FILE_PATH\n\n  Puts a file to the Summon SFTP server.\n\nOptions:\n  -h, --help                      Show this message and exit.\n  -t, --type [updates|deletes|full]\n                                  type of update\n  -d, --debug                     enable SFTP debug logging\n```\n\n## LICENSE\n\n[ECL Version 2.0](https://opensource.org/licenses/ECL-2.0)\n\nCode from Summon API Toolkit may come with a different license but none was stated in their GitHub repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Fkoha_qa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcca%2Fkoha_qa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Fkoha_qa/lists"}