papis icon indicating copy to clipboard operation
papis copied to clipboard

No way to import multiple items from a bibtex file; `cmd` portion of `papis bibtex read mybib.bib cmd` doesn't exist

Open JonathanReeve opened this issue 3 years ago • 6 comments

  • papis version ($ papis --version or commit number):

0.11.1

how to reproduce the issue

If you try to import multiple items from a bibtex file all at once, there doesn't seem to be a way to do that. papis bibtex read mybib.bib works, and shows the number of items I have there, but I can't seem to add these to the papis database. The documentation says to run:

papis bibtex                            \
  read new_papers.bib                   \ # Read bib file
  cmd 'papis add --from-doi {doc[doi]}'   # For every entry run the command

But not only does that not work, complaining that the cmd subcommand doesn't exist, (Error: No such command 'cmd'.), it doesn't appear to be implemented anywhere in the codebase, unless there's something I'm not seeing.

Is there a way to import multiple items from a bibtex file?

JonathanReeve avatar Sep 01 '21 00:09 JonathanReeve

Sorry for the delay.

Sadly this documentation was a bit outdated. I updated the documetnation a bit more.

To do this you really want to take a look at the command explore, originally bibtex had the cmd but then we decided to kick it out in favour of the more powerful explore command, there you can also import documents, i.e.

papis explore bibtex main.bib import

You can check the documentation and the --help for more information, please feel free to reach out if you get stuck!

alejandrogallo avatar Sep 22 '21 21:09 alejandrogallo

As far as I can tell, that command doesn't work. When I execute:

papis explore bibtex /path/to/my/library.bib import

It outputs:

INFO:explore:bibtex:Reading in bibtex file /home/jon/Dokumentujo/Papers/library.bib
INFO:explore:bibtex:2279 documents found

then prints the whole contents of my .bib file, but doesn't import them. Running papis list from there just says WARNING:cli:list:No documents retrieved.

Am I doing something wrong, or is this just broken?

JonathanReeve avatar Sep 24 '21 00:09 JonathanReeve

I'm sorry Jonathan, I missed that. It is not explore, it is indeed bibtex, i.e. I would recommend the following

papis bibtex read mylib.bib import -a -o testlib-folder

# inspect testlib-folder and so, for instance
papis -l testlib-folder edit
# and so on

Whenever you are quite happy with it, you can just add it to your library by hand

mv testlib-folder/* /path/to/your/library/folder/

clear the cache

papis --cc

and you'll be all set

papis edit

Sorry about that, I hope that checks out, at some point we have to sort out the responsibilities of papis-explore and papis-bibtex as they share a lot of semantic similarities.

alejandrogallo avatar Sep 24 '21 12:09 alejandrogallo

papis version 0.11.1

I get Error: No such option: -a when running this command

papis bibtex read mylib.bib import -a -o testlib-folder

supersambo avatar May 04 '22 07:05 supersambo

Sorry, mine seems to have been an issue with a faulty installation on my machine. After reinstalling via AUR papis-git this is working again.

supersambo avatar May 11 '22 09:05 supersambo

thanks for writing back

alejandrogallo avatar May 11 '22 12:05 alejandrogallo