GovInfo Translator

From the list of translators on GitHub, it looks like GovInfo should be supported. (https://github.com/zotero/translators/blob/master/govinfo.js)

But, when I go to GovInfo, I cannot find a page that changes the Zotero Connector icon in Firefox to anything but "webpage." Following is an example of what I want to add. (https://www.govinfo.gov/app/details/BILLS-117hr3304rfs)

Maybe it is just something I am doing, or my setup, but can anyone else get Zotero to understand GovInfo sources? Thanks.
  • There's a bug in the underlying import that Zotero uses that affects the page you link to. We'll take a look, shouldn't be hard to fix.
    How about this one, does that work?
    https://www.govinfo.gov/app/details/GPO-WMD
  • Thanks for commenting so quickly. That link also does not work. I have not yet found a page on govinfo.gov that Zotero recognizes as anything but a Web page.

    For your reference if needed, my specifications are as follows:
    Zotero 6.0.15
    Zotero Connector 5.0.98
    Firefox 105.03
    Windows 11
  • And it shows the webpage icon (light blue) or the white document icon for the Save to Zotero button? If the former, does just reloading the page fix that?
  • No matter what item or title I start on, it seems to show the webpage icon. Reloading the page does not change the icon or Zotero's actions.

    For my original link to govinfo, if I go to the "Document in Context" tab rather than the summary tab, then I get what I think is the white icon for a "document." When I select the icon in Firefox, it gives the following error: "An error occurred saving with govinfo. Attempting to save using Embedded Metadata instead."

    For the link you sent, if I go to the "Document in Context" tab rather than the summary tab, I get the white document icon. When I select the icon in Firefox, it will correctly import metadata and not give an error. It does not download the document PDF.

    If I go to https://www.govinfo.gov/app/details/GPO-WMD/GPO-WMD-1-4/summary and then select the "Document in Context" tab rather than the summary tab, I get the white document icon. When I select the icon in Firefox, it will correctly import metadata and not give an error. This time it uses "Book section" as the item type. That seems correct. This time, it also correctly downloads the document PDF.
  • Yeah, so this:
    For my original link to govinfo, if I go to the "Document in Context" tab rather than the summary tab, then I get what I think is the white icon for a "document." When I select the icon in Firefox, it gives the following error: "An error occurred saving with govinfo. Attempting to save using Embedded Metadata instead."
    is due to the bug I mention above & a pretty easy fix.

    Everything else is trickier -- @AbeJellinek wrote the code on this, maybe he has an idea on how to make the code more robust. FWIW, though, toggling between the Summary & Document in Context tab looks like it will always "activate" the translator, so you can use that as a reliable workaround.
    I'd expect the translator to fail consistently for Bills and Hearings, though, until we fixed that issue.
  • @JoshuaLambertLib: Sorry for the delay on this. I've resolved the issues you found (thanks for reporting them!). Your Zotero Connector should auto-update within 24 hours, or you can update manually by clicking Update Translators in the Advanced pane of the Zotero Connector preferences. Could you give it a try and let me know if you have any further problems?
  • edited October 28, 2022
    @AbeJellinek: Thanks for taking the time to reply. Zotero now understands and consumes the document at the original link I posted at the top of this thread. It collects the HTML, XML, and PDF. That is beautiful. This is categorized as a bill.

    I'm not sure what all at GovInfo you try to make that translator work for, but it also worked for https://www.govinfo.gov/app/details/GPO-WMD/GPO-WMD-1-4/summary .

    On the other hand, it does not work on the link Adam Smith posted above. https://www.govinfo.gov/app/details/GPO-WMD and it consumes the XML and HTML of the following, but no the PDF. https://www.govinfo.gov/app/details/CZIC-qh76-2-m3-m36-1992/

    I know that GovInfo contains a wide variety of metadata structures and is adding features, so this is probably a moving target. Thanks for your good work.
Sign In or Register to comment.