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

Should selfcites.py write something to stdout? #6

Open
twsh opened this issue Apr 17, 2021 · 2 comments
Open

Should selfcites.py write something to stdout? #6

twsh opened this issue Apr 17, 2021 · 2 comments

Comments

@twsh
Copy link
Contributor

twsh commented Apr 17, 2021

Here is a proposal:

If --source is set, a biblatex file should be written to stdout with all the entries that are missing in any argument and that are found in the source bibliography. An optional argument will have the script write instead a complete bibliography, equivalent to the extended one it would write to a file. This will only work if one bibliography is given to the script to check. There should also be an option to write to stdout only, instead of making a new file, which is false by default.

If --source isn't set, I'm not sure that it makes sense to write anything.

@jdutant Does that sound like a reasonable and useful addition to you?

@jdutant
Copy link
Owner

jdutant commented Apr 17, 2021

Note, at the moment all the messages are written to stdout (rather than stderror).

I though writing a biblatex file and or entries in stdout could be useful for piping. But so could be writing just the list of missing entries (to put them in a markdown file's 'nocite' field). Without clear use case perhaps better hold off.

As far as Dialectica is concerned, there are two uses of the script.

  • scour through all the .bib files in the processing tree, and use the master bibliography file to fill them with any missing self-cited entry.
  • for a specific article, get the list of self-citing entries in the bibliography to add them in the 'nocite' field.

The first just needs to output messages ("job done", "these entries still missing"). The second needs to output a reusable list of keys. So I see those options:

  1. Don't bother.
  2. Have lists of missing keys in stdout (one line per file), all the other messages in stderr
  3. Have an option that decide what to print on stdout, either lists of missing keys, or some bibtex file (options: just the missing entries recovered, or all the entries incl those recovered).

@twsh
Copy link
Contributor Author

twsh commented Apr 18, 2021

@jdutant OK. Let's do one of those if and when we need it.

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