{"action":"created","comment":{"url":"https://api.github.com/repos/domchristie/to-markdown/pulls/comments/57123581","id":57123581,"diff_hunk":"@@ -0,0 +1,24 @@\n+#!/usr/bin/env node\n+\n+var toMarkdown = require('../src/to-markdown').toMarkdown;\n+\n+function main (input) {\n+  console.log(toMarkdown(input));\n+}\n+\n+var input = process.argv.slice(2).join(' ');\n+\n+if (input) {\n+  main(input);\n+} else {\n+  process.stdin.resume();\n+  process.stdin.setEncoding('utf8');\n+\n+  process.stdin.on('data', function(chunk) {\n+    input += chunk;\n+  });\n+\n+  process.stdin.on('end', function() {\n+    main(input);\n+  });\n+}","path":"bin/index.js","position":24,"original_position":24,"commit_id":"8e3fc36c62cd884c1e7e671790990d1cad39d569","original_commit_id":"8e3fc36c62cd884c1e7e671790990d1cad39d569","user":{"login":"slang800","id":1049204,"avatar_url":"https://avatars.githubusercontent.com/u/1049204?v=3","gravatar_id":"","url":"https://api.github.com/users/slang800","html_url":"https://github.com/slang800","followers_url":"https://api.github.com/users/slang800/followers","following_url":"https://api.github.com/users/slang800/following{/other_user}","gists_url":"https://api.github.com/users/slang800/gists{/gist_id}","starred_url":"https://api.github.com/users/slang800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slang800/subscriptions","organizations_url":"https://api.github.com/users/slang800/orgs","repos_url":"https://api.github.com/users/slang800/repos","events_url":"https://api.github.com/users/slang800/events{/privacy}","received_events_url":"https://api.github.com/users/slang800/received_events","type":"User","site_admin":false},"body":"missing final newline :(","created_at":"2016-03-23T08:31:28Z","updated_at":"2016-03-23T08:31:28Z","html_url":"https://github.com/domchristie/to-markdown/pull/29#discussion_r57123581","pull_request_url":"https://api.github.com/repos/domchristie/to-markdown/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/domchristie/to-markdown/pulls/comments/57123581"},"html":{"href":"https://github.com/domchristie/to-markdown/pull/29#discussion_r57123581"},"pull_request":{"href":"https://api.github.com/repos/domchristie/to-markdown/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/domchristie/to-markdown/pulls/29","id":10187010,"html_url":"https://github.com/domchristie/to-markdown/pull/29","diff_url":"https://github.com/domchristie/to-markdown/pull/29.diff","patch_url":"https://github.com/domchristie/to-markdown/pull/29.patch","issue_url":"https://api.github.com/repos/domchristie/to-markdown/issues/29","number":29,"state":"open","locked":false,"title":"added executable","user":{"login":"garbados","id":883103,"avatar_url":"https://avatars.githubusercontent.com/u/883103?v=3","gravatar_id":"","url":"https://api.github.com/users/garbados","html_url":"https://github.com/garbados","followers_url":"https://api.github.com/users/garbados/followers","following_url":"https://api.github.com/users/garbados/following{/other_user}","gists_url":"https://api.github.com/users/garbados/gists{/gist_id}","starred_url":"https://api.github.com/users/garbados/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbados/subscriptions","organizations_url":"https://api.github.com/users/garbados/orgs","repos_url":"https://api.github.com/users/garbados/repos","events_url":"https://api.github.com/users/garbados/events{/privacy}","received_events_url":"https://api.github.com/users/garbados/received_events","type":"User","site_admin":false},"body":"After doing `sudo npm link`, users can do `html2markdown [html]` or `echo [html] | html2markdown` and get markdown printed to stdout.","created_at":"2013-11-21T20:59:12Z","updated_at":"2016-03-23T08:31:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57556bcf139df559097cecb0db345e24660dd0d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/domchristie/to-markdown/pulls/29/commits","review_comments_url":"https://api.github.com/repos/domchristie/to-markdown/pulls/29/comments","review_comment_url":"https://api.github.com/repos/domchristie/to-markdown/pulls/comments{/number}","comments_url":"https://api.github.com/repos/domchristie/to-markdown/issues/29/comments","statuses_url":"https://api.github.com/repos/domchristie/to-markdown/statuses/8e3fc36c62cd884c1e7e671790990d1cad39d569","head":{"label":"garbados:master","ref":"master","sha":"8e3fc36c62cd884c1e7e671790990d1cad39d569","user":{"login":"garbados","id":883103,"avatar_url":"https://avatars.githubusercontent.com/u/883103?v=3","gravatar_id":"","url":"https://api.github.com/users/garbados","html_url":"https://github.com/garbados","followers_url":"https://api.github.com/users/garbados/followers","following_url":"https://api.github.com/users/garbados/following{/other_user}","gists_url":"https://api.github.com/users/garbados/gists{/gist_id}","starred_url":"https://api.github.com/users/garbados/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbados/subscriptions","organizations_url":"https://api.github.com/users/garbados/orgs","repos_url":"https://api.github.com/users/garbados/repos","events_url":"https://api.github.com/users/garbados/events{/privacy}","received_events_url":"https://api.github.com/users/garbados/received_events","type":"User","site_admin":false},"repo":{"id":14598356,"name":"to-markdown","full_name":"garbados/to-markdown","owner":{"login":"garbados","id":883103,"avatar_url":"https://avatars.githubusercontent.com/u/883103?v=3","gravatar_id":"","url":"https://api.github.com/users/garbados","html_url":"https://github.com/garbados","followers_url":"https://api.github.com/users/garbados/followers","following_url":"https://api.github.com/users/garbados/following{/other_user}","gists_url":"https://api.github.com/users/garbados/gists{/gist_id}","starred_url":"https://api.github.com/users/garbados/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbados/subscriptions","organizations_url":"https://api.github.com/users/garbados/orgs","repos_url":"https://api.github.com/users/garbados/repos","events_url":"https://api.github.com/users/garbados/events{/privacy}","received_events_url":"https://api.github.com/users/garbados/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garbados/to-markdown","description":"An HTML to Markdown converter written in javascript","fork":true,"url":"https://api.github.com/repos/garbados/to-markdown","forks_url":"https://api.github.com/repos/garbados/to-markdown/forks","keys_url":"https://api.github.com/repos/garbados/to-markdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garbados/to-markdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garbados/to-markdown/teams","hooks_url":"https://api.github.com/repos/garbados/to-markdown/hooks","issue_events_url":"https://api.github.com/repos/garbados/to-markdown/issues/events{/number}","events_url":"https://api.github.com/repos/garbados/to-markdown/events","assignees_url":"https://api.github.com/repos/garbados/to-markdown/assignees{/user}","branches_url":"https://api.github.com/repos/garbados/to-markdown/branches{/branch}","tags_url":"https://api.github.com/repos/garbados/to-markdown/tags","blobs_url":"https://api.github.com/repos/garbados/to-markdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garbados/to-markdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garbados/to-markdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/garbados/to-markdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garbados/to-markdown/statuses/{sha}","languages_url":"https://api.github.com/repos/garbados/to-markdown/languages","stargazers_url":"https://api.github.com/repos/garbados/to-markdown/stargazers","contributors_url":"https://api.github.com/repos/garbados/to-markdown/contributors","subscribers_url":"https://api.github.com/repos/garbados/to-markdown/subscribers","subscription_url":"https://api.github.com/repos/garbados/to-markdown/subscription","commits_url":"https://api.github.com/repos/garbados/to-markdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/garbados/to-markdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/garbados/to-markdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/garbados/to-markdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/garbados/to-markdown/contents/{+path}","compare_url":"https://api.github.com/repos/garbados/to-markdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garbados/to-markdown/merges","archive_url":"https://api.github.com/repos/garbados/to-markdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garbados/to-markdown/downloads","issues_url":"https://api.github.com/repos/garbados/to-markdown/issues{/number}","pulls_url":"https://api.github.com/repos/garbados/to-markdown/pulls{/number}","milestones_url":"https://api.github.com/repos/garbados/to-markdown/milestones{/number}","notifications_url":"https://api.github.com/repos/garbados/to-markdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garbados/to-markdown/labels{/name}","releases_url":"https://api.github.com/repos/garbados/to-markdown/releases{/id}","deployments_url":"https://api.github.com/repos/garbados/to-markdown/deployments","created_at":"2013-11-21T20:07:09Z","updated_at":"2013-11-21T22:25:47Z","pushed_at":"2013-11-21T22:25:42Z","git_url":"git://github.com/garbados/to-markdown.git","ssh_url":"git@github.com:garbados/to-markdown.git","clone_url":"https://github.com/garbados/to-markdown.git","svn_url":"https://github.com/garbados/to-markdown","homepage":"http://domchristie.github.com/to-markdown","size":144,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"domchristie:master","ref":"master","sha":"47df7a3f4f192a48e6c11f09b0fcacb4a5afc0ff","user":{"login":"domchristie","id":111734,"avatar_url":"https://avatars.githubusercontent.com/u/111734?v=3","gravatar_id":"","url":"https://api.github.com/users/domchristie","html_url":"https://github.com/domchristie","followers_url":"https://api.github.com/users/domchristie/followers","following_url":"https://api.github.com/users/domchristie/following{/other_user}","gists_url":"https://api.github.com/users/domchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/domchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domchristie/subscriptions","organizations_url":"https://api.github.com/users/domchristie/orgs","repos_url":"https://api.github.com/users/domchristie/repos","events_url":"https://api.github.com/users/domchristie/events{/privacy}","received_events_url":"https://api.github.com/users/domchristie/received_events","type":"User","site_admin":false},"repo":{"id":2630230,"name":"to-markdown","full_name":"domchristie/to-markdown","owner":{"login":"domchristie","id":111734,"avatar_url":"https://avatars.githubusercontent.com/u/111734?v=3","gravatar_id":"","url":"https://api.github.com/users/domchristie","html_url":"https://github.com/domchristie","followers_url":"https://api.github.com/users/domchristie/followers","following_url":"https://api.github.com/users/domchristie/following{/other_user}","gists_url":"https://api.github.com/users/domchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/domchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domchristie/subscriptions","organizations_url":"https://api.github.com/users/domchristie/orgs","repos_url":"https://api.github.com/users/domchristie/repos","events_url":"https://api.github.com/users/domchristie/events{/privacy}","received_events_url":"https://api.github.com/users/domchristie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/domchristie/to-markdown","description":"An HTML to Markdown converter written in JavaScript","fork":false,"url":"https://api.github.com/repos/domchristie/to-markdown","forks_url":"https://api.github.com/repos/domchristie/to-markdown/forks","keys_url":"https://api.github.com/repos/domchristie/to-markdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/domchristie/to-markdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/domchristie/to-markdown/teams","hooks_url":"https://api.github.com/repos/domchristie/to-markdown/hooks","issue_events_url":"https://api.github.com/repos/domchristie/to-markdown/issues/events{/number}","events_url":"https://api.github.com/repos/domchristie/to-markdown/events","assignees_url":"https://api.github.com/repos/domchristie/to-markdown/assignees{/user}","branches_url":"https://api.github.com/repos/domchristie/to-markdown/branches{/branch}","tags_url":"https://api.github.com/repos/domchristie/to-markdown/tags","blobs_url":"https://api.github.com/repos/domchristie/to-markdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/domchristie/to-markdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/domchristie/to-markdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/domchristie/to-markdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/domchristie/to-markdown/statuses/{sha}","languages_url":"https://api.github.com/repos/domchristie/to-markdown/languages","stargazers_url":"https://api.github.com/repos/domchristie/to-markdown/stargazers","contributors_url":"https://api.github.com/repos/domchristie/to-markdown/contributors","subscribers_url":"https://api.github.com/repos/domchristie/to-markdown/subscribers","subscription_url":"https://api.github.com/repos/domchristie/to-markdown/subscription","commits_url":"https://api.github.com/repos/domchristie/to-markdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/domchristie/to-markdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/domchristie/to-markdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/domchristie/to-markdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/domchristie/to-markdown/contents/{+path}","compare_url":"https://api.github.com/repos/domchristie/to-markdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/domchristie/to-markdown/merges","archive_url":"https://api.github.com/repos/domchristie/to-markdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/domchristie/to-markdown/downloads","issues_url":"https://api.github.com/repos/domchristie/to-markdown/issues{/number}","pulls_url":"https://api.github.com/repos/domchristie/to-markdown/pulls{/number}","milestones_url":"https://api.github.com/repos/domchristie/to-markdown/milestones{/number}","notifications_url":"https://api.github.com/repos/domchristie/to-markdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/domchristie/to-markdown/labels{/name}","releases_url":"https://api.github.com/repos/domchristie/to-markdown/releases{/id}","deployments_url":"https://api.github.com/repos/domchristie/to-markdown/deployments","created_at":"2011-10-23T10:35:39Z","updated_at":"2016-03-22T07:28:36Z","pushed_at":"2016-03-16T19:43:24Z","git_url":"git://github.com/domchristie/to-markdown.git","ssh_url":"git@github.com:domchristie/to-markdown.git","clone_url":"https://github.com/domchristie/to-markdown.git","svn_url":"https://github.com/domchristie/to-markdown","homepage":"http://domchristie.github.io/to-markdown","size":1309,"stargazers_count":1613,"watchers_count":1613,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":268,"mirror_url":null,"open_issues_count":22,"forks":268,"open_issues":22,"watchers":1613,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/domchristie/to-markdown/pulls/29"},"html":{"href":"https://github.com/domchristie/to-markdown/pull/29"},"issue":{"href":"https://api.github.com/repos/domchristie/to-markdown/issues/29"},"comments":{"href":"https://api.github.com/repos/domchristie/to-markdown/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/domchristie/to-markdown/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/domchristie/to-markdown/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/domchristie/to-markdown/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/domchristie/to-markdown/statuses/8e3fc36c62cd884c1e7e671790990d1cad39d569"}}}}