5

I work on both Windows and OS X. On the Mac, I love BibDesk and how it displays keywords and linked files. On Windows, I use JabRef, which is nice but is not BibDesk.

The main problem I have is how files are saved. I keep my .bib files under git, and when I open the file in one application, edit some entry and save the file, all entries are modified, so the git diffs are not an indication of what actually was changed. For example, here is how one entry is saved by BibDesk:

@article{bib:farzaneh,
    Author = {Seyed Amir Farzaneh and Mehran Sohrabi},
    Date-Added = {2015-02-09 19:04:24 +0000},
    Date-Modified = {2015-02-09 19:06:24 +0000},
    Journal = {Chemical Engineering Research and Design},
    Keywords = {CO2 foam, heavy oil recovery, foam flood, foam stability, alkaline, surfactant screening},
    Pages = {375-389},
    Title = {Experimental investigation of CO2-foam stability improvement by alkaline in the presence of crude oil},
    Volume = {94},
    Year = {2015},
    Bdsk-File-1 =     {YnBsaXN0MDDUAQIDBAUGJCVYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKgHCBMUFRYaIVUkbnVsbNMJCgsMDxJXTlMua2V5c1pOUy5vYmplY3RzViRjbGFzc6INDoACgAOiEBGABIAFgAdccmVsYXRpdmVQYXRoWWFsaWFzRGF0YV8QUy4uL0Ryb3Bib3gvcGFwZXJzL0ZhcnphbmVoXzIwMTVfRXhwZXJpbWVudGFsIGludmVzdGlnYXRpb24gb2YgQ08yLWZvYW0gc18wMDAwMDAucGRm0hcLGBlXTlMuZGF0YU8RAkgAAAAAAkgAAgAADk1haW4gUGFydGl0aW9uAAAAAAAAAAAAAAAAANC1mYhIKwAAAAt4uR9GYXJ6YW5laF8yMDE1X0V4cGVyaSMyMDk2REEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIJba0P5/EgAAAAAAAAAAAAEAAwAACSAAAAAAAAAAAAAAAAAAAAAGcGFwZXJzABAACAAA0LW1qAAAABEACAAA0P6bMgAAAAEAEAALeLkAC3bdAAUzQAAAwAoAAgBVTWFpbiBQYXJ0aXRpb246VXNlcnM6AGZhYmlvZm9ydGthbXA6AERyb3Bib3g6AHBhcGVyczoARmFyemFuZWhfMjAxNV9FeHBlcmkjMjA5NkRBLnBkZgAADgCEAEEARgBhAHIAegBhAG4AZQBoAF8AMgAwADEANQBfAEUAeABwAGUAcgBpAG0AZQBuAHQAYQBsACAAaQBuAHYAZQBzAHQAaQBnAGEAdABpAG8AbgAgAG8AZgAgAEMATwAyAC0AZgBvAGEAbQAgAHMAXwAwADAAMAAwADAAMAAuAHAAZABmAA8AHgAOAE0AYQBpAG4AIABQAGEAcgB0AGkAdABpAG8AbgASAGRVc2Vycy9mYWJpb2ZvcnRrYW1wL0Ryb3Bib3gvcGFwZXJzL0ZhcnphbmVoXzIwMTVfRXhwZXJpbWVudGFsIGludmVzdGlnYXRpb24gb2YgQ08yLWZvYW0gc18wMDAwMDAucGRmABMAAS8AABUAAgAU//8AAIAG0hscHR5aJGNsYXNzbmFtZVgkY2xhc3Nlc11OU011dGFibGVEYXRhox0fIFZOU0RhdGFYTlNPYmplY3TSGxwiI1xOU0RpY3Rpb25hcnmiIiBfEA9OU0tleWVkQXJjaGl2ZXLRJidUcm9vdIABAAgAEQAaACMALQAyADcAQABGAE0AVQBgAGcAagBsAG4AcQBzAHUAdwCEAI4A5ADpAPEDPQM/A0QDTwNYA2YDagNxA3oDfwOMA48DoQOkA6kAAAAAAAACAQAAAAAAAAAoAAAAAAAAAAAAAAAAAAADqw==}}

And here is how JabRef saves it (I did not edit it, just opened and saved the file). Notice that the content was not changed, but the capitalization, spacing and entry order were:

@Article{bib:farzaneh,
  title                    = {Experimental investigation of CO2-foam stability   improvement by alkaline in the presence of crude oil},
  author                   = {Seyed Amir Farzaneh and Mehran Sohrabi},
  journal                  = {Chemical Engineering Research and Design},
  year                     = {2015},
  pages                    = {375-389},
  volume                   = {94},

  bdsk-file-1              = {YnBsaXN0MDDUAQIDBAUGJCVYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKgHCBMUFRYaIVUkbnVsbNMJCgsMDxJ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TSGxwiI1xOU0RpY3Rpb25hcnmiIiBfEA9OU0tleWVkQXJjaGl2ZXLRJidUcm9vdIABAAgAEQAaACMALQAyADcAQABGAE0AVQBgAGcAagBsAG4AcQBzAHUAdwCEAI4A5ADpAPEDPQM/A0QDTwNYA2YDagNxA3oDfwOMA48DoQOkA6kAAAAAAAACAQAAAAAAAAAoAAAAAAAAAAAAAAAAAAADqw==},
  date-added               = {2015-02-09 19:04:24 +0000},
  date-modified            = {2015-02-09 19:06:24 +0000},
  keywords                 = {CO2 foam, heavy oil recovery, foam flood, foam   stability, alkaline, surfactant screening}
}

Is there any way to change (in either program) how an entry is saved, so they can be consistent?

  • 1
    There is no way to change this within BibDesk; it saves fields in alphabetical order, with a few exceptions (e.g., Bdsk-File fields, which are long and ugly). As I recall, the only thing we added for JabRef compatibility was a way to change the name of the "Annote" field. – Adam Maxwell Feb 20 '15 at 15:54
8

A solution to your problem would be to add a script to your git workflow, that reformats your .bib-file. One such tool is biber in toolmode.

Calling:

$ biber --tool example.bib

results in a nicely formated file called example_bibertool.bib:

@ARTICLE{bib:farzaneh,
  AUTHOR        = {Seyed Amir Farzaneh and Mehran Sohrabi},
  BDSK-FILE-1   = {YnBsaXN0MDDUAQIDBAUGJCVYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKgHCBMUFRYaIVUkbnVsbNMJCgsMDxJXTlMua2V5c1pOUy5vYmplY3RzViRjbGFzc6INDoACgAOiEBGABIAFgAdccmVsYXRpdmVQYXRoWWFsaWFzRGF0YV8QUy4uL0Ryb3Bib3gvcGFwZXJzL0ZhcnphbmVoXzIwMTVfRXhwZXJpbWVudGFsIGludmVzdGlnYXRpb24gb2YgQ08yLWZvYW0gc18wMDAwMDAucGRm0hcLGBlXTlMuZGF0YU8RAkgAAAAAAkgAAgAADk1haW4gUGFydGl0aW9uAAAAAAAAAAAAAAAAANC1mYhIKwAAAAt4uR9GYXJ6YW5laF8yMDE1X0V4cGVyaSMyMDk2REEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIJba0P5/EgAAAAAAAAAAAAEAAwAACSAAAAAAAAAAAAAAAAAAAAAGcGFwZXJzABAACAAA0LW1qAAAABEACAAA0P6bMgAAAAEAEAALeLkAC3bdAAUzQAAAwAoAAgBVTWFpbiBQYXJ0aXRpb246VXNlcnM6AGZhYmlvZm9ydGthbXA6AERyb3Bib3g6AHBhcGVyczoARmFyemFuZWhfMjAxNV9FeHBlcmkjMjA5NkRBLnBkZgAADgCEAEEARgBhAHIAegBhAG4AZQBoAF8AMgAwADEANQBfAEUAeABwAGUAcgBpAG0AZQBuAHQAYQBsACAAaQBuAHYAZQBzAHQAaQBnAGEAdABpAG8AbgAgAG8AZgAgAEMATwAyAC0AZgBvAGEAbQAgAHMAXwAwADAAMAAwADAAMAAuAHAAZABmAA8AHgAOAE0AYQBpAG4AIABQAGEAcgB0AGkAdABpAG8AbgASAGRVc2Vycy9mYWJpb2ZvcnRrYW1wL0Ryb3Bib3gvcGFwZXJzL0ZhcnphbmVoXzIwMTVfRXhwZXJpbWVudGFsIGludmVzdGlnYXRpb24gb2YgQ08yLWZvYW0gc18wMDAwMDAucGRmABMAAS8AABUAAgAU//8AAIAG0hscHR5aJGNsYXNzbmFtZVgkY2xhc3Nlc11OU011dGFibGVEYXRhox0fIFZOU0RhdGFYTlNPYmplY3TSGxwiI1xOU0RpY3Rpb25hcnmiIiBfEA9OU0tleWVkQXJjaGl2ZXLRJidUcm9vdIABAAgAEQAaACMALQAyADcAQABGAE0AVQBgAGcAagBsAG4AcQBzAHUAdwCEAI4A5ADpAPEDPQM/A0QDTwNYA2YDagNxA3oDfwOMA48DoQOkA6kAAAAAAAACAQAAAAAAAAAoAAAAAAAAAAAAAAAAAAADqw==},
  DATE-ADDED    = {2015-02-09 19:04:24 +0000},
  DATE-MODIFIED = {2015-02-09 19:06:24 +0000},
  JOURNALTITLE  = {Chemical Engineering Research and Design},
  KEYWORDS      = {CO2 foam, heavy oil recovery, foam flood, foam stability, alkaline, surfactant screening},
  PAGES         = {375-389},
  TITLE         = {Experimental investigation of CO2-foam stability improvement by alkaline in the presence of crude oil},
  VOLUME        = {94},
  YEAR          = {2015},
}

You can now rename and commit it.

Also: biber can do much more than this (sorting, converting, recoding), just have a look at section 3.12 in the manual.

  • 2
    Even better, use 2 bib files: one that you edit with your favorite bibliography manager, and another that is automatically generated from the first, and which is the one that is tracked by git. Every time you make your bibliography, let the filter script run. When cloning, the script can create a reverse copy (to be edited, possibly with some other bibliography management program), i.e., detect that one does not exist. This can save some manual work, especially remembering what name the unfiltered file has. – Ioannis Filippidis Apr 16 '16 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.