Skip to content

Instantly share code, notes, and snippets.

@etc
Created September 18, 2011 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etc/1225498 to your computer and use it in GitHub Desktop.
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
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
@etc
Copy link
Author

etc commented Sep 18, 2011

Workaround until this issue is resolved: inukshuk/bibtex-ruby#22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment