Code Monkey home page Code Monkey logo

papis-rofi's Introduction

Papis

ghbadge RTD CodeQL Pypi zenodo_badge

Papis is a powerful and highly extensible CLI document and bibliography manager.

first_glance

With Papis, you can search your library for books and papers, add documents and notes, import and export to and from other formats, and much much more. Papis uses a human-readable and easily hackable .yaml file to store each entry's bibliographical data. It strives to be easy to use while providing a wide range of features. And for those who still want more, Papis makes it easy to write scripts that extend its features even further.

Features

  • Add documents and automatically fetch their metadata.
  • Search by author, title, tags, and so on.
  • Synchronize your library with whatever software you're already using.
  • Share your documents with colleagues without having to force some proprietary service onto them.
  • Import your data from other bibliography managers.
  • Export to BibTeX and other formats.
  • Integrate with your editor with plugins for (Neo)vim and Emacs.
  • TUIs make it easy to get a quick overview of your library.
  • Use the web app when the CLI doesn't quite cut it (for example on your tablet).
  • Hacking Papis is easy! Use the API to easily create your own custom python scripts.

Quick tour

Install Papis with pip (or one of the alternatives):

pip install papis

Let's download a couple of documents:

wget http://www.gnu.org/s/libc/manual/pdf/libc.pdf
wget http://www.ams.org/notices/201304/rnoti-p434.pdf

We can now add these to the (default) library. This will automatically query for the metadata associated with the doi.

papis add --from doi 10.1090/noti963 rnoti-p434.pdf

add

You can also use --set to add information:

papis add libc.pdf --set author "Sandra Loosemore" \
                   --set title "GNU C reference manual" \
                   --set year 2018 \
                   --set tags programming \
                   --confirm

Now open an attached file or edit an entry:

papis open
papis edit

edit

Or export them to bibtex:

papis export --all --format bibtex > mylib.bib

bibtex_export

Papis also includes a web app that you can start with:

papis serve

You can then open the indicated address (http://localhost:8888) in your browser.

web_app

All papis commands come with help messages:

papis -h      # General help
papis add -h  # Help with a specific command

Installation & setup

Information about installation and setup can be found in the docs, for example in the these sections:

Questions?

The docs cover Papis' features and discuss possible work flows. If you still have questions, head to our GitHub discussions โ€” we're more than happy to help. If you've found a bug, please open an issue and help make Papis even better!

Reviews and blog posts

Contributing

Contributions are very welcome! Take a look at CONTRIBUTING.md for general rules and HACKING.md for additional code-related information. We encourage you to also check out, contribute to, or even help maintain the other projects in the Papis ecosystem mentioned below ๐Ÿ˜‰.

The Papis ecosystem

Papis has grown over the years and there are now a number of projects that extend Papis' features or integrate it with other software.

Project Maintained by
papis (core) Alejandro Gallo, Julian Hauser, Alex Fikl
papis-rofi Etn40ff
papis-dmenu you?
papis-vim you?
papis.nvim Julian Hauser
papis-emacs Alejandro Gallo
papis-zotero Alex Fikl
papis-libgen you?
papis-firefox wavefrontshaping

Papis isn't the only fish in the pond. You might also be interested in:

papis-rofi's People

Contributors

alejandrogallo avatar etn40ff avatar gkobeaga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

papis-rofi's Issues

Compatibility with jinja?

Hi,

I use jinja in my config file, and when I try to use papis rofi, I do not see the actual information about the paper in the list but the jinja code without the outer brakets, like {doc["title"]} instead of the actual title.

Can it be compatible with jinja templating?

Thanks!

Sebastien

Maintainer

What is the status with papis-rofi? I might be willing to take care of it if you point me to the needed changes to bring it up to speed.

Crash if an invalid folder is passed (list index out of range)

I just installed papis and papis rofi and tried to run it without doing anything else.
When I open papis rofi and then press Alt-u to browse the librar, I get the following error:

~ papis rofi  
INFO:db:cache:Indexing library, this might take a while...
Traceback (most recent call last):
  File "/usr/bin/papis", line 33, in <module>
    sys.exit(load_entry_point('papis==0.12', 'console_scripts', 'papis')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/papis_rofi/main.py", line 218, in main
    return Gui().main(documents)
  File "/usr/lib/python3.10/site-packages/papis_rofi/main.py", line 186, in main
    browse(self.documents[i])
IndexError: list index out of range

This is how my config looks like (default config after installing papis):

[papers]
dir = ~/Documents/papers

[settings]
default-library = papers

It turns out that I have a custom folder with the exact same name that is not a papis library.
The same behavior is observable for an empty folder.
The papis cli tool handles this gracefully, ie., it does not crash.
However, papis-rofi crashes as shown above.
I guess simply a check for a valid papis library is missing here?

Missing tag/release on GitHub (vs pypi)

On GitHub, there is only one version tagged v0.2.0 (Oct 21, 2019) whereas on pypi there is a release 0.6.0 (Nov 28, 2021). Is it possible to add a matching tag here on GitHub?

Thank you.

EDIT: I have the same problem with papis-python-rofi (1.0.2 on GitHub vs 1.0.3 on pypi) but there is no bugtrack for the papis/python-rofi project

Not suitable for picking non-document items

papis 0.11.1 + papis-rofi 0.6.0

Unlike papis or fzf, rofi does not work for picking libraries via --pick-lib yet. The PythonFormater class it uses assumes elements to be either a Document or a dictionary.

$ papis --pick-lib --set picktool rofi open
Traceback (most recent call last):
  File "/home/user/.local/bin/papis", line 33, in <module>
    sys.exit(load_entry_point('papis', 'console_scripts', 'papis')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1654, in invoke
    super().invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/git/papis/papis/commands/default.py", line 264, in run
    _picked_libs = papis.pick.pick(papis.api.get_libraries())
  File "/home/user/git/papis/papis/pick.py", line 56, in pick
    return picker()(options,
  File "/home/user/dev/papis-rofi/papis_rofi/main.py", line 62, in __call__
    return pick(items)
  File "/home/user/dev/papis-rofi/papis_rofi/main.py", line 52, in pick
    return Gui().main(options)
  File "/home/user/dev/papis-rofi/papis_rofi/main.py", line 161, in main
    [header_filter(d) for d in self.documents],
  File "/home/user/dev/papis-rofi/papis_rofi/main.py", line 161, in <listcomp>
    [header_filter(d) for d in self.documents],
  File "/home/user/dev/papis-rofi/papis_rofi/main.py", line 152, in header_filter
    return papis.format.format(header_format, x)
  File "/home/user/git/papis/papis/format.py", line 115, in format
    return formater.format(fmt, doc, doc_key=doc_key, additional=additional)
  File "/home/user/git/papis/papis/format.py", line 50, in format
    fdoc.update(doc)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

Pypi is out-of-date (and binary only?)

It seems like something isn't quite right with the package on pypi.

Firstly, it hasn't been updated to the latest commit.

Secondly, it doesn't come in a standard source file and instead bundles as papis-rofi-0.1.1.linux-x86_64.tar.gz, instead of the expect papis-rofi-0.1.1.tar.gz

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.