PDF Metadata Retrieval

51 views
Skip to first unread message

Aurimas Vinckevicius

unread,
Apr 4, 2012, 1:31:14 AM4/4/12
to zoter...@googlegroups.com
When retrieving PDF metadata, I was wondering why we're not running detectWeb before performing translation. I guess it's not that big of a deal, but it would clear up the number of errors being reported. I don't think the overhead is that huge, is it?

Aurimas

Simon Kornblith

unread,
Apr 4, 2012, 1:45:10 AM4/4/12
to zotero-dev
The overhead is minimal. There's no particular reason we don't do it,
besides that Zotero.Translate does not currently expose the ability to
run detect using only a specific translator in a nice way. (It's
implemented in Scaffold, but it's a hack.)

If you just want to get rid of the errors, you could make the
translator return before it tries to call Z.selectItems() if it's run
on a page with no results. Avram made this change a few months ago but
it turned out that it broke PDF metadata retrieval in Zotero 2.1. This
should be fixed in 3.0, but it's worth checking with a few PDFs to
make sure.

Simon

Aurimas Vinckevicius

unread,
Apr 4, 2012, 2:17:28 AM4/4/12
to zoter...@googlegroups.com
We could fairly easily do this with getTranslatorObject, I think. I rather like the idea that we get an error when selectItems is called without any items, since with normal user interaction, this should never happen. I wouldn't want to filter these out.

I'll cook up a patch that will perform detectWeb before translating, then you guys can figure out if it's worth patching or not.

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To post to this group, send email to zoter...@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.


Aurimas Vinckevicius

unread,
Apr 5, 2012, 12:19:39 AM4/5/12
to zoter...@googlegroups.com
I realize now how naive I must have sounded yesterday. Well, after going through the translator code like 20 times, I actually got something that works.


Would be excited to hear some input.

Aurimas

unread,
May 8, 2012, 5:05:35 PM5/8/12
to zoter...@googlegroups.com
It's a little odd to me that even with the patch, we're still getting a lot of "called select items with no items" errors. Could I get a URL or two from the list that are triggering these errors?
To unsubscribe from this group, send email to zotero-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages