fkguo / zotero-inspire

Zotero plugin, fetching publication metadata and cite counts (w/ and w/o self citations) from the INSPIRE-HEP database (and CrossRef cite counts for papers in other fields)
Mozilla Public License 2.0
121 stars 6 forks source link

is it possible to use inspire link as url instead of arxiv link? #8

Closed quarkquartet closed 5 months ago

quarkquartet commented 5 months ago

As shown in title.

Before i find this, I use inspire link in url and use arxiv link in archive.

I'm imagining to use inspire link in url with some plugin automatically. For now I do not know where is the best place to put the arxiv link together.

Any thoughts? Is it possible?

fkguo commented 5 months ago

As shown in title.

Before i find this, I use inspire link in url and use arxiv link in archive.

I'm imagining to use inspire link in url with some plugin automatically. For now I do not know where is the best place to put the arxiv link together.

Any thoughts? Is it possible?

yes it is possible. you can also find two tips in the readme, in the paragraph starting with "INSPIRE uses a unique recid", which can give you immediately the INSPIRE url.

Let me know whether you are satisfied by these tips.

I may also set an option to let the user to choose whether to use inspire or arxiv url when I have time.

quarkquartet commented 5 months ago

I just did it today but it does not work. My engine.json now looks like

[
    {
        "_name": "Google Scholar",
        "_alias": "Google Scholar",
        "_description": "Google Scholar Search",
        "_icon": "file:///Users/quarkquartet/Zotero/locate/Google%20Scholar%20Search.ico",
        "_hidden": false,
        "_urlTemplate": "https://scholar.google.com/scholar?as_q=&as_epq={z:title}&as_occt=title&as_sauthors={rft:aufirst?}+{rft:aulast?}&as_ylo={z:year?}&as_yhi={z:year?}&as_sdt=1.&as_sdtp=on&as_sdtf=&as_sdts=22&",
        "_urlParams": [],
        "_urlNamespaces": {
            "rft": "info:ofi/fmt:kev:mtx:journal",
            "z": "http://www.zotero.org/namespaces/openSearch#",
            "": "http://a9.com/-/spec/opensearch/1.1/"
        },
        "_iconSourceURI": "https://scholar.google.com/favicon.ico"
    },
    {
        "_name": "INSPIRE",
        "_alias": "INSPIRE",
        "_description": "INSPIRE",
        "_icon": "https://inspirehep.net/favicon.ico",  // or local path to the INSPIRE icon,
        "_hidden": false,
        "_urlTemplate": "https://inspirehep.net/literature/{z:archiveLocation}",
        "_urlNamespaces": {
            "z": "http://www.zotero.org/namespaces/openSearch#"
        }
    },
    {
        "_name": "INSPIRE Citations",
        "_alias": "INSPIRE Citations",
        "_description": "INSPIRE citing papers",
        "_icon": "https://inspirehep.net/favicon.ico", 
        "_hidden": false,
        "_urlTemplate": "https://inspirehep.net/literature?q=refersto%3Arecid%3A{z:archiveLocation}",
        "_urlNamespaces": {
            "z": "http://www.zotero.org/namespaces/openSearch#"
        }
    },
]

Then I tried to update one of my entry manually after restarting zotero, now it still looks like:

image

Any thoughts?

Thank you for your reply.

fkguo commented 5 months ago

Hi, by "does not work", do you mean that the url shown in the URL slot is still the arxiv url instead of the INSPIRE one? editing the engine.json file does not change the url, but gives you a link to the INSPIRE page. Click the following button (I'm using Zotero 7; but Zotero 6 has the same functionality): image you will get the following image which can lead you to the inspire page of the article and the page listing all papers citing that article.

using Actions & Tags plugin following the other tip I referred to allows you to copy the inspire url with keyboard shortcut.

quarkquartet commented 5 months ago

That sounds even better than I imagine. But I feel strange. I'm new to zotero 7 (used to be 6). I tried to click the button at the bottom in your first figure and nothing happens.

fkguo commented 5 months ago

That sounds even better than I imagine. But I feel strange. I'm new to zotero 7 (used to be 6). I tried to click the button at the bottom in your first figure and nothing happens.

that is strange, it sounds like there is some problem with your lookup engines. You may try to ask what could have caused that in the Zotero forum.