This PR improves the usage of pybison by making it possible to invoke the run() method of a given parser multiple times.
Here is a short example:
from parser.attributes import AttributeParser
# create a parser object once
parser = BisonParser()
# use run() method with different inputs
with open("foo.md", "r") as foo:
obj = parser.run(read=foo.read)
print(json.dumps(obj, sort_keys=True, indent=4))
# let's use another file
with open("bar.md", "r") as bar:
obj = parser.run(read=bar.read)
print(json.dumps(obj, sort_keys=True, indent=4))
This PR improves the usage of pybison by making it possible to invoke the
run()
method of a given parser multiple times.Here is a short example: