Skip to content

Instantly share code, notes, and snippets.

@rdhyee
Last active December 26, 2015 11:49
Show Gist options
  • Save rdhyee/7146319 to your computer and use it in GitHub Desktop.
Save rdhyee/7146319 to your computer and use it in GitHub Desktop.
first steps at figuring out hypothes.is API -- now can login and page through results
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"from hypothesis_settings import USERNAME, PASSWORD\n",
"import requests\n",
"import json\n",
"\n",
"# do get to get 2 tokens CSFR\n",
"# https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet\n",
"# http://list.hypothes.is/archive/dev/2013-10/0000096.html\n",
"# GET request /app and take the value of the beaker.session.id and XSRF-TOKEN Set-Cookie headers. \n",
"# Pass these both back in the POST request in the Cookie header.\n",
"\n",
"# http://www.python-requests.org/en/v1.1.0/user/quickstart/#cookies\n",
"\n",
"url = \"https://hypothes.is/app\"\n",
"r = requests.get(url)\n",
"cookies = r.cookies\n",
"\n",
"payload = {\"username\":USERNAME,\"password\":PASSWORD}\n",
"\n",
"data = json.dumps(payload)\n",
"headers = {'content-type':'application/json;charset=UTF-8'}\n",
"\n",
"r = requests.post(url=\"https://hypothes.is/app?__formid__=login\", data=data, cookies=cookies, headers=headers)\n",
"\n",
"if r.json()['flash'].get('success') == ['You are now logged in.']:\n",
" token = r.json()['model']['token']\n",
"else:\n",
" token = None\n",
" "
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# https://hypothes.is/a/ByQV3a_4R9KNq8VfatbxFQ -- public\n",
"# DtiypTBrTVSVAVmPNh7koQ -- private\n",
"\n",
"url = \"https://api.hypothes.is/annotations/{a_id}\".format(a_id='DtiypTBrTVSVAVmPNh7koQ')\n",
"print url\n",
"headers = {\"X-Annotator-Auth-Token\": token}\n",
"\n",
"r = requests.get(url, headers = headers)\n",
"annotation = r.json()\n",
"annotation\n",
"#annotation[\"id\"], annotation[\"quote\"], annotation[\"text\"], annotation[\"uri\"]"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"https://api.hypothes.is/annotations/DtiypTBrTVSVAVmPNh7koQ\n"
]
},
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 2,
"text": [
"{u'consumer': u'00000000-0000-0000-0000-000000000000',\n",
" u'created': u'2013-10-24T22:04:01.711819+00:00',\n",
" u'id': u'DtiypTBrTVSVAVmPNh7koQ',\n",
" u'permissions': {u'admin': [u'acct:[email protected]'],\n",
" u'delete': [u'acct:[email protected]'],\n",
" u'read': [u'acct:[email protected]'],\n",
" u'update': [u'acct:[email protected]']},\n",
" u'quote': u'Shipmates',\n",
" u'ranges': [{u'endContainer': u'/section[1]/p[6]',\n",
" u'endOffset': 10,\n",
" u'startContainer': u'/section[1]/p[6]',\n",
" u'startOffset': 1}],\n",
" u'reply_list': [],\n",
" u'target': [{u'$$hashKey': u'012',\n",
" u'quote': u'Shipmates',\n",
" u'selector': [{u'endContainer': u'/section[1]/p[6]',\n",
" u'endOffset': 10,\n",
" u'startContainer': u'/section[1]/p[6]',\n",
" u'startOffset': 1,\n",
" u'type': u'RangeSelector'},\n",
" {u'exact': u'Shipmates',\n",
" u'prefix': u'at fish to swallow up Jonah.\\u2019\\u201d \\u201c',\n",
" u'suffix': u', this book, containing only fou',\n",
" u'type': u'TextQuoteSelector'},\n",
" {u'end': 1967, u'start': 1958, u'type': u'TextPositionSelector'}],\n",
" u'source': u'http://epubjs-reader.appspot.com//moby-dick/OPS/chapter_009.xhtml'}],\n",
" u'text': u'A highly resonant appellation for the congregation. ',\n",
" u'updated': u'2013-10-24T22:04:01.711834+00:00',\n",
" u'uri': u'http://epubjs-reader.appspot.com//moby-dick/OPS/chapter_009.xhtml',\n",
" u'user': u'acct:[email protected]'}"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Read all annotations for given user"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"paging?"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# NOT https://hypothes.is/stream#?user=rdhyee\n",
"# https://api.hypothes.is/search?user=acct:[email protected] "
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from itertools import islice\n",
"from urllib import urlencode\n",
"\n",
"def search(user, offset=0):\n",
" \n",
" headers = {\"X-Annotator-Auth-Token\": token}\n",
" page_size = 10\n",
" user_acct = \"acct:{user}@hypothes.is\".format(user=user)\n",
" \n",
" limit=page_size\n",
" \n",
" more_results = True\n",
"\n",
" while more_results:\n",
" search_dict = {'user':user_acct, 'limit':limit, 'offset':offset}\n",
" url = \"https://api.hypothes.is/search?{query}\".format(query=urlencode(search_dict))\n",
" \n",
" r = requests.get(url, headers=headers)\n",
" rows = r.json().get(\"rows\")\n",
" \n",
" if len(rows):\n",
" for row in rows:\n",
" yield row\n",
" offset += page_size\n",
" else:\n",
" more_results = False\n",
"\n",
"\n",
"for (i,row) in enumerate(search(user='rdhyee', offset=0)):\n",
" print i, row\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0 {u'updated': u'2013-10-26T17:50:57.031743+00:00', u'target': [{u'source': u'http://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/', u'quote': u'Vannevar Bush', u'$$hashKey': u'00G', u'selector': [{u'endContainer': u'/div[5]/div[2]/div[1]/article[1]/div[6]/p[1]/i[1]', u'endOffset': 83, u'type': u'RangeSelector', u'startOffset': 70, u'startContainer': u'/div[5]/div[2]/div[1]/article[1]/div[6]/p[1]/i[1]'}, {u'exact': u'Vannevar Bush', u'prefix': u'c Research and Development, Dr.', u'type': u'TextQuoteSelector', u'suffix': u'has coordinated the activities'}, {u'start': 583, u'end': 596, u'type': u'TextPositionSelector'}]}], u'tags': [u'Wikipedia', u'Vannevar Bush', u'annotation'], u'quote': u'Vannevar Bush', u'created': u'2013-10-26T17:50:57.031726+00:00', u'uri': u'http://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/?single_page=true', u'ranges': [{u'endOffset': 83, u'endContainer': u'/div[5]/div[2]/div[1]/article[1]/div[6]/p[1]/i[1]', u'startOffset': 70, u'startContainer': u'/div[5]/div[2]/div[1]/article[1]/div[6]/p[1]/i[1]'}], u'user': u'acct:[email protected]', u'text': u'Who is Vannevar Bush? See [Wikipedia article on V. Bush(https://en.wikipedia.org/wiki/Vannevar_Bush)', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'63qvQu5jTvC4xig3adAsNQ', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"1 {u'updated': u'2013-10-26T16:44:15.135780+00:00', u'target': [{u'source': u'http://www.centerforbookarts.org/art/carrion.html', u'quote': u'spaces', u'$$hashKey': u'00G', u'selector': [{u'endContainer': u'/table[2]/tbody[1]/tr[1]/td[3]/table[2]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/font[1]/font[1]', u'endOffset': 38, u'type': u'RangeSelector', u'startOffset': 32, u'startContainer': u'/table[2]/tbody[1]/tr[1]/td[3]/table[2]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/font[1]/font[1]'}, {u'exact': u'spaces', u'prefix': u'BOOK IS A book is a sequence of', u'type': u'TextQuoteSelector', u'suffix': u'. Each of these spaces is percei'}, {u'start': 92, u'end': 98, u'type': u'TextPositionSelector'}]}], u'tags': [u'BiB13'], u'quote': u'spaces', u'created': u'2013-10-26T16:44:15.135765+00:00', u'uri': u'http://www.centerforbookarts.org/art/carrion.html', u'ranges': [{u'endOffset': 38, u'endContainer': u'/table[2]/tbody[1]/tr[1]/td[3]/table[2]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/font[1]/font[1]', u'startOffset': 32, u'startContainer': u'/table[2]/tbody[1]/tr[1]/td[3]/table[2]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/font[1]/font[1]'}], u'user': u'acct:[email protected]', u'text': u'What does \"spaces\" mean here? Physical spaces? Mental spaces?', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'mdG3TKkTRd2qHAEzOTrOjw', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"2 {u'updated': u'2013-10-25T17:57:02.195838+00:00', u'$$hashKey': u'024', u'target': [], u'created': u'2013-10-25T17:57:02.195808+00:00', u'text': u'Who can be important players to put pressure on Germany and France to make their talks public?', u'uri': u'http://www.nytimes.com/2013/10/26/world/europe/fallout-over-american-spying-revelations.html?hp&_r=0', u'references': [u'eQGeHoI3SnGaIf2eMXj0bg'], u'user': u'acct:[email protected]', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'I52Ohrz8QRifJu11BOBKPQ', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"3 {u'updated': u'2013-10-25T17:55:47.874879+00:00', u'target': [{u'source': u'http://www.nytimes.com/2013/10/26/world/europe/fallout-over-american-spying-revelations.html?pagewanted=all', u'quote': u'While Mr. Cameron said he supported Ms. Merkel and President Fran\\xe7ois Hollande of France in seeking talks with Washington about new rules governing electronic surveillance, he delivered his strongest denunciation so far of those involved in publishing leaked material.', u'$$hashKey': u'012', u'selector': [{u'endContainer': u'/div[2]/div[3]/div[3]/div[1]/div[1]/div[1]/div[1]/div[5]/p[3]', u'endOffset': 269, u'type': u'RangeSelector', u'startOffset': 1, u'startContainer': u'/div[2]/div[3]/div[3]/div[1]/div[1]/div[1]/div[1]/div[5]/p[3]'}, {u'exact': u'While Mr. Cameron said he supported Ms. Merkel and President Fran\\xe7ois Hollande of France in seeking talks with Washington about new rules governing electronic surveillance, he delivered his strongest denunciation so far of those involved in publishing leaked material.', u'prefix': u'nference in Brussels on Friday.', u'type': u'TextQuoteSelector', u'suffix': u'\\u201cThat is not going to make our'}, {u'start': 2096, u'end': 2364, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-25T17:55:47.874864+00:00', u'quote': u'While Mr. Cameron said he supported Ms. Merkel and President Fran\\xe7ois Hollande of France in seeking talks with Washington about new rules governing electronic surveillance, he delivered his strongest denunciation so far of those involved in publishing leaked material.', u'uri': u'http://www.nytimes.com/2013/10/26/world/europe/fallout-over-american-spying-revelations.html?hp', u'ranges': [{u'endOffset': 269, u'endContainer': u'/div[2]/div[3]/div[3]/div[1]/div[1]/div[1]/div[1]/div[5]/p[3]', u'startOffset': 1, u'startContainer': u'/div[2]/div[3]/div[3]/div[1]/div[1]/div[1]/div[1]/div[5]/p[3]'}], u'user': u'acct:[email protected]', u'text': u\"Cameron showing that the UK is still the USA's closest friend?\", u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'hLy_OraDQoW9yHpEAoTonw', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"4 {u'updated': u'2013-10-24T22:04:01.711834+00:00', u'target': [{u'source': u'http://epubjs-reader.appspot.com//moby-dick/OPS/chapter_009.xhtml', u'quote': u'Shipmates', u'$$hashKey': u'012', u'selector': [{u'endContainer': u'/section[1]/p[6]', u'endOffset': 10, u'type': u'RangeSelector', u'startOffset': 1, u'startContainer': u'/section[1]/p[6]'}, {u'exact': u'Shipmates', u'prefix': u'at fish to swallow up Jonah.\\u2019\\u201d \\u201c', u'type': u'TextQuoteSelector', u'suffix': u', this book, containing only fou'}, {u'start': 1958, u'end': 1967, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-24T22:04:01.711819+00:00', u'quote': u'Shipmates', u'uri': u'http://epubjs-reader.appspot.com//moby-dick/OPS/chapter_009.xhtml', u'ranges': [{u'endOffset': 10, u'endContainer': u'/section[1]/p[6]', u'startOffset': 1, u'startContainer': u'/section[1]/p[6]'}], u'user': u'acct:[email protected]', u'text': u'A highly resonant appellation for the congregation. ', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'DtiypTBrTVSVAVmPNh7koQ', u'permissions': {u'read': [u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"5 {u'updated': u'2013-10-22T22:44:50.673266+00:00', u'target': [{u'source': u'http://epubjs-reader.appspot.com//moby-dick/OPS/chapter_009.xhtml', u'quote': u'And God had prepared a great fish to swallow up Jonah.\\u2019\\u201d', u'$$hashKey': u'020', u'selector': [{u'endContainer': u'/section[1]/p[5]', u'endOffset': 362, u'type': u'RangeSelector', u'startOffset': 306, u'startContainer': u'/section[1]/p[5]'}, {u'exact': u'And God had prepared a great fish to swallow up Jonah.\\u2019\\u201d', u'prefix': u'of the first chapter of Jonah\\u2014\\u2018', u'type': u'TextQuoteSelector', u'suffix': u'\\u201cShipmates, this book, containi'}, {u'start': 1900, u'end': 1956, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T22:44:50.673251+00:00', u'quote': u'And God had prepared a great fish to swallow up Jonah.\\u2019\\u201d', u'uri': u'http://epubjs-reader.appspot.com//moby-dick/OPS/chapter_009.xhtml', u'ranges': [{u'endOffset': 362, u'endContainer': u'/section[1]/p[5]', u'startOffset': 306, u'startContainer': u'/section[1]/p[5]'}], u'user': u'acct:[email protected]', u'text': u\"Check out Orson Welles' performance of this formidable sermon: http://www.youtube.com/watch?v=2rWV8sBZ9ho&feature=youtu.be&t=2m22s\", u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'rghvgV_gQK6XfxqS0TgPxw', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"6 {u'updated': u'2013-10-22T21:54:11.385355+00:00', u'target': [{u'source': u'http://gutenberg.futurepress.org/s3/pg8294/8294/@public@vhost@g@gutenberg@html@files@8294@[email protected]', u'quote': u\"He entered and was passing through Jericho. 19:2 There was a man named Zacchaeus. He was a chief tax collector, and he was rich. 19:3 He was trying to see who Jesus was, and couldn't because of the crowd, because he was short.\", u'$$hashKey': u'00X', u'selector': [{u'endContainer': u'/p[136]', u'endOffset': 231, u'type': u'RangeSelector', u'startOffset': 5, u'startContainer': u'/p[136]'}, {u'exact': u\"He entered and was passing through Jericho. 19:2 There was a man named Zacchaeus. He was a chief tax collector, and he was rich. 19:3 He was trying to see who Jesus was, and couldn't because of the crowd, because he was short.\", u'prefix': u'they saw it, praised God. 19:1', u'type': u'TextQuoteSelector', u'suffix': u'19:4 He ran on ahead, and climb'}, {u'start': 47537, u'end': 47763, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T21:54:11.385337+00:00', u'quote': u\"He entered and was passing through Jericho. 19:2 There was a man named Zacchaeus. He was a chief tax collector, and he was rich. 19:3 He was trying to see who Jesus was, and couldn't because of the crowd, because he was short.\", u'uri': u'http://gutenberg.futurepress.org/s3/pg8294/8294/@public@vhost@g@gutenberg@html@files@8294@[email protected]', u'ranges': [{u'endOffset': 231, u'endContainer': u'/p[136]', u'startOffset': 5, u'startContainer': u'/p[136]'}], u'user': u'acct:[email protected]', u'text': u'Zacchaeus: a rich, short chief tax collector', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'YIONp2rhSrKNOKvSusrJqg', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"7 {u'updated': u'2013-10-22T15:58:24.725984+00:00', u'target': [{u'source': u'http://www.lectionarypage.net/YearC_RCL/Pentecost/CProp26_RCL.html', u'quote': u'Luke 19:1-10', u'$$hashKey': u'00G', u'selector': [{u'endContainer': u'/h3[7]', u'endOffset': 13, u'type': u'RangeSelector', u'startOffset': 1, u'startContainer': u'/h3[7]'}, {u'exact': u'Luke 19:1-10', u'prefix': u'God and the Lord Jesus Christ.', u'type': u'TextQuoteSelector', u'suffix': u'Jesus entered Jericho and was p'}, {u'start': 5102, u'end': 5114, u'type': u'TextPositionSelector'}]}], u'tags': [u'lectionary'], u'quote': u'Luke 19:1-10', u'created': u'2013-10-22T15:58:24.725967+00:00', u'uri': u'http://www.lectionarypage.net/YearC_RCL/Pentecost/CProp26_RCL.html', u'ranges': [{u'endOffset': 13, u'endContainer': u'/h3[7]', u'startOffset': 1, u'startContainer': u'/h3[7]'}], u'user': u'acct:[email protected]', u'text': u\"Here's Luke 19:1-10 in lectionarypage.net\", u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'jhaFSdt-Q7211hhlA2A87g', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"8 {u'updated': u'2013-10-22T15:57:37.427807+00:00', u'target': [{u'source': u'http://lectionary.library.vanderbilt.edu/texts.php?id=287', u'quote': u'Luke 19:1-10', u'$$hashKey': u'00G', u'selector': [{u'endContainer': u'/div[1]/div[4]/div[2]/div[2]/span[6]', u'endOffset': 12, u'type': u'RangeSelector', u'startOffset': 0, u'startContainer': u'/div[1]/div[4]/div[2]/div[2]/span[6]'}, {u'exact': u'Luke 19:1-10', u'prefix': u'd Jesus Christ. [return to top]', u'type': u'TextQuoteSelector', u'suffix': u'19:1 He entered Jericho and was'}, {u'start': 5742, u'end': 5754, u'type': u'TextPositionSelector'}]}], u'tags': [u'lectionary'], u'quote': u'Luke 19:1-10', u'created': u'2013-10-22T15:57:37.427792+00:00', u'uri': u'http://lectionary.library.vanderbilt.edu/texts.php?id=287', u'ranges': [{u'endOffset': 12, u'endContainer': u'/div[1]/div[4]/div[2]/div[2]/span[6]', u'startOffset': 0, u'startContainer': u'/div[1]/div[4]/div[2]/div[2]/span[6]'}], u'user': u'acct:[email protected]', u'text': u'Reading of Luke 19:1-10 for Nov 3, 2013 in RCL', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'K9teEwdoQXCHTD2GHujfKA', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"9 {u'updated': u'2013-10-22T15:52:39.350469+00:00', u'target': [{u'source': u'http://ebible.org/web/LUK19.htm', u'quote': u'He has gone in to lodge with a man who is a sinner.\\u201d', u'$$hashKey': u'00G', u'selector': [{u'endContainer': u'/div[3]/div[2]', u'endOffset': 639, u'type': u'RangeSelector', u'startOffset': 587, u'startContainer': u'/div[3]/div[2]'}, {u'exact': u'He has gone in to lodge with a man who is a sinner.\\u201d', u'prefix': u'it, they all murmured, saying, \\u201c', u'type': u'TextQuoteSelector', u'suffix': u'8\\xa0Zacchaeus stood and said to t'}, {u'start': 619, u'end': 671, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T15:52:39.350453+00:00', u'quote': u'He has gone in to lodge with a man who is a sinner.\\u201d', u'uri': u'http://ebible.org/web/LUK19.htm#V0', u'ranges': [{u'endOffset': 639, u'endContainer': u'/div[3]/div[2]', u'startOffset': 587, u'startContainer': u'/div[3]/div[2]'}], u'user': u'acct:[email protected]', u'text': u'\"to lodge\" translated as \"to be a guest of\" in NRSV.', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'yohDy1xlTxGJSC9-I8JeRA', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"10"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
" {u'updated': u'2013-10-22T15:45:23.907099+00:00', u'target': [{u'source': u'http://bible.oremus.org/?ql=171519823', u'selector': [{u'type': u'RangeSelector', u'startContainer': u'/div[3]/div[1]/p[2]', u'endContainer': u'/div[3]/div[1]/p[2]', u'startOffset': 72, u'endOffset': 81}, {u'type': u'TextQuoteSelector', u'prefix': u'ough it. 2A man was there named', u'exact': u'Zacchaeus', u'suffix': u'; he was a chief tax collector a'}, {u'start': 199, u'end': 208, u'type': u'TextPositionSelector'}], u'$$hashKey': u'05T', u'quote': u'Zacchaeus'}], u'created': u'2013-10-22T15:45:10.330343+00:00', u'quote': u'Zacchaeus', u'tags': [u'Wikipedia'], u'uri': u'http://bible.oremus.org/?ql=171519823', u'ranges': [{u'startContainer': u'/div[3]/div[1]/p[2]', u'endContainer': u'/div[3]/div[1]/p[2]', u'startOffset': 72, u'endOffset': 81}], u'user': u'acct:[email protected]', u'text': u'https://en.wikipedia.org/wiki/Zacchaeus', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'ByQV3a_4R9KNq8VfatbxFQ', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"11 {u'updated': u'2013-10-22T15:43:44.557588+00:00', u'target': [{u'source': u'http://bible.oremus.org/?ql=171519823', u'quote': u'Look, half of my possessions, Lord, I will give to the poor; and if I have defrauded anyone of anything, I will pay back four times as much.', u'$$hashKey': u'042', u'selector': [{u'endContainer': u'/div[3]/div[1]/p[2]', u'endOffset': 799, u'type': u'RangeSelector', u'startOffset': 659, u'startContainer': u'/div[3]/div[1]/p[2]'}, {u'exact': u'Look, half of my possessions, Lord, I will give to the poor; and if I have defrauded anyone of anything, I will pay back four times as much.', u'prefix': u'od there and said to the Lord, \\u201c', u'type': u'TextQuoteSelector', u'suffix': u'\\u201d 9Then Jesus said to him, \\u201cToda'}, {u'start': 786, u'end': 926, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T15:43:44.557570+00:00', u'quote': u'Look, half of my possessions, Lord, I will give to the poor; and if I have defrauded anyone of anything, I will pay back four times as much.', u'uri': u'http://bible.oremus.org/?ql=171519823', u'ranges': [{u'endOffset': 799, u'endContainer': u'/div[3]/div[1]/p[2]', u'startOffset': 659, u'startContainer': u'/div[3]/div[1]/p[2]'}], u'user': u'acct:[email protected]', u'text': u'This offer of compensation seems super generous. What would be an expected level of compensation?', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'WRn7sB4BSYqZ0CTHRRdAXg', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"12 {u'updated': u'2013-10-22T15:40:54.634571+00:00', u'target': [{u'source': u'http://bible.oremus.org/?ql=171519823', u'quote': u'he was short in stature', u'$$hashKey': u'02J', u'selector': [{u'endContainer': u'/div[3]/div[1]/p[2]', u'endOffset': 236, u'type': u'RangeSelector', u'startOffset': 213, u'startContainer': u'/div[3]/div[1]/p[2]'}, {u'exact': u'he was short in stature', u'prefix': u'the crowd he could not, because', u'type': u'TextQuoteSelector', u'suffix': u'. 4So he ran ahead and climbed a'}, {u'start': 340, u'end': 363, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T15:40:54.634551+00:00', u'quote': u'he was short in stature', u'uri': u'http://bible.oremus.org/?ql=171519823', u'ranges': [{u'endOffset': 236, u'endContainer': u'/div[3]/div[1]/p[2]', u'startOffset': 213, u'startContainer': u'/div[3]/div[1]/p[2]'}], u'user': u'acct:[email protected]', u'text': u'As a short man myself, I identify with Zaccheus. The dude had to climb a tree to see Jesus!', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'uGU32fY5T12tS7uJRPGZvw', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"13 {u'updated': u'2013-10-22T15:39:36.125621+00:00', u'target': [{u'source': u'http://bible.oremus.org/?ql=171519823', u'quote': u'He has gone to be the guest', u'$$hashKey': u'01D', u'selector': [{u'endContainer': u'/div[3]/div[1]/p[2]', u'endOffset': 587, u'type': u'RangeSelector', u'startOffset': 560, u'startContainer': u'/div[3]/div[1]/p[2]'}, {u'exact': u'He has gone to be the guest', u'prefix': u'it began to grumble and said, \\u201c', u'type': u'TextQuoteSelector', u'suffix': u'of one who is a sinner.\\u201d 8Zacch'}, {u'start': 687, u'end': 714, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T15:39:36.125603+00:00', u'quote': u'He has gone to be the guest', u'uri': u'http://bible.oremus.org/?ql=171519823', u'ranges': [{u'endOffset': 587, u'endContainer': u'/div[3]/div[1]/p[2]', u'startOffset': 560, u'startContainer': u'/div[3]/div[1]/p[2]'}], u'user': u'acct:[email protected]', u'text': u'If you go to be a \"guest\" of a sinner, what does that make you? Also a sinner?', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'r5RuNrxlRceiCGi-pYxIJg', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n",
"14 {u'updated': u'2013-10-22T15:38:34.132331+00:00', u'target': [{u'source': u'http://bible.oremus.org/?ql=171519823', u'quote': u'sinner', u'$$hashKey': u'00G', u'selector': [{u'endContainer': u'/div[3]/div[1]/p[2]', u'endOffset': 610, u'type': u'RangeSelector', u'startOffset': 604, u'startContainer': u'/div[3]/div[1]/p[2]'}, {u'exact': u'sinner', u'prefix': u'to be the guest of one who is a', u'type': u'TextQuoteSelector', u'suffix': u'.\\u201d 8Zacchaeus stood there and sa'}, {u'start': 731, u'end': 737, u'type': u'TextPositionSelector'}]}], u'created': u'2013-10-22T15:38:34.132314+00:00', u'quote': u'sinner', u'uri': u'http://bible.oremus.org/?ql=171519823', u'ranges': [{u'endOffset': 610, u'endContainer': u'/div[3]/div[1]/p[2]', u'startOffset': 604, u'startContainer': u'/div[3]/div[1]/p[2]'}], u'user': u'acct:[email protected]', u'text': u'Why was Zaccheus considered a sinner? (Because he was a tax collector, indeed, the chief tax collector)?', u'reply_list': [], u'consumer': u'00000000-0000-0000-0000-000000000000', u'id': u'vVoVbcHgRa6E4ETZ75BZ6w', u'permissions': {u'read': [u'group:__world__', u'acct:[email protected]'], u'admin': [u'acct:[email protected]'], u'update': [u'acct:[email protected]'], u'delete': [u'acct:[email protected]']}}\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment