Giter Club home page Giter Club logo

Comments (4)

nschloe avatar nschloe commented on June 9, 2024

Thanks for the report!

The way betterbib works under the hood is that it parses the file using pybtex – and at that point, all formatting information is lost already. So, yeah, to preserve the formatting, I'd have to write my own parser, which is probably outside the scope of betterbib.

I'll implement your second suggestion though and add a small tool for bib file formatting.

from betterbib.

nschloe avatar nschloe commented on June 9, 2024

Alright, I've made a few changed to make things easier for you and everyone else.

  1. betterbib is now betterbib-sync
  2. There's now a new tool betterbib-format
  3. They read/write from/to standard i/o, so they can be chained together.

What you can do to preserve tabs in the the output is to run

betterbib-sync in.bib | betterbib-format -t - out.bib

from betterbib.

rpspringuel avatar rpspringuel commented on June 9, 2024

The ability to pipe is nice, but since betterbib rearranges the order of the fields in an entry, it isn't as useful from a diff point of view. True, with the tabs I no longer get whole entries marked as changed, but some parts of each entry are still marked as changed because of the reordered fields. What I have to do to use diff to check betterbib's work is as follows:

  1. betterbib-format in.bib temp.bib
  2. betterbib-sync temp.bib out.bib
  3. diff temp.bib out.bib

In this way the only changes that are marked are due to the actual data correction step.

Still, the fact that I can now do this is a big improvement. Thanks.

from betterbib.

nschloe avatar nschloe commented on June 9, 2024

Alright, fixed that now too. The only thing I cannot influence is the fact that the author name is always separate from the rest; I deliberately put it first all the time. The other entries should remain in order.

from betterbib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.