This file contains hidden or 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 python | |
| import csv | |
| csv.register_dialect('custom', | |
| delimiter=',', | |
| doublequote=True, | |
| escapechar=None, | |
| quotechar='"', | |
| quoting=csv.QUOTE_MINIMAL, |
This file contains hidden or 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 python | |
| import sys | |
| import re | |
| from lxml import etree | |
| from urlparse import urlparse | |
| from rdflib import Literal, Namespace, URIRef, ConjunctiveGraph | |
| """ | |
| convert an atom feed from google reader into BIBO RDF | |
| """ |
This file contains hidden or 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
| $ git log --date=iso --pretty=format:"%ad" -1 apa.csl |
This file contains hidden or 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
| <?php | |
| include('lib/glip.php'); | |
| $repo = new Git('test.git'); | |
| $master_name = $repo-->getTip('master'); | |
| $master = $repo-->getObject($master_name); | |
| ?> |
This file contains hidden or 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 'rubygems' | |
| require 'grit' | |
| include Grit | |
| repo = Repo.new('styles') | |
| # get head | |
| head = repo.commits.first | |
| # get date for commit |
This file contains hidden or 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
| /* see also http://www.milesj.me/resources/snippet/13 */ | |
| function slugify(text) { | |
| return text.toLowerCase().replace(/(_|\s)/g, "-"); | |
| } |
This file contains hidden or 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
| # Goal: | |
| # $ npm install citenode | |
| # $ citenode start [optional parameters] | |
| # etc. | |
| # Should be completely independent of any particular | |
| # application. | |
| express = require 'express' | |
| fugue = require 'fugue' | |
| citeproc = require 'citeproc' |
This file contains hidden or 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
| [ | |
| { | |
| "docTitle":[ | |
| { | |
| "Str":"The" | |
| }, | |
| "Space", | |
| { | |
| "Str":"Title" | |
| } |
This file contains hidden or 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
| import json, urllib, os | |
| repo = 'citation-style-language/styles' | |
| def list(): | |
| response = urllib.urlopen('http://github.com/api/v2/json/blob/full/' + repo + '/master') | |
| content = response.read() | |
| files = json.loads(content) | |
| for file in files['blobs']: | |
| name = file['name'] |
This file contains hidden or 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
| $ curl http://github.com/api/v2/json/blob/all/citation-style-language/styles/master |