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 https://hypothes.is/api/search?user=arxiv&limit=30 | |
{ | |
"total": 26, | |
"rows": [ | |
{ | |
"updated": "2015-07-10T16:19:44.647522+00:00", | |
"target": null, | |
"created": "2015-07-10T16:19:44.647511+00:00", | |
"text": "[This article](http://arxiv.org/abs/0704.0354) was referenced by [\"179. Followup on ekpyrosis and phoenix universe\"](http://www.nonequilibrium.net/179-followup-ekpyrosis-phoenix-universe/) on Thursday, January 13 2000.", |
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
Here's an API query that retrieves an annotation: | |
https://hypothes.is/api/annotations/AC0wFYQFQMGCSDQ9nfFW0A | |
Looking inside the result we find these equivalences: | |
"link": [ | |
{ | |
"href": "http://jcs.biologists.org/content/127/14/3052.long" | |
}, |
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 requests, re, json, types, traceback | |
class HypothesisAnnotation: | |
def __init__(self, row): | |
"""Encapsulate relevant parts of one row of a Hypothesis API search.""" | |
self.tags = [] | |
if row.has_key('tags') and row['tags'] is not None: | |
self.tags = row['tags'] |
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
Homepage: | |
javascript:(function(){window.hypothesisConfig=function(){return{showHighlights:true};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/app/embed.js');d.body.appendChild(s)})(); | |
Dev env: | |
javascript:%28function %28window%2C document%2C location%29 %7B%0A var embedUrl %3D %27http%3A//localhost%3A5000/embed.js%27%3B%0A var isHTTPS %3D location.protocol.indexOf%28%27https%27%29 %3D%3D%3D 0%3B%0A var isEmbedHTTPS %3D embedUrl.indexOf%28%27https%27%29 %3D%3D%3D 0%3B%0A var isLocal %3D location.protocol %3D%3D%3D %27file%3A%27%3B%0A var isPDF %3D location.pathname.toLowerCase%28%29.indexOf%28%27.pdf%27%29 > 0%3B%0A var hasPDFjs %3D typeof window.PDFJS %21%3D%3D %27undefined%27%3B%0A var embed%3B%0A%0A if %28isLocal %26%26 %21isPDF%29 %7B%0A window.alert%28%27Sorry%2C Hypothesis doesn%5C%27t work on this type of file. Only PDF%5C%27s can be annotated locally.%27%29%3B%0A return%3B%0A %7D%0A if %28isPDF %26%26 %21hasPDFjs%29 %7B%0A window.alert%28%27S |
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
/* | |
npm install dom-anchor-text-quote | |
npm install dom-seek | |
npm install jquery | |
browserify sitc.js -o sitc-bundle.js | |
*/ | |
/* | |
<script src="./sitc-bundle.js"></script> |
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 requests, json, re | |
backlog_triage_list = '55c39b276b173fdfaef897f1' | |
backlog_not_prioritized_list = '55a3fb6903a766588973e8c5' | |
backlog_backlog_list = '55796ed5c0e8c6a2f25dba6e' | |
sprint_up_next = '557936eed7f9bf6d2dd1521e' | |
sprint_in_progress = '5578c7a3f955667e94879086' | |
sprint_deployed = '555cab97ea82d6a4151b7f92' | |
sprint_delivered = '555cb1ea055301c6f20e50df' |
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
/* | |
npm install dom-anchor-text-quote | |
npm install dom-seek | |
npm install jquery | |
npm install xpath-range | |
browserify anchor.js -o anchor-bundle.js | |
*/ | |
/* |
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
{ | |
"rows": [ | |
{ | |
"updated": "2015-06-15T21:31:28.144726+00:00", | |
"group": "__world__", | |
"target": [ | |
{ | |
"scope": [ | |
"http://blog.jonudell.net" | |
], |
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, requests, re, traceback, pyramid, urlparse | |
from lxml import etree | |
try: | |
from urllib.parse import urlencode | |
except ImportError: | |
from urllib import urlencode | |
host = 'h.jonudell.info' # or your own | |
port = 8081 | |
host_port = 'http://' + host + ':' + str(port) |
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
{ | |
"target": [{ | |
"scope": ["http://www.jneurosci.org/content/35/20/7777.full"], | |
"selector": [{ | |
"exact": "nif-0000-30467", | |
"prefix": "f Health; ", | |
"type": "TextQuoteSelector", | |
"suffix": ") and lesio" | |
}] | |
}], |