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
/** | |
* Get the ePub download link for a post | |
* | |
* @param int $id | |
* @return string | |
*/ | |
function anno_epub_download_url($id = null) { | |
# Requires ePub Export Plugin, returns "" if ePub Export Plugin didn't create ePub file | |
$article_id = get_the_ID(); | |
$uploads = wp_upload_dir(); |
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
class Wikipedia < Source | |
# List of Wikipedias to search, we are using 20 most popular wikis | |
# Taken from http://toolserver.org/~dartar/cite-o-meter/?doip=10.1371 | |
LANGUAGES = %w(en de fr it pl es ru ja nl pt sv zh ca uk no fi vi cs hu ko commons) | |
validates_each :url do |record, attr, value| | |
record.errors.add(attr, "can't be blank") if value.blank? | |
end | |
def get_data(article, options={}) |
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
#' Venn diagram F1000 vs. Wikipedia for PLOS ALM | |
#' | |
#' @author Martin Fenner <[email protected]> | |
# Read in required functions | |
library("plyr") | |
library(VennDiagram) | |
# Options | |
report_date <- "2013-09-11" |
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
library(alm) | |
dois <- c("10.1371/journal.pbio.1001535","10.1371/journal.pone.0046362","10.1371/journal.pmed.0020124","10.1371/journal.pntd.0001969","10.1371/journal.pone.0040259") | |
api_key <- "YOUR_KEY" | |
response <- almevents(doi=dois, source="twitter",key=api_key) | |
events <- data.frame() | |
for (i in 1:length(dois)) { | |
row <- response[[i]][["twitter"]] |
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
############################################################################# | |
# | |
# Modified version of jekyllrb Rakefile | |
# https://github.com/jekyll/jekyll/blob/master/Rakefile | |
# | |
############################################################################# | |
require 'rake' | |
require 'jekyll' | |
require 'date' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>homebrew.mxcl.nomad</string> | |
<key>LimitLoadToSessionType</key> | |
<array> |