{"action":"created","comment":{"url":"https://api.github.com/repos/weecology/retriever/pulls/comments/73955905","id":73955905,"diff_hunk":"@@ -139,25 +155,24 @@ def create_json():\n                             raise\n                         col_obj[\"size\"] = col_list[2]\n                     table[\"schema\"][\"fields\"].append(col_obj)\n-\n                 except:\n                     print(\"Exception occured. Check the input format again.\\n\")\n                     pass\n \n-                col = input()\n+                col = input().strip()\n \n-            isCT = input(\"Add crosstab columns? (y,N): \")\n-            if isCT.strip().lower() in [\"y\", \"yes\"]:\n-                ct_column = input(\"Crosstab column name: \")\n-                while ct_column.strip() == \"\":\n+            isCT = input(\"Add crosstab columns? (y,N): \").strip()\n+            if isCT.lower() in [\"y\", \"yes\"]:\n+                ct_column = input(\"Crosstab column name: \").strip()\n+                while ct_column == \"\":\n                     print(\"Empty column name. Try again.\\n\")\n-                    ct_column = input(\"Crosstab column name: \")\n+                    ct_column = input(\"Crosstab column name: \").strip()\n                 ct_names = []\n-                print(\"Enter names of crosstab column values (Press return after each name)\")\n-                name = input()\n-                while name.strip() != \"\":\n+                print(\"Enter names of crosstab column values (Press return after each name):\\n\")\n+                name = input().strip()\n+                while name != \"\":\n                     ct_names.append(name)\n-                    name = input()\n+                    name = input().strip()\n \n                 table['schema']['ct_column'] = ct_column\n                 table['schema']['ct_names'] = ct_names","path":"lib/datapackage.py","position":139,"original_position":139,"commit_id":"5f3d780dac2436dc8aa47e56ef1d534d2469389e","original_commit_id":"5f3d780dac2436dc8aa47e56ef1d534d2469389e","user":{"login":"henrykironde","id":5192965,"avatar_url":"https://avatars.githubusercontent.com/u/5192965?v=3","gravatar_id":"","url":"https://api.github.com/users/henrykironde","html_url":"https://github.com/henrykironde","followers_url":"https://api.github.com/users/henrykironde/followers","following_url":"https://api.github.com/users/henrykironde/following{/other_user}","gists_url":"https://api.github.com/users/henrykironde/gists{/gist_id}","starred_url":"https://api.github.com/users/henrykironde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrykironde/subscriptions","organizations_url":"https://api.github.com/users/henrykironde/orgs","repos_url":"https://api.github.com/users/henrykironde/repos","events_url":"https://api.github.com/users/henrykironde/events{/privacy}","received_events_url":"https://api.github.com/users/henrykironde/received_events","type":"User","site_admin":false},"body":"line [182](https://github.com/weecology/retriever/pull/599/files#diff-fe19ce9787a421223628d4355dc2f5e4R182) \r\n\r\n```\r\n     file_name = contents['name'] + \".json\"\r\n     with open(os.path.join(HOME_DIR, 'scripts', file_name), 'w') as output_file:\r\n         json.dump(contents, output_file, sort_keys=True, indent=4,\r\n                   separators=(',', ': '))\r\n         output_file.write('\\n')\r\n         print(\"\\nScript written to \" + file_name)\r\n         output_file.close()\r\n```\r\n\r\nline [352](https://github.com/weecology/retriever/pull/599/files#diff-fe19ce9787a421223628d4355dc2f5e4R352)\r\n\r\n```\r\n     file_name = contents['name'] + \".json\"\r\n     with open(os.path.join(HOME_DIR, 'scripts', file_name), 'w') as output_file:\r\n         json.dump(contents, output_file, sort_keys=True, indent=4,\r\n                   separators=(',', ': '))\r\n         output_file.write('\\n')\r\n         print(\"\\nScript written to \" + os.path.join(HOME_DIR, 'scripts', file_name))\r\n         output_file.close()\r\n```\r\n\r\nThese can be refactored","created_at":"2016-08-08T21:13:15Z","updated_at":"2016-08-08T21:13:15Z","html_url":"https://github.com/weecology/retriever/pull/599#discussion_r73955905","pull_request_url":"https://api.github.com/repos/weecology/retriever/pulls/599","_links":{"self":{"href":"https://api.github.com/repos/weecology/retriever/pulls/comments/73955905"},"html":{"href":"https://github.com/weecology/retriever/pull/599#discussion_r73955905"},"pull_request":{"href":"https://api.github.com/repos/weecology/retriever/pulls/599"}}},"pull_request":{"url":"https://api.github.com/repos/weecology/retriever/pulls/599","id":80375749,"html_url":"https://github.com/weecology/retriever/pull/599","diff_url":"https://github.com/weecology/retriever/pull/599.diff","patch_url":"https://github.com/weecology/retriever/pull/599.patch","issue_url":"https://api.github.com/repos/weecology/retriever/issues/599","number":599,"state":"open","locked":false,"title":"Add docs for new script creation and CLI bug-fixes","user":{"login":"goelakash","id":6972804,"avatar_url":"https://avatars.githubusercontent.com/u/6972804?v=3","gravatar_id":"","url":"https://api.github.com/users/goelakash","html_url":"https://github.com/goelakash","followers_url":"https://api.github.com/users/goelakash/followers","following_url":"https://api.github.com/users/goelakash/following{/other_user}","gists_url":"https://api.github.com/users/goelakash/gists{/gist_id}","starred_url":"https://api.github.com/users/goelakash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goelakash/subscriptions","organizations_url":"https://api.github.com/users/goelakash/orgs","repos_url":"https://api.github.com/users/goelakash/repos","events_url":"https://api.github.com/users/goelakash/events{/privacy}","received_events_url":"https://api.github.com/users/goelakash/received_events","type":"User","site_admin":false},"body":"1. Docs now have information regarding new script creation with explanation of the JSON keys.\r\n2. Fixed input and parsing issues with CLI\r\n3. Removed `mediatype` attribute from JSON\r\n4. Add compiled py files","created_at":"2016-08-07T19:40:06Z","updated_at":"2016-08-08T21:13:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"471ac5cb9e605690882fd7f8e0e4ce1b09af7536","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/weecology/retriever/pulls/599/commits","review_comments_url":"https://api.github.com/repos/weecology/retriever/pulls/599/comments","review_comment_url":"https://api.github.com/repos/weecology/retriever/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weecology/retriever/issues/599/comments","statuses_url":"https://api.github.com/repos/weecology/retriever/statuses/5f3d780dac2436dc8aa47e56ef1d534d2469389e","head":{"label":"goelakash:datapackage-docs","ref":"datapackage-docs","sha":"5f3d780dac2436dc8aa47e56ef1d534d2469389e","user":{"login":"goelakash","id":6972804,"avatar_url":"https://avatars.githubusercontent.com/u/6972804?v=3","gravatar_id":"","url":"https://api.github.com/users/goelakash","html_url":"https://github.com/goelakash","followers_url":"https://api.github.com/users/goelakash/followers","following_url":"https://api.github.com/users/goelakash/following{/other_user}","gists_url":"https://api.github.com/users/goelakash/gists{/gist_id}","starred_url":"https://api.github.com/users/goelakash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goelakash/subscriptions","organizations_url":"https://api.github.com/users/goelakash/orgs","repos_url":"https://api.github.com/users/goelakash/repos","events_url":"https://api.github.com/users/goelakash/events{/privacy}","received_events_url":"https://api.github.com/users/goelakash/received_events","type":"User","site_admin":false},"repo":{"id":53692992,"name":"retriever","full_name":"goelakash/retriever","owner":{"login":"goelakash","id":6972804,"avatar_url":"https://avatars.githubusercontent.com/u/6972804?v=3","gravatar_id":"","url":"https://api.github.com/users/goelakash","html_url":"https://github.com/goelakash","followers_url":"https://api.github.com/users/goelakash/followers","following_url":"https://api.github.com/users/goelakash/following{/other_user}","gists_url":"https://api.github.com/users/goelakash/gists{/gist_id}","starred_url":"https://api.github.com/users/goelakash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goelakash/subscriptions","organizations_url":"https://api.github.com/users/goelakash/orgs","repos_url":"https://api.github.com/users/goelakash/repos","events_url":"https://api.github.com/users/goelakash/events{/privacy}","received_events_url":"https://api.github.com/users/goelakash/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/goelakash/retriever","description":"Quickly download, clean up, and install ecological datasets into a database management system","fork":true,"url":"https://api.github.com/repos/goelakash/retriever","forks_url":"https://api.github.com/repos/goelakash/retriever/forks","keys_url":"https://api.github.com/repos/goelakash/retriever/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goelakash/retriever/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goelakash/retriever/teams","hooks_url":"https://api.github.com/repos/goelakash/retriever/hooks","issue_events_url":"https://api.github.com/repos/goelakash/retriever/issues/events{/number}","events_url":"https://api.github.com/repos/goelakash/retriever/events","assignees_url":"https://api.github.com/repos/goelakash/retriever/assignees{/user}","branches_url":"https://api.github.com/repos/goelakash/retriever/branches{/branch}","tags_url":"https://api.github.com/repos/goelakash/retriever/tags","blobs_url":"https://api.github.com/repos/goelakash/retriever/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goelakash/retriever/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goelakash/retriever/git/refs{/sha}","trees_url":"https://api.github.com/repos/goelakash/retriever/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goelakash/retriever/statuses/{sha}","languages_url":"https://api.github.com/repos/goelakash/retriever/languages","stargazers_url":"https://api.github.com/repos/goelakash/retriever/stargazers","contributors_url":"https://api.github.com/repos/goelakash/retriever/contributors","subscribers_url":"https://api.github.com/repos/goelakash/retriever/subscribers","subscription_url":"https://api.github.com/repos/goelakash/retriever/subscription","commits_url":"https://api.github.com/repos/goelakash/retriever/commits{/sha}","git_commits_url":"https://api.github.com/repos/goelakash/retriever/git/commits{/sha}","comments_url":"https://api.github.com/repos/goelakash/retriever/comments{/number}","issue_comment_url":"https://api.github.com/repos/goelakash/retriever/issues/comments{/number}","contents_url":"https://api.github.com/repos/goelakash/retriever/contents/{+path}","compare_url":"https://api.github.com/repos/goelakash/retriever/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goelakash/retriever/merges","archive_url":"https://api.github.com/repos/goelakash/retriever/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goelakash/retriever/downloads","issues_url":"https://api.github.com/repos/goelakash/retriever/issues{/number}","pulls_url":"https://api.github.com/repos/goelakash/retriever/pulls{/number}","milestones_url":"https://api.github.com/repos/goelakash/retriever/milestones{/number}","notifications_url":"https://api.github.com/repos/goelakash/retriever/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goelakash/retriever/labels{/name}","releases_url":"https://api.github.com/repos/goelakash/retriever/releases{/id}","deployments_url":"https://api.github.com/repos/goelakash/retriever/deployments","created_at":"2016-03-11T19:54:23Z","updated_at":"2016-03-17T16:17:23Z","pushed_at":"2016-08-08T18:16:32Z","git_url":"git://github.com/goelakash/retriever.git","ssh_url":"git@github.com:goelakash/retriever.git","clone_url":"https://github.com/goelakash/retriever.git","svn_url":"https://github.com/goelakash/retriever","homepage":"http://ecodataretriever.org","size":2155,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"weecology:data-package","ref":"data-package","sha":"371e414fb945019d652a0a88405b725a3a81c90d","user":{"login":"weecology","id":1156696,"avatar_url":"https://avatars.githubusercontent.com/u/1156696?v=3","gravatar_id":"","url":"https://api.github.com/users/weecology","html_url":"https://github.com/weecology","followers_url":"https://api.github.com/users/weecology/followers","following_url":"https://api.github.com/users/weecology/following{/other_user}","gists_url":"https://api.github.com/users/weecology/gists{/gist_id}","starred_url":"https://api.github.com/users/weecology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weecology/subscriptions","organizations_url":"https://api.github.com/users/weecology/orgs","repos_url":"https://api.github.com/users/weecology/repos","events_url":"https://api.github.com/users/weecology/events{/privacy}","received_events_url":"https://api.github.com/users/weecology/received_events","type":"Organization","site_admin":false},"repo":{"id":1968190,"name":"retriever","full_name":"weecology/retriever","owner":{"login":"weecology","id":1156696,"avatar_url":"https://avatars.githubusercontent.com/u/1156696?v=3","gravatar_id":"","url":"https://api.github.com/users/weecology","html_url":"https://github.com/weecology","followers_url":"https://api.github.com/users/weecology/followers","following_url":"https://api.github.com/users/weecology/following{/other_user}","gists_url":"https://api.github.com/users/weecology/gists{/gist_id}","starred_url":"https://api.github.com/users/weecology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weecology/subscriptions","organizations_url":"https://api.github.com/users/weecology/orgs","repos_url":"https://api.github.com/users/weecology/repos","events_url":"https://api.github.com/users/weecology/events{/privacy}","received_events_url":"https://api.github.com/users/weecology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weecology/retriever","description":"Quickly download, clean up, and install ecological datasets into a database management system","fork":false,"url":"https://api.github.com/repos/weecology/retriever","forks_url":"https://api.github.com/repos/weecology/retriever/forks","keys_url":"https://api.github.com/repos/weecology/retriever/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weecology/retriever/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weecology/retriever/teams","hooks_url":"https://api.github.com/repos/weecology/retriever/hooks","issue_events_url":"https://api.github.com/repos/weecology/retriever/issues/events{/number}","events_url":"https://api.github.com/repos/weecology/retriever/events","assignees_url":"https://api.github.com/repos/weecology/retriever/assignees{/user}","branches_url":"https://api.github.com/repos/weecology/retriever/branches{/branch}","tags_url":"https://api.github.com/repos/weecology/retriever/tags","blobs_url":"https://api.github.com/repos/weecology/retriever/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weecology/retriever/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weecology/retriever/git/refs{/sha}","trees_url":"https://api.github.com/repos/weecology/retriever/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weecology/retriever/statuses/{sha}","languages_url":"https://api.github.com/repos/weecology/retriever/languages","stargazers_url":"https://api.github.com/repos/weecology/retriever/stargazers","contributors_url":"https://api.github.com/repos/weecology/retriever/contributors","subscribers_url":"https://api.github.com/repos/weecology/retriever/subscribers","subscription_url":"https://api.github.com/repos/weecology/retriever/subscription","commits_url":"https://api.github.com/repos/weecology/retriever/commits{/sha}","git_commits_url":"https://api.github.com/repos/weecology/retriever/git/commits{/sha}","comments_url":"https://api.github.com/repos/weecology/retriever/comments{/number}","issue_comment_url":"https://api.github.com/repos/weecology/retriever/issues/comments{/number}","contents_url":"https://api.github.com/repos/weecology/retriever/contents/{+path}","compare_url":"https://api.github.com/repos/weecology/retriever/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weecology/retriever/merges","archive_url":"https://api.github.com/repos/weecology/retriever/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weecology/retriever/downloads","issues_url":"https://api.github.com/repos/weecology/retriever/issues{/number}","pulls_url":"https://api.github.com/repos/weecology/retriever/pulls{/number}","milestones_url":"https://api.github.com/repos/weecology/retriever/milestones{/number}","notifications_url":"https://api.github.com/repos/weecology/retriever/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weecology/retriever/labels{/name}","releases_url":"https://api.github.com/repos/weecology/retriever/releases{/id}","deployments_url":"https://api.github.com/repos/weecology/retriever/deployments","created_at":"2011-06-28T19:01:15Z","updated_at":"2016-06-29T19:16:54Z","pushed_at":"2016-08-08T18:16:33Z","git_url":"git://github.com/weecology/retriever.git","ssh_url":"git@github.com:weecology/retriever.git","clone_url":"https://github.com/weecology/retriever.git","svn_url":"https://github.com/weecology/retriever","homepage":"http://ecodataretriever.org","size":48154,"stargazers_count":68,"watchers_count":68,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":34,"mirror_url":null,"open_issues_count":65,"forks":34,"open_issues":65,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weecology/retriever/pulls/599"},"html":{"href":"https://github.com/weecology/retriever/pull/599"},"issue":{"href":"https://api.github.com/repos/weecology/retriever/issues/599"},"comments":{"href":"https://api.github.com/repos/weecology/retriever/issues/599/comments"},"review_comments":{"href":"https://api.github.com/repos/weecology/retriever/pulls/599/comments"},"review_comment":{"href":"https://api.github.com/repos/weecology/retriever/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weecology/retriever/pulls/599/commits"},"statuses":{"href":"https://api.github.com/repos/weecology/retriever/statuses/5f3d780dac2436dc8aa47e56ef1d534d2469389e"}}}}
{"actor":{"display_login":"henrykironde"}}