uogbuji / pybibframe Goto Github PK
View Code? Open in Web Editor NEWOBSOLETE. Now maintained at https://github.com/zepheira/pybibframe ... Some open-source tools for working with BIBFRAME (see http://bibframe.org)
License: Apache License 2.0
OBSOLETE. Now maintained at https://github.com/zepheira/pybibframe ... Some open-source tools for working with BIBFRAME (see http://bibframe.org)
License: Apache License 2.0
$ marcbin2xml -o marc.xml stf.00.mrc
Traceback (most recent call last):
File "/Users/azaroth/install/bin/marcbin2xml", line 58, in
run(inputs=args.inputs, limit=args.limit, out=args.out, verbose=args.verbose)
File "/Users/azaroth/install/bin/marcbin2xml", line 36, in run
print >> out, TEMPLATE_TOP
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'
Following, again, the recipe in the readme:
>>> from bibframe.reader.marcxml import bfconvert
>>> inputs = open('/Users/azaroth/Downloads/29-7297576.xml', 'r')
>>> out = open('resources.versa.json', 'w')
>>> bfconvert(inputs=inputs, base='http://linked-data.stanford.edu', out=out)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/azaroth/install/lib/python3.4/site-packages/bibframe/reader/marcxml.py", line 133, in bfconvert
for pc in config.get(u'plugins', []):
AttributeError: 'NoneType' object has no attribute 'get'
We use pymarc to parse MARC21 (e.g. in marcbin2xml), but it has serious i18n issues, as we've encountered in practice, and as indicated in this thread which is very confusing and contains several worrying comments with regard to understanding of unicode support in Python.
We might have to find an alternative tool. yaz-marcdump was mentioned.
The MARC21 Vocabularies from Metadata Management Associates is a concordance of online data which could be pulled in as an optional set of output linked data references.
Should either package datachef, or make it installable via pip and put in requirements.txt
Traceback (most recent call last):
File "/Users/azaroth/install/bin/parse_versa", line 24, in <module>
from versa.reader.md import from_markdown
File "/Users/azaroth/install/lib/python3.4/site-packages/versa/reader/md.py", line 18, in <module>
from amara3.uxml.parser import parse, event
ImportError: No module named 'amara3.uxml'
pip3 install amara gets amara-2.0.0 which doesn't install.
pip3 install amara3 doesn't find anything.
Giving up.
At the Early Implementor meeting it was brought up that Z's pipeline is not handling e.g. 880 variant language/script info. We should be able to encode language tags, which of course is just what's supported by e.g. xml:lang. This will require some elaboration of Resource/label in the model to accommodate this metainfo. We could, for example elevate label to a primary resource type ("LanguageText" or something) which could be inlined in most usage (e.g. using xml:lang).
Note: A useful resource is the XSLT used in the latest version of marc2mods. See e.g. the xxx880, yyy880, z2xx880, z3xx880.
Command line from the readme used:
marc2bf -o resources.versa.json -r resources.ttl marc.xml
creates the two output files at length 0 and then hangs when getting events:
File "/Users/azaroth/install/bin/marc2bf", line 60, in <module>
run(inputs=args.inputs or sys.stdin, base=args.base, out=args.out, limit=args.limit, rdfttl=args.rdfttl, config=args.config, verbose=args.verbose, mods=args.mod)
File "/Users/azaroth/install/bin/marc2bf", line 30, in run
bfconvert(inputs=inputs, base=base, out=out, limit=limit, rdfttl=rdfttl, config=config, verbose=verbose, logger=logger)
File "/Users/azaroth/install/lib/python3.4/site-packages/bibframe/reader/marcxml.py", line 157, in bfconvert
loop.run_forever()
File "/Users/azaroth/install/lib/python3.4/asyncio/base_events.py", line 184, in run_forever
self._run_once()
File "/Users/azaroth/install/lib/python3.4/asyncio/base_events.py", line 795, in _run_once
event_list = self._selector.select(timeout)
File "/Users/azaroth/install/lib/python3.4/selectors.py", line 494, in select
kev_list = self._kqueue.control(None, max_ev, timeout)
KeyboardInterrupt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.