jupyter_markdown_citations
Formatted Reference Links for Jupyter Notebook using .bib files
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
-
✓DOI references
Found 3 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.0%) to scientific vocabulary
Keywords
Repository
Formatted Reference Links for Jupyter Notebook using .bib files
Basic Info
- Host: GitHub
- Owner: michaelplews
- Language: JavaScript
- Default Branch: master
- Size: 3.58 MB
Statistics
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 2
- Releases: 2
Topics
Metadata Files
README.md
Formatted Reference Links for Jupyter Notebooks based on .bib Files
Example

Output gives <a href=http://dx.doi.org/...></a> link to the original paper with title text full citation:
Nanocrystals, such as those produced by Zhang et. al., 2012 posses interesting interfacial chemistry.
This exact reference used in custom_bibliography.js can be found here.
Installation
This requires the bibtex-parser package also.
First, download the dependencies and package to the ~/.jupyter/custom location
bash
mkdir ~/.jupyter/custom
cd ~/.jupyter/custom
git clone git@github.com:mikolalysenko/bibtex-parser.git
git clone git@github.com:michaelplews/jupyter_markdown_citations.git
cd jupyter_markdown_citations
Next, symlink (or copy) your .bib file (mine is exported from Mendeley) to the same folder: ```bash ln -s /directory/to/bibfile.bib #for symlinking cp /directory/to/bibfile.bib . #for copying
only use one of the above options
```
Generate the custombibliography.js file with the makebibjs.py file:
```bash
python makebibjs.py bibfile.bib
Lastly, add this app to your custom.js file:
bash
cd ~/.jupyter/custom
echo "require(['custom/jupytermarkdowncitations/citations']);" >> custom.js
```
Reloading your .iPyNb page in the browser should now load this package.
Enjoy!
Owner
- Name: Michael Plews
- Login: michaelplews
- Kind: user
- Location: San Francisco Bay Area
- Company: Lawrence Berkeley National Laboratory
- Repositories: 2
- Profile: https://github.com/michaelplews
Researcher at Lawrence Berkeley National Laboratory. My projects include those for data analysis during my research, and hobby projects.
Citation (citations.js)
require(['custom/bibtex-parser/parse-bibtex']);
require(['custom/jupyter_markdown_citations/custom_bibliography']);
appName = 'jupyter_markdown_citations'
function parseBib(){
json = doParse(bibliography);
console.log(appName + ': ', 'bibliography json-ified');
return json
}
function searchCite(){
var citations = document.getElementsByTagName("cite")
//If seachCite() called before parseBib(), do parseBib()
if (json == null){
parseBib()
}
for(var i = 0; i < citations.length; i++){
citRef = citations[i].innerHTML.toUpperCase();
citation=citations[i];
a=document.createElement('a');
citation.parentNode.replaceChild(a, citation);
a.innerHTML = json[citRef].AUTHOR.replace('{','').replace('}','').split(',')[0] + " et. al., " + json[citRef].YEAR;
a.setAttribute('href', "http://dx.doi.org/" + json[citRef].DOI);
a.setAttribute('title',
json[citRef].TITLE.replace('{','"').replace('}','"') + ', '
+ json[citRef].JOURNAL + ', vol. '
+ json[citRef].VOLUME + ', pg. '
+ json[citRef].PAGES + ', '
+ json[citRef].MONTH.charAt(0).toUpperCase() //Capitalize first letter
+ json[citRef].MONTH.slice(1) + '. ' //Add remainder of string
+ json[citRef].YEAR);
console.log(appName + ': ', citRef + ' referenced');
};
}
setTimeout(function(){parseBib();},5000); //First json will be undefined unless this has a long timeout (bib files are big)
setTimeout(function(){searchCite();},5500);
setInterval(function(){searchCite();},2000);
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 5
- Total pull requests: 0
- Average time to close issues: about 2 hours
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.6
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- michaelplews (5)