Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two phase --format-names #243

Open
jorgefandinno opened this issue Jan 17, 2025 · 2 comments
Open

Two phase --format-names #243

jorgefandinno opened this issue Jan 17, 2025 · 2 comments

Comments

@jorgefandinno
Copy link
Contributor

Add two modes to format-names

  • change the current command to not apply any changes and just print the changes to be made
  • add an option --apply that also changes the database
@jorgefandinno
Copy link
Contributor Author

@rkaminsk, I am thinking about the following refinement of the behavior we discussed:

  • if no word is removed bibfmt.py format-names apply the changes and prints the modifications,
  • if some word will be removed bibfmt.py format-names only prints the modifications and request to use ``bibfmt.py format-names --apply`.

Example1: The only new entry has author = {Luis Fari{\~n}as del Cerro}. Calling bibfmt.py format-names will replace this with author = {L. {Fari{\~n}as del Cerro}} and print

The following changes were applied to authors in the bibliography:
   Luis Fari{\~n}as del Cerro   ->   L. {Fari{\~n}as del Cerro}

Example2: The only new entry has author = {Luis Fari{\~n}as del Cerro and Juan Carlos Nieves}. Calling bibfmt.py format-names will not made any modifications and print

The following changes will be applied to authors in the bibliography:
   Luis Fari{\~n}as del Cerro   ->   L. {Fari{\~n}as del Cerro}

The following changes will result in the removal of some words in the first name and need to be reviewed:
   Juan Carlos Nieves  -> J. Nieves

Run "bibfmt.py format-names --apply" to apply the changes.

This only requires counting the number of words to decide which case to execute.

@rkaminsk
Copy link
Contributor

As you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants