This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'csl/styles' | |
require 'citeproc/ruby' | |
r = CiteProc::Ruby::Renderer.new | |
while input = gets | |
puts r.format_page_range input, 'expanded' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101d100 | |
< "rightleftharpoons" => "<mo>⇌</mo>", | |
179c178 | |
< "eqslantgtr" => "<mo>⋝</mo>", | |
--- | |
> #"eqslantgtr" => "<mo>⋝</mo>", | |
229d227 | |
< "ntrianglelefteq" => "<mo>⋬</mo>", | |
245d242 | |
< "nsupseteq" => "<mo>⊉</mo>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the-open-university-numeric-superscript#publisher bulletin-de-la-societe-prehistorique-francaise#publisher who-europe-harvard#publisher the-open-university-numeric#publisher archeologie-medievale#publisher universita-pontificia-salesiana-es#publisher universita-pontificia-salesiana-it#publisher harvard-university-of-wolverhampton#publisher revista-de-filologia-espanola#publisher harvard-university-of-greenwich#publisher indoor-air#publisher organization-science#publisher harvard-leeds-metropolitan-university#publisher the-journal-of-eukaryotic-microbiology#publisher universita-pontificia-salesiana-pt-br#publisher universita-pontificia-salesiana-fr#publisher traces#publisher universita-di-bologna-lettere#publisher gallia#publisher who-europe-numeric#publisher universita-pontificia-salesiana#publisher the-open-university-harvard#publisher the-open-university-a251#publisher water-science-and-technology#publisher socio-economic-review#publisher oxford-the-university-of-new-south-wales#publisher universita-pontifi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M = 'M' | |
o = 'o' | |
X = 'X' | |
world = [ | |
[o,o,o,o,o,M,o,o,o,o,o], | |
[o,o,o,o,M,M,o,o,o,o,o], | |
[o,o,o,o,o,M,o,o,M,M,o], | |
[o,o,o,M,o,M,o,o,o,M,o], | |
[o,o,o,o,o,M,M,o,o,o,o], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bibtex' | |
require 'citeproc/js' | |
repo = 'https://raw.github.com/citation-style-language/styles/master/' | |
data = BibTeX.open('http://johnmacfarlane.net/pandoc/csltest/biblio.bib') | |
# styles to test | |
styles = %w{ aaa apa ama } | |
styles.each do |style| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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., & 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> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csl' # gem install csl --pre | |
style = CSL::Style.new do |s| | |
s['class'] = 'in-text' | |
s['default-locale'] = 'en-US' | |
s.title = 'Natura' | |
s.id = 'http://www.zotero.org/styles/natura.csl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'citeproc', :git => 'https://github.com/inukshuk/citeproc.git' | |
gem 'citeproc-ruby', :git => 'https://github.com/inukshuk/citeproc-ruby.git' | |
gem 'csl', :git => 'https://github.com/inukshuk/csl-ruby.git' | |
gem 'nokogiri' # not required: speeds up XML parsing | |
gem 'edtf' # not required: more advanced name parsers | |
gem 'bibtex-ruby' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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? |
OlderNewer