Available in a
Author: W. Trevor King
$ python -c 'from pybtex.database.input.bibtex import Parser; from pybtex.database.output.clean_bibtex import Writer; p = Parser(); d = p.parse_file("path/to/db.bib"); w = Writer(); w.write_file(d, "path/to/db.bib", p.get_raw_macros())' 2> pybtex.log
Be sure to look over
git diff path/to/db.bib for
anything suspicious before committing the new file (you are versioning
it with Git right? ;). You may have to do some find-and-replacing
to handle changed keys and consolidate or rename automatically
Since I publish a lot of Git packages, I was interested to read about Joey Hess' rel=vcs-* microformat. I think recording the location of the repo sorcing a page is a great idea, but with the link stashed in the page header, I could easily browse on by without ever noticing that the link existed.
This looks like the same sort of problem that the Semantic Radar
extension was designed to solve, except the SR extension notifies you
about RDF files (SIOC, FOAF, DOAP, etc.). I've altered the SR
extension to identify the
rel=vcs-* tags and "cold"
otherwise. When the icon is "hot", you can click on it to pop up a
list of rel-vcs links. Clicking on an item in the list will open that
URI in a new tab. Since Firefox can't speak
git:// etc., the new
tab will mostly be useful as a source of the URI for copy/pasting into
git clone ... call or similar. Alternatively, you can consider
the "hot" icon as a suggestion to use
webcheckout or other
rel=vcs-* consumer on the source page.