MicheleCotrufo / pdf2bib

A python library/command-line tool to quickly and automatically generate BibTeX data starting from the pdf file of a scientific publication.
58 stars 7 forks source link

pdf2bib.exe #1

Closed 192933488S closed 2 years ago

192933488S commented 2 years ago

Hi, in "https://github.com/MicheleCotrufo/pdf2bib/tree/master/right_click_menu_installation" suddenly the documentation talks about an executable, but the actual installation is via WSL right? Did I miss anything? I installed within Windows Linux (WSL); Documentation says pip install pdf2bib ... so does this grab an executable?)

Thank you for clarification, this tool is a gem otherwise. See also the test-scenario reported for pdf2doi, which is acquired for pdf2bib too (same fp-results).

PS. Greets from physicist to physicist 😁

root@laptop:/mnt/c/dev/test/dois/requirements# locate pdf2bib
/usr/local/bin/pdf2bib
/usr/local/lib/python3.8/dist-packages/pdf2bib
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info
/usr/local/lib/python3.8/dist-packages/pdf2bib/__init__.py
/usr/local/lib/python3.8/dist-packages/pdf2bib/__pycache__
/usr/local/lib/python3.8/dist-packages/pdf2bib/bibtex_makers.py
/usr/local/lib/python3.8/dist-packages/pdf2bib/config.py
/usr/local/lib/python3.8/dist-packages/pdf2bib/main.py
/usr/local/lib/python3.8/dist-packages/pdf2bib/settings.ini
/usr/local/lib/python3.8/dist-packages/pdf2bib/utils_registry.py
/usr/local/lib/python3.8/dist-packages/pdf2bib/__pycache__/__init__.cpython-38.pyc
/usr/local/lib/python3.8/dist-packages/pdf2bib/__pycache__/bibtex_makers.cpython-38.pyc
/usr/local/lib/python3.8/dist-packages/pdf2bib/__pycache__/config.cpython-38.pyc
/usr/local/lib/python3.8/dist-packages/pdf2bib/__pycache__/main.cpython-38.pyc
/usr/local/lib/python3.8/dist-packages/pdf2bib/__pycache__/utils_registry.cpython-38.pyc
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info/INSTALLER
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info/METADATA
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info/RECORD
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info/WHEEL
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info/entry_points.txt
/usr/local/lib/python3.8/dist-packages/pdf2bib-1.0rc3.dist-info/top_level.txt
root@laptop:/mnt/c/dev/test/dois/requirements#
MicheleCotrufo commented 2 years ago

Hi, and thanks for your feedback :) When the package pdf2bib is installed via pip, an entry-point is also created. This is defined at lines 20-21 of the setup.py file https://github.com/MicheleCotrufo/pdf2bib/blob/master/setup.py. The advantage of creating the entry point is that pdf2bib can be used from the command line from any location by just typing pdf2bib, as opposed to having to call the python interpreter. The way this entry point is practically created depends on the operating system, and it is handled directly by python and pip.

Under Windows, pip creates a "fake" .exe file in the scripts folder of Python, and the scripts folder is then added to the system path. Under different operating systems the entry point is implemented in different ways, and I am not sure how it works in your case. The instructions to enable access to pdf2bib via the right-click-menu are only meant for Windows-like systems. I am planning to extend it to Linux in the future, but not any time soon :) If your OS is Windows-like, you should be able to install the right-click-menu just by typing pdf2bib -install--right--click in a command prompt with admin rights.