Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (3.0%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
·
Repository
My site hosted on github
Basic Info
- Host: GitHub
- Owner: blester125
- License: other
- Language: HTML
- Default Branch: master
- Size: 102 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 8
- Releases: 0
Created over 6 years ago
· Last pushed 6 months ago
Metadata Files
Readme
Citation
README.md
https://blester125.com
My personal site hosted on github pages. Supports HTTPs and uses a custom domain for blester125.com and www.blester125.com.
Publications and blog entries are populated automatically from a combination of bibtex and json files. The header and footer are shared and loaded dynamically on the page. The blog tag index page is generated dynamically based on the blog posts that have been created. Given that this is all github pages, everything dynamic is a mix of JQuery and Vue.js. Citation counts are automatically pulled from Semantic Scholar.
See the Wiki for notes on deployment, debugging, and extensions.
Owner
- Name: Brian Lester
- Login: blester125
- Kind: user
- Website: blester125.com
- Repositories: 23
- Profile: https://github.com/blester125
Citation (citations.py)
"""Update the references.json file with latest counts."""
from datetime import datetime
import json
import os
import sys
import requests
def get_citation_count(paper_id, api_key=None):
url = f"https://api.semanticscholar.org/graph/v1/paper/{paper_id}?fields=citationCount"
# Use requests as the default urllib library auto capitalizes fields like "x-api-key"
# to "X-api-key" and the semantic scholar server seems to be case-sensitive even though
# they should not be according to RFC 2616.
headers = {"x-api-key": api_key} if api_key else {}
r = requests.get(url, headers=headers)
if r.status_code != 200:
raise ValueError("Invalid Response!")
data = r.json()
return data["citationCount"]
def date():
return datetime.now().strftime("%Y/%m/%d")
def main():
if len(sys.argv) == 1:
raise ValueError("usage: python citations.py references.json")
api_key = os.environ.get("SEMANTIC_SCHOLAR_API_KEY")
if api_key is not None:
print("USING API KEY")
today = date()
filename = sys.argv[1]
with open(filename) as f:
references = json.load(f)
new_references = []
for reference in references:
if reference.get("semantic_scholar_id") != None:
print(f"Checking: {reference['title']}")
try:
new_count = get_citation_count(reference["semantic_scholar_id"], api_key)
reference["citation_count"] = new_count
reference["fallback_citation_count_date"] = today
except ValueError:
pass
new_references.append(reference)
assert len(new_references) == len(references)
with open(f"{filename}", "w") as w:
json.dump(new_references, w, indent=2)
if __name__ == "__main__":
main()
GitHub Events
Total
- Push event: 1,279
Last Year
- Push event: 1,279