{"action":"created","comment":{"url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/comments/22583320","id":22583320,"diff_hunk":"@@ -0,0 +1,54 @@\n+# coding: utf-8\n+\n+import json\n+import sys\n+import os.path\n+from StringIO import StringIO\n+from contextlib import contextmanager\n+\n+from flask import Flask, request, render_template, Response\n+\n+sys.path = ([sys.path[0]]\n+            + [os.path.join(os.path.dirname(__file__), \"../lib\")]\n+            + sys.path[1:])\n+import dataprocessor as dp\n+sys.path = [sys.path[0]] + sys.path[2:]\n+\n+\n+app = Flask(__name__)\n+\n+\n+@contextmanager\n+def print_capture():\n+    ss = StringIO()\n+    sys.stdout, ss = ss, sys.stdout\n+    try:\n+        yield sys.stdout\n+    finally:\n+        sys.stdout, ss = ss, sys.stdout\n+\n+\n+@app.route('/')\n+def show_layout():\n+    return render_template('layout.html')\n+\n+\n+@app.route('/api/pipe', methods=['POST'])\n+def execute_pipe():\n+    data_path = app.config[\"DATA_PATH\"]\n+\n+    name = request.json[\"name\"]\n+    args = json.loads(request.json[\"args\"])","path":"server/webapp.py","position":41,"original_position":41,"commit_id":"ed3fc30c100dfa8fb6df50ff80bc2bfd67408346","original_commit_id":"ed3fc30c100dfa8fb6df50ff80bc2bfd67408346","user":{"login":"xeno1991","id":1827523,"avatar_url":"https://avatars.githubusercontent.com/u/1827523?v=3","gravatar_id":"","url":"https://api.github.com/users/xeno1991","html_url":"https://github.com/xeno1991","followers_url":"https://api.github.com/users/xeno1991/followers","following_url":"https://api.github.com/users/xeno1991/following{/other_user}","gists_url":"https://api.github.com/users/xeno1991/gists{/gist_id}","starred_url":"https://api.github.com/users/xeno1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeno1991/subscriptions","organizations_url":"https://api.github.com/users/xeno1991/orgs","repos_url":"https://api.github.com/users/xeno1991/repos","events_url":"https://api.github.com/users/xeno1991/events{/privacy}","received_events_url":"https://api.github.com/users/xeno1991/received_events","type":"User","site_admin":false},"body":"json.loadsいらないはず","created_at":"2015-01-07T12:21:54Z","updated_at":"2015-01-07T12:21:54Z","html_url":"https://github.com/kenbeese/DataProcessor/pull/177#discussion_r22583320","pull_request_url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177","_links":{"self":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/comments/22583320"},"html":{"href":"https://github.com/kenbeese/DataProcessor/pull/177#discussion_r22583320"},"pull_request":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177"}}},"pull_request":{"url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177","id":26952480,"html_url":"https://github.com/kenbeese/DataProcessor/pull/177","diff_url":"https://github.com/kenbeese/DataProcessor/pull/177.diff","patch_url":"https://github.com/kenbeese/DataProcessor/pull/177.patch","issue_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues/177","number":177,"state":"open","locked":false,"title":"Use Flask","user":{"login":"kenbeese","id":1433826,"avatar_url":"https://avatars.githubusercontent.com/u/1433826?v=3","gravatar_id":"","url":"https://api.github.com/users/kenbeese","html_url":"https://github.com/kenbeese","followers_url":"https://api.github.com/users/kenbeese/followers","following_url":"https://api.github.com/users/kenbeese/following{/other_user}","gists_url":"https://api.github.com/users/kenbeese/gists{/gist_id}","starred_url":"https://api.github.com/users/kenbeese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenbeese/subscriptions","organizations_url":"https://api.github.com/users/kenbeese/orgs","repos_url":"https://api.github.com/users/kenbeese/repos","events_url":"https://api.github.com/users/kenbeese/events{/privacy}","received_events_url":"https://api.github.com/users/kenbeese/received_events","type":"User","site_admin":false},"body":"# 目的\r\n- 軽快なサーバーレスポンス\r\n- 容易なサーバーメンテナンス\r\n\r\n# 変更点\r\n- web framework `Flask`を使用\r\n- dpserverのbinからserverへ移動\r\n- `dpserver debug`の追加 (debug用サブコマンド, サーバーをdeamonで立てない)\r\n- `dpserver_genzshcomp`の追加 (dpserver用のzsh補完生成スクリプト)\r\n\r\n\r\n# Notes\r\n\r\n- 基本的な使い方は以前と同じ\r\n- `dpserver install`でinstall しなおしてからお使いください(dpserverの位置が変わってるので注意)\r\n\r\nRelated to #155, #90.","created_at":"2015-01-07T11:44:28Z","updated_at":"2015-01-07T12:21:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2da751d24ad7dbd2739be680397631d7c8b077ae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177/commits","review_comments_url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177/comments","review_comment_url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/comments/{number}","comments_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues/177/comments","statuses_url":"https://api.github.com/repos/kenbeese/DataProcessor/statuses/ed3fc30c100dfa8fb6df50ff80bc2bfd67408346","head":{"label":"kenbeese:flask","ref":"flask","sha":"ed3fc30c100dfa8fb6df50ff80bc2bfd67408346","user":{"login":"kenbeese","id":1433826,"avatar_url":"https://avatars.githubusercontent.com/u/1433826?v=3","gravatar_id":"","url":"https://api.github.com/users/kenbeese","html_url":"https://github.com/kenbeese","followers_url":"https://api.github.com/users/kenbeese/followers","following_url":"https://api.github.com/users/kenbeese/following{/other_user}","gists_url":"https://api.github.com/users/kenbeese/gists{/gist_id}","starred_url":"https://api.github.com/users/kenbeese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenbeese/subscriptions","organizations_url":"https://api.github.com/users/kenbeese/orgs","repos_url":"https://api.github.com/users/kenbeese/repos","events_url":"https://api.github.com/users/kenbeese/events{/privacy}","received_events_url":"https://api.github.com/users/kenbeese/received_events","type":"User","site_admin":false},"repo":{"id":11995320,"name":"DataProcessor","full_name":"kenbeese/DataProcessor","owner":{"login":"kenbeese","id":1433826,"avatar_url":"https://avatars.githubusercontent.com/u/1433826?v=3","gravatar_id":"","url":"https://api.github.com/users/kenbeese","html_url":"https://github.com/kenbeese","followers_url":"https://api.github.com/users/kenbeese/followers","following_url":"https://api.github.com/users/kenbeese/following{/other_user}","gists_url":"https://api.github.com/users/kenbeese/gists{/gist_id}","starred_url":"https://api.github.com/users/kenbeese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenbeese/subscriptions","organizations_url":"https://api.github.com/users/kenbeese/orgs","repos_url":"https://api.github.com/users/kenbeese/repos","events_url":"https://api.github.com/users/kenbeese/events{/privacy}","received_events_url":"https://api.github.com/users/kenbeese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kenbeese/DataProcessor","description":"","fork":false,"url":"https://api.github.com/repos/kenbeese/DataProcessor","forks_url":"https://api.github.com/repos/kenbeese/DataProcessor/forks","keys_url":"https://api.github.com/repos/kenbeese/DataProcessor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kenbeese/DataProcessor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kenbeese/DataProcessor/teams","hooks_url":"https://api.github.com/repos/kenbeese/DataProcessor/hooks","issue_events_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues/events{/number}","events_url":"https://api.github.com/repos/kenbeese/DataProcessor/events","assignees_url":"https://api.github.com/repos/kenbeese/DataProcessor/assignees{/user}","branches_url":"https://api.github.com/repos/kenbeese/DataProcessor/branches{/branch}","tags_url":"https://api.github.com/repos/kenbeese/DataProcessor/tags","blobs_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/refs{/sha}","trees_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kenbeese/DataProcessor/statuses/{sha}","languages_url":"https://api.github.com/repos/kenbeese/DataProcessor/languages","stargazers_url":"https://api.github.com/repos/kenbeese/DataProcessor/stargazers","contributors_url":"https://api.github.com/repos/kenbeese/DataProcessor/contributors","subscribers_url":"https://api.github.com/repos/kenbeese/DataProcessor/subscribers","subscription_url":"https://api.github.com/repos/kenbeese/DataProcessor/subscription","commits_url":"https://api.github.com/repos/kenbeese/DataProcessor/commits{/sha}","git_commits_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/commits{/sha}","comments_url":"https://api.github.com/repos/kenbeese/DataProcessor/comments{/number}","issue_comment_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues/comments/{number}","contents_url":"https://api.github.com/repos/kenbeese/DataProcessor/contents/{+path}","compare_url":"https://api.github.com/repos/kenbeese/DataProcessor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kenbeese/DataProcessor/merges","archive_url":"https://api.github.com/repos/kenbeese/DataProcessor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kenbeese/DataProcessor/downloads","issues_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues{/number}","pulls_url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls{/number}","milestones_url":"https://api.github.com/repos/kenbeese/DataProcessor/milestones{/number}","notifications_url":"https://api.github.com/repos/kenbeese/DataProcessor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kenbeese/DataProcessor/labels{/name}","releases_url":"https://api.github.com/repos/kenbeese/DataProcessor/releases{/id}","created_at":"2013-08-09T07:14:53Z","updated_at":"2014-12-31T11:01:09Z","pushed_at":"2015-01-07T11:52:04Z","git_url":"git://github.com/kenbeese/DataProcessor.git","ssh_url":"git@github.com:kenbeese/DataProcessor.git","clone_url":"https://github.com/kenbeese/DataProcessor.git","svn_url":"https://github.com/kenbeese/DataProcessor","homepage":null,"size":3734,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":25,"forks":4,"open_issues":25,"watchers":3,"default_branch":"master"}},"base":{"label":"kenbeese:webapp2","ref":"webapp2","sha":"b65fd573a47890f8225f16f60c5e0b59339e8e70","user":{"login":"kenbeese","id":1433826,"avatar_url":"https://avatars.githubusercontent.com/u/1433826?v=3","gravatar_id":"","url":"https://api.github.com/users/kenbeese","html_url":"https://github.com/kenbeese","followers_url":"https://api.github.com/users/kenbeese/followers","following_url":"https://api.github.com/users/kenbeese/following{/other_user}","gists_url":"https://api.github.com/users/kenbeese/gists{/gist_id}","starred_url":"https://api.github.com/users/kenbeese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenbeese/subscriptions","organizations_url":"https://api.github.com/users/kenbeese/orgs","repos_url":"https://api.github.com/users/kenbeese/repos","events_url":"https://api.github.com/users/kenbeese/events{/privacy}","received_events_url":"https://api.github.com/users/kenbeese/received_events","type":"User","site_admin":false},"repo":{"id":11995320,"name":"DataProcessor","full_name":"kenbeese/DataProcessor","owner":{"login":"kenbeese","id":1433826,"avatar_url":"https://avatars.githubusercontent.com/u/1433826?v=3","gravatar_id":"","url":"https://api.github.com/users/kenbeese","html_url":"https://github.com/kenbeese","followers_url":"https://api.github.com/users/kenbeese/followers","following_url":"https://api.github.com/users/kenbeese/following{/other_user}","gists_url":"https://api.github.com/users/kenbeese/gists{/gist_id}","starred_url":"https://api.github.com/users/kenbeese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenbeese/subscriptions","organizations_url":"https://api.github.com/users/kenbeese/orgs","repos_url":"https://api.github.com/users/kenbeese/repos","events_url":"https://api.github.com/users/kenbeese/events{/privacy}","received_events_url":"https://api.github.com/users/kenbeese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kenbeese/DataProcessor","description":"","fork":false,"url":"https://api.github.com/repos/kenbeese/DataProcessor","forks_url":"https://api.github.com/repos/kenbeese/DataProcessor/forks","keys_url":"https://api.github.com/repos/kenbeese/DataProcessor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kenbeese/DataProcessor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kenbeese/DataProcessor/teams","hooks_url":"https://api.github.com/repos/kenbeese/DataProcessor/hooks","issue_events_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues/events{/number}","events_url":"https://api.github.com/repos/kenbeese/DataProcessor/events","assignees_url":"https://api.github.com/repos/kenbeese/DataProcessor/assignees{/user}","branches_url":"https://api.github.com/repos/kenbeese/DataProcessor/branches{/branch}","tags_url":"https://api.github.com/repos/kenbeese/DataProcessor/tags","blobs_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/refs{/sha}","trees_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kenbeese/DataProcessor/statuses/{sha}","languages_url":"https://api.github.com/repos/kenbeese/DataProcessor/languages","stargazers_url":"https://api.github.com/repos/kenbeese/DataProcessor/stargazers","contributors_url":"https://api.github.com/repos/kenbeese/DataProcessor/contributors","subscribers_url":"https://api.github.com/repos/kenbeese/DataProcessor/subscribers","subscription_url":"https://api.github.com/repos/kenbeese/DataProcessor/subscription","commits_url":"https://api.github.com/repos/kenbeese/DataProcessor/commits{/sha}","git_commits_url":"https://api.github.com/repos/kenbeese/DataProcessor/git/commits{/sha}","comments_url":"https://api.github.com/repos/kenbeese/DataProcessor/comments{/number}","issue_comment_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues/comments/{number}","contents_url":"https://api.github.com/repos/kenbeese/DataProcessor/contents/{+path}","compare_url":"https://api.github.com/repos/kenbeese/DataProcessor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kenbeese/DataProcessor/merges","archive_url":"https://api.github.com/repos/kenbeese/DataProcessor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kenbeese/DataProcessor/downloads","issues_url":"https://api.github.com/repos/kenbeese/DataProcessor/issues{/number}","pulls_url":"https://api.github.com/repos/kenbeese/DataProcessor/pulls{/number}","milestones_url":"https://api.github.com/repos/kenbeese/DataProcessor/milestones{/number}","notifications_url":"https://api.github.com/repos/kenbeese/DataProcessor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kenbeese/DataProcessor/labels{/name}","releases_url":"https://api.github.com/repos/kenbeese/DataProcessor/releases{/id}","created_at":"2013-08-09T07:14:53Z","updated_at":"2014-12-31T11:01:09Z","pushed_at":"2015-01-07T11:52:04Z","git_url":"git://github.com/kenbeese/DataProcessor.git","ssh_url":"git@github.com:kenbeese/DataProcessor.git","clone_url":"https://github.com/kenbeese/DataProcessor.git","svn_url":"https://github.com/kenbeese/DataProcessor","homepage":null,"size":3734,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":25,"forks":4,"open_issues":25,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177"},"html":{"href":"https://github.com/kenbeese/DataProcessor/pull/177"},"issue":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/issues/177"},"comments":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/kenbeese/DataProcessor/statuses/ed3fc30c100dfa8fb6df50ff80bc2bfd67408346"}}}}