Skip to content
Advertisement

How to change the same keys related to different articles in bibtex?

With the help of some plugin, I get a .bib file with information about scientific articles. Sometimes it turns out that the same keys appear in different records.

For example:

JavaScript

I am using pybtex library to parse a file. This library ignores duplicate entries with the same keys. Before using this library, I need to somehow process the file so that all the keys in it are different. How can I do that?

Advertisement

Answer

I decided to use regular expressions. There is probably a more convenient solution. I just replace the keys with nanoid.

JavaScript
Advertisement