Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
gatsby-source-google-scholar
Advanced tools
Readme
Gatsby source plugin for pulling metadata on scientific publications from Google Scholar.
See the example
directory for the demo's source code.
yarn add gatsby-source-google-scholar
Include the plugin in your gatsby-config
and specify your queries.
// gatsby-config.js
module.exports = {
siteMetadata: {
...
},
plugins: [
{
resolve: `gatsby-source-google-scholar`,
options: {
queries: [`richard feynman`, `albert einstein`],
},
},
],
}
Specify the metadata you need in a GraphQL query. Here's everything available.
{
allGoogleScholar {
nodes {
id
title
url
authors {
name
url
}
preEtAl
postEtAl
abstract
year
journal
pdfUrl
citedByCount
citedByUrl
relatedUrl
allVersionsUrl
}
}
}
If you're only interested in the results for one of your queries, simply filter your results like so:
{
pubs: allGoogleScholar(
filter: { internal: { query: { eq: "richard feynman" } } }
) {
nodes {
title
url
}
}
}
preEtAl
and postEtAl
are booleans indicating whether Google used ellipsis to signal additional authors before or after the list of authors matching your query, as in this example:
Here's an example of the data you'll get.
{
"data": {
"allGoogleScholar": {
"nodes": [
{
"id": "3e2dc5b6-bab2-5b3f-a9be-a9c17c9a8b28",
"title": "Can quantum-mechanical description of physical reality be considered complete?",
"url": "https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777",
"authors": [
{
"name": "A Einstein",
"url": "https://scholar.google.com/citations?user=qc6CJjYAAAAJ&hl=en&oe=ASCII&oi=sra"
},
{
"name": "B Podolsky",
"url": null
},
{
"name": "N Rosen",
"url": null
}
],
"preEtAl": false,
"postEtAl": false,
"abstract": "In a complete theory there is an element corresponding to each element of reality. A sufficient condition for the reality of a physical quantity is the possibility of predicting it with certainty, without disturbing the system. In quantum mechanics in the case of two physical …",
"year": 1935,
"journal": "Physical review",
"pdfUrl": "https://link.aps.org/pdf/10.1103/PhysRev.47.777",
"citedByCount": 17404,
"citedByUrl": "https://scholar.google.com/scholar?cites=8174092782678430881&as_sdt=2005&sciodt=0,5&hl=en&oe=ASCII",
"relatedUrl": "https://scholar.google.com/scholar?q=related:odSh4BM2cHEJ:scholar.google.com/&scioq=albert+einstein&hl=en&oe=ASCII&as_sdt=0,5",
"allVersionsUrl": "https://scholar.google.com/scholar?cluster=8174092782678430881&hl=en&oe=ASCII&as_sdt=0,5"
},
{
"id": "32a662f0-142e-5f9b-b7fb-cb0d8b70bac6",
"title": " Investigations on the Theory of the Brownian Movement",
"url": "https://books.google.com/books?hl=en&lr=&id=X5iRDQAAQBAJ&oi=fnd&pg=PA139&dq=albert+einstein&ots=-VS5f8ayBe&sig=2bA1xJZq6QKA6htCxiKGsXV8a3o",
"authors": [
{
"name": "A Einstein",
"url": "https://scholar.google.com/citations?user=qc6CJjYAAAAJ&hl=en&oe=ASCII&oi=sra"
}
],
"preEtAl": false,
"postEtAl": false,
"abstract": "The\" Brownian movement\" was first described in 1828 by the botanist Robert Brown. While investigating the pollen of several different plants, he observed that pollen dispersed in water in a great number of small particles which he perceived to be in uninterrupted and …",
"year": 1956,
"journal": "",
"pdfUrl": "https://www.hispacultur.org/book/516512150/download-investigations-on-the-theory-of-the-brownian-movement-albert-einstein.pdf",
"citedByCount": 4345,
"citedByUrl": "https://scholar.google.com/scholar?cites=13746912682491308133&as_sdt=2005&sciodt=0,5&hl=en&oe=ASCII",
"relatedUrl": "https://scholar.google.com/scholar?q=related:Zeg0HkDYxr4J:scholar.google.com/&scioq=albert+einstein&hl=en&oe=ASCII&as_sdt=0,5",
"allVersionsUrl": "https://scholar.google.com/scholar?cluster=13746912682491308133&hl=en&oe=ASCII&as_sdt=0,5"
}
]
}
}
}
The HTTP response received from request
seems to break HTML entity encoding. As a result some special characters (like German umlauts) are currently not displayed correctly. PRs welcome!
FAQs
Gatsby source plugin for pulling metadata of scientific publications from Google Scholar
The npm package gatsby-source-google-scholar receives a total of 0 weekly downloads. As such, gatsby-source-google-scholar popularity was classified as not popular.
We found that gatsby-source-google-scholar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.