Created
September 18, 2011 20:09
-
-
Save etc/1225498 to your computer and use it in GitHub Desktop.
Populate fields missing in one BibTeX::Entry from those present in another BibTeX::Entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def crosspopulate(entry,parententry) | |
parententry.fields.keys.each do |k| | |
entry[k] = parententry[k] unless entry.has_field?(k) | |
end # each | |
return entry | |
end # def crosspopulate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Workaround until this issue is resolved: inukshuk/bibtex-ruby#22