ge-ne / bibtool

BibTool is a tool for manipulating BibTeX data bases. BibTeX provides a mean to integrate citations into LaTeX documents. BibTool allows the manipulation of BibTeX files which goes beyond the possibilities -- and intentions -- of BibTeX.
GNU General Public License v2.0
205 stars 32 forks source link

file not found, always #87

Open vw-anna opened 2 years ago

vw-anna commented 2 years ago

Just installed Bibtool version 2.67 via my package manager. So far any bibtool command gives me the same error

$ bibtool references.bib
*** BibTool WARNING: File references.bib not found.

Did I do something wrong in during the installation maybe ? I just ran sudo apt install bibtool in Ubuntu 20.04 LTS.

ge-ne commented 2 years ago

You can use bibtool -h and check the line "Library path" to see where the bib files are sought. I guess that you just havn't put the bib file is a proper place or that you are in the wrong directory when invoking bibtool. Without any further infos I can't tell you more...

ghost commented 1 year ago

In dealii/publication-list#479, I have encountered a similar problem. Below is a minimal example that runs on a GitLab runner for me. The command bibtool publications-1998.bib throws the similar error as above *** BibTool WARNING: File publications-1998.bib not found., while the version with ./ works fine.

bibtool:
  stage: check

  image: ubuntu:jammy

  script:
    - apt-get update
    - apt-get install -y bibtool git ca-certificates --no-install-recommends
    - git clone https://github.com/dealii/publication-list.git
    - cd publication-list
    - bibtool publications-1998.bib
    - bibtool ./publications-1999.bib
flying-sheep commented 6 months ago

I have the same problem: Only paths starting with ./ are handled correctly. They should mean the same as the version without.

ge-ne commented 6 months ago

The setting of the library path determines where the files can be found. See the output of bibtool -h on how this is currently set. The search path for BibTeX files can also be set with the environment variable BIBINPUTS... Please check that you have set those paths appropriate...

flying-sheep commented 6 months ago

I see

Library path: .:/usr/share/bibtool

which indicates to me that the working directory is one of the library paths. Am I wrong?

I used it bibtool via docker like this:

$ docker run --init --rm -it trueflyingsheep/bibtool:2.68 -h | tail -n2
Library path: .:/usr/share/bibtool
Special configuration options: kpathsea
$ docker run --init --rm -v "$(pwd):/src" --workdir=/src -it trueflyingsheep/bibtool:2.68 docs/references.bib
*** BibTool WARNING: File docs/references.bib not found.
$ docker run --init --rm -v "$(pwd):/src" --workdir=/src -it trueflyingsheep/bibtool:2.68 ./docs/references.bib
@Article{   ...
[...]
}
ge-ne commented 6 months ago

Sorry, I have been unclear. I have answered a question which was not asked. Library path is for rsc files and BIBINPUTS is for bib files. You might try to set BIBINPUTS to '.'

flying-sheep commented 6 months ago

OK, can do. That should be the default, as said: relative/path means the same as ./relative/path everywhere else.