/usr/share/pyshared/xapers/nci/bibview.py is in xapers 0.5.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import urwid
############################################################
class Bibview(urwid.WidgetWrap):
def __init__(self, ui, query):
self.ui = ui
self.ui.set_header("Bibtex: " + query)
docs = self.ui.db.search(query, limit=20)
if len(docs) == 0:
self.ui.set_status('No documents found.')
string = ''
for doc in docs:
string = string + doc.get_bibtex() + '\n'
self.box = urwid.Filler(urwid.Text(string))
w = self.box
self.__super.__init__(w)
def keypress(self, size, key):
self.ui.keypress(key)
|