-
Notifications
You must be signed in to change notification settings - Fork 81
Home
Finn Årup Nielsen edited this page Aug 29, 2018
·
34 revisions
cat > hellocitation.tex <<EOF
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Hello, Citation}
\author{Finn Årup Nielsen}
\begin{document}
\maketitle
Hello, Citation \cite{Q21133507},
and \cite{10.1186/S13321-016-0161-3}.
\bibliographystyle{unsrt}
\bibliography{hellocitation}
\end{document}
EOF
pdflatex hellocitation.tex
python -m scholia.tex write-bib-from-aux hellocitation.aux
bibtex hellocitation
pdflatex hellocitation.tex
pdflatex hellocitation.tex
You can get a Scholia link on the left panel in Wikidata if you have an account there.
A Javascript file, say User:Fnielsen/scholia-link.js
, may be setup:
( function( mw, $ ) {
// Partially from https://www.wikidata.org/wiki/User:Ls1g/recoin-core.js
'use strict';
console.log('scholia-link loaded');
// Magnus Manske's check for item
// https://www.wikidata.org/wiki/User:Magnus_Manske/missing_props.js
if ( mw.config.get('wgNamespaceNumber') != 0 ) return ;
if ( mw.config.get('wgAction') != 'view' ) return ;
var entityID = mw.config.get( 'wbEntityId' );
function init()
{
$('#p-tb').find('ul').append('<li><a href="https://tools.wmflabs.org/scholia/' + entityID + '">Scholia</a></li>')
}
$( function () {
mw.hook( 'wikipage.content' ).add( init );
});
} ( mediaWiki, jQuery ) );
The Javascript file can be included by adding a line in your commons.js
file, e.g., User:Fnielsen/common.js
:
// importScript( 'User:Fnielsen/scholia-link.js' ); // Said to be an old format
mw.loader.load('//www.wikidata.org/w/index.php?title=User:Fnielsen/scholia-link.js&action=raw&ctype=text/javascript');
https://tools.wmflabs.org/?status
egrep "^\[pid:" uwsgi.log | grep -v "GET /scholia/static/" | grep -v "GET /scholia/images/" | grep -v "HEAD /scholia" | awk '{print $12 " " $13 " " $14 " " $15 " " $16 " " $18 }' > stats.txt
Login to login.tools.wmflabs.org
become scholia
source ~/www/python/venv/bin/activate
cd ~/www/python/scholia ; git pull
pip install -rrequirements.txt
webservice2 uwsgi-python restart # Wait and pray
tail -f ~/uwsgi.log # look at web log