Skip to content

Commit

Permalink
Merge pull request #3 from edsu/avram
Browse files Browse the repository at this point in the history
Switch to Avram
  • Loading branch information
edsu authored Dec 30, 2023
2 parents 01fa97e + d27fbc4 commit 366bcb7
Show file tree
Hide file tree
Showing 9 changed files with 12,609 additions and 7,361 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ __pycache__
test-data/*.csv
test-data/*.parquet
*.pyc
dist
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) Ed Summers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7 changes: 4 additions & 3 deletions marctable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ def jsonl(infile: click.File, outfile: click.File, rules: list, batch: int) -> N


@cli.command()
def yaml() -> None:
@click.argument("outfile", type=click.File("w"), default="-")
def avram(outfile: click.File) -> None:
"""
Generate YAML for the MARC specification by scraping the Library of Congress.
Generate Avram (YAML) from scraping the Library of Congress MARC bibliographic website.
"""
marctable.marc.main()
marctable.marc.crawl(outfile=outfile)


def main() -> None:
Expand Down
Loading

0 comments on commit 366bcb7

Please sign in to comment.