This document details the h
application's public HTTP API. It is targeted at developers interested in integrating functionality from Hypothesis into their own applications.
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
/*\ | |
title: $:/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js | |
type: application/javascript | |
module-type: syncadaptor | |
A sync adaptor module for synchronising with Couch compatible servers | |
\*/ | |
(function () { |
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
(function() { | |
function getParas($item) { | |
debugger; | |
var s = ''; | |
var href = $item.parent('.story').prev('.header').find('a').attr('href') | |
var id = href.match(/[^\/]+$/)[0]; | |
var paras = $('#' + id).find('.paragraph p'); | |
for ( var i = 0; i < paras.length; i++ ) { | |
var p = paras[i].innerText.substr(0,50) + ' ...'; |
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
11:58:31 AM judell nickstenn: thoughts on h/issues/2095 re: 1) syntax normalization across /stream and /api, 2) behavior normalization (search works differently) | |
11:59:11 AM nickstenn h#2095 | |
11:59:12 AM vannevar Normalize URL syntax and query behavior across /api and /stream: https://github.com/hypothesis/h/issues/2095 | |
11:59:23 AM GitHub64 joined the channel. | |
11:59:23 AM -GitHub64- [h] nickstenning force-pushed 1916-stream-cards from 1862529 to fe5cd6c: https://github.com/hypothesis/h/commits/1916-stream-cards | |
11:59:23 AM -GitHub64- h/1916-stream-cards fe5cd6c Gergely Ujvari: Fix controller tests | |
11:59:23 AM GitHub64 left the channel. | |
11:59:49 AM tilgovi judell: I'd like to see that come as a natural consequence of unifying those code paths completely | |
12:00:15 PM tilgovi there's some interesting query parsing stuff going on, client and server, that can likely be vastly simplified | |
12:00:35 PM judell so now it's split between python and js? |
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
import json, urllib2 | |
from feedgen.feed import FeedGenerator | |
from BaseHTTPServer import BaseHTTPRequestHandler | |
import urlparse, operator | |
class GetHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
if not "method=" in self.path: |
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
Stream: | |
https://hypothes.is/stream?q=uri:http:%2F%2Farstechnica.com%2Fgaming%2F2015%2F04%2Fvalve-software-co-founder-gabe-newell-becomes-a-video-game-character%2F | |
Found one result. Clear search. | |
Sorted by newest | |
Newest | |
Oldest | |
judell on “Valve Software co-founder Gabe…” (arstechnica.com) an hour ago | |
Valve Software co-founder Gabe Newell becomes a video game character |
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
curl --head -k https://hypothes.is | |
HTTP/1.1 200 OK | |
Server: nginx | |
Date: Tue, 14 Apr 2015 16:36:57 GMT | |
curl --head -k https://hypothes.is/blog | |
HTTP/1.1 502 Bad Gateway | |
Server: nginx | |
Date: Tue, 14 Apr 2015 16:37:03 GMT |
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
Command "/home/jon/.virtualenvs/h/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-sRqn9q/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vhLhiu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/jon/.virtualenvs/h/include/site/python2.7/cffi" failed with error code 1 in /tmp/pip-build-sRqn9q/cffi | |
make: *** [deps] Error 1 |
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
username = 'judell' | |
link = 'http://hypothes.is/ACTIVATION' | |
code = '12345' | |
domain = 'https://hypothes.is' | |
emailtext = """Hello {username}, | |
Someone requested resetting your password. If it was | |
you, please reset your password with this reset code: |
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
import json | |
f = open('c:\\users\\jon\\all_annos.json','r') | |
s = f.read().decode('utf-8') | |
j = json.loads(s) | |
s = '' | |
all_tags = {} |
OlderNewer