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

BibTeX entries copied to clipboard seems not to work as expected #6

Closed
liyc-ai opened this issue Mar 2, 2020 · 2 comments
Closed

Comments

@liyc-ai
Copy link

liyc-ai commented Mar 2, 2020

Hi, i am just using the cnki2bib in terminal after copying the NoteExpress-style reference to the clipboard. It gave me some output as below:

Read the NoteExpress Entry content from the clipboard.
BibTeX entries copied to clipboard.
File 'out.bib' is created at current directory.

And there was out.bib file in my current directory, in which the content is what i want. But it seems that the BibTex entries copied to clipboard not work, and the bibTex-style reference was not copied to the clipboard.

My os is Ubuntu 19.10, and the python version is 3.7.0. Thanks!

@Vopaaz
Copy link
Owner

Vopaaz commented Mar 2, 2020

The functionality works well on my Win10 machine, so it looks like some OS compatibility issue, which is out of the scope of this application. We used the pyperclip module to handle cross-platform, clipboard events.

Would you please test the following commands?

Firstly pip install pyperclip, then in the Python REPL:

>>> import pyperclip
>>> pyperclip.copy("aaa")

After that, aaa should be in your clipboard.

If this did not work, according to the documents of pyperclip:

On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run "sudo apt-get install xclip" or "sudo apt-get install xsel" (Note: xsel does not always seem to work.)

If the above-mentioned test still failed, I suggest that you raise an issue to pyperclip. Thanks!

@liyc-ai
Copy link
Author

liyc-ai commented Mar 2, 2020

Thanks! sudo apt-get install xclip works!

@Vopaaz Vopaaz closed this as completed Mar 2, 2020
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