Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A6486431FB6 for ; Mon, 15 Apr 2013 12:07:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MuduWRy2-amS for ; Mon, 15 Apr 2013 12:07:42 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 2C33B431FAF for ; Mon, 15 Apr 2013 12:07:42 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id EFEE72E50BFF; Mon, 15 Apr 2013 12:07:31 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (DHCP-123-224.caltech.edu [131.215.123.224]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id EC1123281B3; Mon, 15 Apr 2013 12:07:27 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id 99CD761707; Mon, 15 Apr 2013 12:07:27 -0700 (PDT) From: Jameson Graef Rollins To: Patrick Totzke , Notmuch Mail Subject: Re: Xapers In-Reply-To: <20130415184645.698.61822@brick.lan> References: <87zjx0tdwt.fsf@servo.finestructure.net> <87li8ju307.fsf@servo.finestructure.net> <20130415184645.698.61822@brick.lan> User-Agent: Notmuch/0.15.2+82~ga5881dd (http://notmuchmail.org) Emacs/24.2.1 (x86_64-pc-linux-gnu) Date: Mon, 15 Apr 2013 12:07:25 -0700 Message-ID: <87a9oztxxu.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 19:07:48 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Apr 15 2013, Patrick Totzke wrote: > Brilliant idea! Thanks! I give Carl all the credit, though, since it's really all just based on the notmuch idea. > here's some early feedback: > * is there a way to batch import a bunch of pdfs? or better yet, a bibtex= file with entries pointing > to files like the ones produced by say jabref? > There, entries have some line like this: > file =3D {Boz2012.pdf:papers/Boz2012.pdf:PDF} There's not currently a prescribed way to batch import, but if you can programmatically get all pdf/bibtex pairs then it should be easy to script: xapers import --file=3DPDF --source=3DBIBTEX > * got a bunch of traces: > ----------------------------- > $xapers import --source=3DABK2011.pdf = 1 =E2=86=B5 master=20 > Reading bibtex... done. > Adding bibtex...=20 >=20=20=20 > Traceback (most recent call last): > File "/home/pazz/.local/bin/xapers", line 145, in > docid =3D cli.add(query_string, infile=3Dinfile, source=3Dsource, t= ags=3Dtags, prompt=3Dprompt) > File "/home/pazz/.local/lib/python2.7/site-packages/xapers/cli/ui.py"= , line 228, in add > doc.add_bibtex(bibtex) > File "/home/pazz/.local/lib/python2.7/site-packages/xapers/documents.= py", line 373, in add_bibtex > self.bibentry =3D xapers.bibtex.Bibentry(bibtex) > File "/home/pazz/.local/lib/python2.7/site-packages/xapers/bibtex.py"= , line 25, in __init__ > if os.path.exists(bibtex): > File "/usr/lib/python2.7/genericpath.py", line 18, in exists > os.stat(path) > TypeError: must be encoded string without NULL bytes, not str > ---------------------------- Yikes. Sorry about that. Clearly more error checking is needed. The problem here is that PDFs should passed in through the --file=3D option, while source library URLs or bibtex files should be passed in through --source=3D. > $ xapers show, then i moved around a bit > > ---------------------------- > Traceback (most recent call last): > File "/home/pazz/.local/bin/xapers", line 228, in > xapers.nci.UI(xroot, cmd=3Dargs) > File "/home/pazz/.local/lib/python2.7/site-packages/xapers/nci/ui.py"= , line 73, in __init__ > self.mainloop.run() > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/main_loop.py", line 272, in run > self.screen.run_wrapper(self._run) > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/raw_display.py", line 242, in run_wrapper > return fn() > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/main_loop.py", line 337, in _run > self.event_loop.run() > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/main_loop.py", line 708, in run > self._loop() > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/main_loop.py", line 787, in _loop > self._watch_files[fd]() > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/main_loop.py", line 388, in _update > self.process_input(keys) > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/main_loop.py", line 488, in process_input > k =3D self._topmost_widget.keypress(self.screen_size, k) > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/container.py", line 1120, in keypress > return self.body.keypress( (maxcol, remaining), key ) > File "/home/pazz/.local/lib/python2.7/site-packages/xapers/nci/search= .py", line 304, in keypress > eval(cmd) > File "", line 1, in > File "/home/pazz/.local/lib/python2.7/site-packages/xapers/nci/search= .py", line 155, in nextEntry > self.listbox.set_focus(pos + 1) > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/listbox.py", line 567, in set_focus > self.body.set_focus(position) > File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-p= y2.7-linux-x86_64.egg/urwid/listbox.py", line 178, in set_focus > raise IndexError, "No widget at position %s" % (position,) > IndexError: No widget at position 1 > ---------------------------- Hrm. Don't know what this is about. I'll look into it. Sorry again! > * did you already set something up to report bugs? github issues, a malin= g list? No, not yet. I wanted to gauge interest first. Maybe I'll go ahead and set something up on github. In the meantime please just report bugs to be directly and I'll note them in the TODO. > Can't wait until someone forks alot to use this. I've been waiting for > someone (else) to start a project like this for some time now :) Well actually the curses UI is ripped almost entirely from alot already! It clearly needs some more work, though. Thanks for the feedback and interest! jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJRbE/tAAoJEO00zqvie6q8qLkP/iZqSDRGq2/6zHy9eVA9OpQ5 +lhp0zbxvuvmgZ1KaAlyO9P4+a1fA1KnNxCwvt7DCj9SANDGEpqXwyW+XS3ypl75 C9ab/XU9ckyhr3ZM5EdZb/tb9WN04M0vIe+JeaOrAwFfsWt1aOZ4ysRsZmVjZki2 jvaXEufuO9KqyCwIF0UIqUsgOyVsfVmE5u5hUql9YaWaK6khmekkg/ncb8azL8YK CsVw1ztTUblXLsYoi8RtkZnbJ+/4GR/guJ6Luf2Z5AMZkxbLrrklIyD3DtV59Z6q Oby6MA3c6zvdf9HNMOcAhstsbnEy9e98amo65MvCu38WmKVQbvwMhEKv1K/t2dqx dDsyqT7QTpTW0/50Q8MEWuk1XwGCywUZvopHSp1SL4K5jhKiD0Dfm9aPj5khS6TI KYO8QXQqKtvP+yX1pViXfxzt6Zbc3WYirRwVf3R+UZtjd0L/uSeKg8aP3XdmNOKQ oLkyMYRrODyHywQ5UzMM9LbZEMGDFwBOJjwTwONVzTCLKtUKV+iSmqq6HwiFeGAu WDN5dbZV4o6+NAotGPkTJjSHEnOLJTwwq7/y44G1qs7UlGRq3cehcJPVjtcSx0+k E/gNHsMBQLUFZNIDz1HLoRG/FaBlpAhkupeFik6H6nal+MS625TD7zoFAfqOZzXq zjP3kQavu5TQgoEICm1o =tanp -----END PGP SIGNATURE----- --=-=-=--