Git Product home page Git Product logo

Comments (13)

jgilchrist avatar jgilchrist commented on September 26, 2024

Hey Louis! Thanks for the issue, it's actually something I fixed a little while ago but I forgot to upload another version to PyPi with the fix.

The issue stems from the fact that the setup.py script in the build currently on PyPi expects two scrips, bib and pybib to exist in the bin/ folder, which is how it worked before I consolidated the functionality into bib.

I've submitted a new version to PyPi (1.2.1) - attempting to install this version works on my machine with pip3 install --user pybib (the command it installs is bib).

Could you let me know if this worked for you?

from pybib.

lmmx avatar lmmx commented on September 26, 2024

Hmmm, installed OK and thought it was sorted but there's still no bib command...

Don't know if this is proper usage but I tried making a dummy file with 1 line, 10.3389/fcell.2014.00040, mydoi.txt in ~/Desktop, ran find / -type d -name pybib and tried bib in there to the same effect. Straight up ~/.local/lib/python3.4/site-packages/pybib $ python3 pybib.py ~/Desktop/mydoi.txt also came back empty.

I get the same in a Biolinux virtual machine (Ubuntu 12.04 LTS)

from pybib.

jgilchrist avatar jgilchrist commented on September 26, 2024

bib on my system is located in ~/.local/bin, does that exist for you?

from pybib.

lmmx avatar lmmx commented on September 26, 2024

Ahh there it is, yeah - not automatically exported to shell after installation though. Oddly exporting to PATH in .bashrc doesn't create the shell command either, have you got an alias set up?

from pybib.

jgilchrist avatar jgilchrist commented on September 26, 2024

Could you please try the following:

Add the path to your .bashrc again:

# in .bashrc
export PATH="${PATH}:~/.local/bin"

Source it (or restart the terminal):

source ~/.bashrc

Then try bib again, and if it doesn't work then paste the output of echo $PATH?

from pybib.

lmmx avatar lmmx commented on September 26, 2024

Ohhh.. 😅 yeah that works.. I must have mucked up the path line, I do apologise!

~ $ bib
usage: bib [-h] [-o OUT] [-v] [-f [FILE]] [DOI]
bib: error: one of the arguments DOI -f/--file is required

from pybib.

jgilchrist avatar jgilchrist commented on September 26, 2024

Brilliant 😄

from pybib.

jgilchrist avatar jgilchrist commented on September 26, 2024

I'll put something in the README to make sure people have the local pip binary path in their path.

from pybib.

lmmx avatar lmmx commented on September 26, 2024

Sounds like a plan. Also I was going to mention that you might want to peruse Carl Boettiger's knitcitations R package, I've been using it with Rmarkdown docs and it's pretty nice. It uses the CrossRef API (starting here), I guess it'd be easier to port something else rather than write from scratch

from pybib.

jgilchrist avatar jgilchrist commented on September 26, 2024

Looks nice! I made this just for personal usage when writing things for Uni really. Primarily I use it to grab individual citations for new papers and add them to an existing .bib file, like so:

bib 10.3389/fcell.2014.00040 >> existing_citations.bib

# (piped through bibtool - another program which formats the entry and auto-generates a citation key:
bib 10.3389/fcell.2014.00040 | bibtool >> existing_citations.bib

And that's pretty much the extend of my usage.

from pybib.

lmmx avatar lmmx commented on September 26, 2024

I like it, Carl's package lets you get a bit more elaborate with in-text citations that address the bibliography through those unique referents like @Weiser_1993, which are handled such that you get the same effect as Word's cross-referencing of numbered citations in the (knitr/pandoc-generated) pdf.

I dropped you a tweet anyway, sure a lot of folks would find this useful :-)

from pybib.

jgilchrist avatar jgilchrist commented on September 26, 2024

That sounds really handy, I can see how it would be useful. I personally prefer doing it this way just because it ensures that I don't need any specific tool to build my document if I lose the code to this way down the line, but it does mean you need the extra step!

Thanks for the tweet 😄

from pybib.

lmmx avatar lmmx commented on September 26, 2024

Another reason I'm not wholly behind the approach is that it contributes to a pretty gruesome scaling of time-to-compile-to-pdf with number of citations, and don't mention it 🐥

from pybib.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.