Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manuscript edition to the bibliographic meta data #19

Merged
merged 2 commits into from
Jul 24, 2019

Conversation

wrznr
Copy link
Member

@wrznr wrznr commented Jul 23, 2019

Taken from mods:edition, put into tei:biblFull/editionStmt.

Taken from `mods:edition`, put into `tei:biblFull/editionStmt`.
@wrznr wrznr added the enhancement New feature or request label Jul 23, 2019
@wrznr wrznr requested a review from tboenig July 23, 2019 14:37
@@ -280,6 +289,12 @@ def get_publishers(self):
"""
return self.publishers

def get_edition(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the advantage of self.get_edition() over self.edition?

I think we had that discussion before though but I forgot your reasoning.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's basically a left-over from C++ times. Obviously, getter/setter are not recommended (http://dirtsimple.org/2004/12/python-is-not-java.html) in Python. #21

Copy link
Collaborator

@kba kba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

"""
Adds an edition statement with details on the source manuscript.
"""
bibl_full = self.tree.xpath('//tei:fileDesc/tei:sourceDesc/tei:biblFull', namespaces=ns)[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that xpath always return results? If not, an error with that xpath might be more intuitive than an IndexError.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#22

@wrznr wrznr merged commit 45e5599 into master Jul 24, 2019
@wrznr wrznr deleted the add_edition_stmt branch July 24, 2019 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants