Skip to content

Instantly share code, notes, and snippets.

View inukshuk's full-sized avatar

Sylvester Keil inukshuk

View GitHub Profile
M = 'M'
o = 'o'
X = 'X'
world = [
inukshuk / output
Created November 20, 2011 14:07
Pandoc CSL Tests for citeproc-js
require 'bibtex'
require 'citeproc/js'
repo = ''
data ='')
# styles to test
styles = %w{ aaa apa ama }
styles.each do |style|
inukshuk / result.html
Created July 15, 2012 13:18
CiteProc APA Style Example
<div class="csl-bib-body">
  <div class="csl-entry">Silva, G. M. H. da, Rademaker, A., Vasconcelos, D. R. de, Amaral, F. N. do, Martins, C. B., Costa, V., &#38; Haeusler, E. H. (2007). Dealing with the Formal Analysis of Information Security Policies through Ontologies: A Case Study. In <i>Third Australasian Ontology Workshop (AOW 2007)</i>. Sydney: Australian Computer Society.</div>
inukshuk / generate_dependent_style.rb
Last active December 15, 2015 13:09
Generate dependent CSL style
require 'csl' # gem install csl --pre
style = do |s|
s['class'] = 'in-text'
s['default-locale'] = 'en-US'
s.title = 'Natura' = ''
inukshuk / analyze.rb
Created May 3, 2013 09:42
Analyze CSL Styles Strip-Periods
require 'csl'
# Set the styles root directory
CSL::Style.root = '/Users/sylvester/Work/citeproc/styles'
# Set the locales root directory
CSL::Locale.root = '/Users/sylvester/Work/citeproc/locales'
# Either load all styles or those passed from command line.
# Calling the script with no arguments will go though all
inukshuk /
Last active December 21, 2020 21:54
Jekyll-Scholar Bibliography Template Example

This is a sample Jekyll-Scholar bibliography template. The file bibliography.html should be placed in the _layouts directory. Furthermore, this assumes you have a ./pdf directory: this directory contains all you PDFs or Postscripts (possibly in sub-directories of ./pdf), e.g.: ./pdf/Bartlett-2010-ICML.pdf and ./pdf/talks/Wood-2004-EMBS.pdf both work. You can specify the repository root folder using the repository configuration option.

The bibliography template assumes you have Bootstrap configured on your site.

inukshuk / Gemfile
Created January 27, 2014 21:44
Experiment with the CiteProc-Ruby pre-release!
source ''
gem 'citeproc', :git => ''
gem 'citeproc-ruby', :git => ''
gem 'csl', :git => ''
gem 'nokogiri' # not required: speeds up XML parsing
gem 'edtf' # not required: more advanced name parsers
gem 'bibtex-ruby'
inukshuk / expand.rb
Created May 6, 2014 06:59
Page Range Expander
#!/usr/bin/env ruby
require 'csl/styles'
require 'citeproc/ruby'
r =
while input = gets
puts r.format_page_range input, 'expanded'
inukshuk / predict.rb
Last active April 10, 2017 10:14
Citation Style Predicor
#!/usr/bin/env ruby
require 'csl/styles'
require 'citeproc/ruby'
require 'httparty'
require 'thread'
API_KEY = '' # Add your key here!
exit if API_KEY.empty?
inukshuk / _config.yml
Created January 21, 2015 11:59
Jekyll-Scholar: Highlight Author
- 'jekyll/scholar'
bibliography_template: "{{ reference | replace_first: 'Zelle, R. M.', '<b>Zelle, R. M.</b>' }}"