{"action":"created","comment":{"url":"https://api.github.com/repos/ryanflach/text_talk/pulls/comments/86440710","pull_request_review_id":7101170,"id":86440710,"diff_hunk":"@@ -0,0 +1,45 @@\n+defmodule TextTalk.Speech do\n+  @doc \"\"\"\n+  Takes an input from the user and sends to process. An input without\n+  a second argument specified (via `|`) will use the default voice of\n+  Junior when spoken through private method `speak/2`. An input of\n+  `exit` (case insensitive) will exit the program.\n+  \"\"\"\n+  def get_input do\n+    IO.puts \"Note: To specify a voice, pass it as a second argument after '|'\"\n+    IO.puts \"For example, 'hello | Boing' would say hello in the Boing voice.\\n\\n\"\n+    line = IO.gets \"What would you like me to repeat ('exit' to quit)?\\n\"\n+    process_input(line)\n+  end\n+\n+  defp process_input(input) do\n+    line = String.split(input, \"|\")","path":"lib/text_talk/speech.ex","position":16,"original_position":16,"commit_id":"55ed3a36c10dd85dd21c3938407961d64c599fbc","original_commit_id":"55ed3a36c10dd85dd21c3938407961d64c599fbc","user":{"login":"ryanflach","id":11306104,"avatar_url":"https://avatars.githubusercontent.com/u/11306104?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanflach","html_url":"https://github.com/ryanflach","followers_url":"https://api.github.com/users/ryanflach/followers","following_url":"https://api.github.com/users/ryanflach/following{/other_user}","gists_url":"https://api.github.com/users/ryanflach/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanflach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanflach/subscriptions","organizations_url":"https://api.github.com/users/ryanflach/orgs","repos_url":"https://api.github.com/users/ryanflach/repos","events_url":"https://api.github.com/users/ryanflach/events{/privacy}","received_events_url":"https://api.github.com/users/ryanflach/received_events","type":"User","site_admin":false},"body":"@mattr- I really like this refactor. Would `trim(&1)` be the same as `trim/1`? They both seem to achieve the same functionality. Could you elaborate some on why you'd use `trim/1` over `trim(&1)`?","created_at":"2016-11-03T20:52:04Z","updated_at":"2016-11-03T20:52:04Z","html_url":"https://github.com/ryanflach/text_talk/pull/1#discussion_r86440710","pull_request_url":"https://api.github.com/repos/ryanflach/text_talk/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ryanflach/text_talk/pulls/comments/86440710"},"html":{"href":"https://github.com/ryanflach/text_talk/pull/1#discussion_r86440710"},"pull_request":{"href":"https://api.github.com/repos/ryanflach/text_talk/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ryanflach/text_talk/pulls/1","id":92205800,"html_url":"https://github.com/ryanflach/text_talk/pull/1","diff_url":"https://github.com/ryanflach/text_talk/pull/1.diff","patch_url":"https://github.com/ryanflach/text_talk/pull/1.patch","issue_url":"https://api.github.com/repos/ryanflach/text_talk/issues/1","number":1,"state":"open","locked":false,"title":"Add text-to-speech functionality","user":{"login":"ryanflach","id":11306104,"avatar_url":"https://avatars.githubusercontent.com/u/11306104?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanflach","html_url":"https://github.com/ryanflach","followers_url":"https://api.github.com/users/ryanflach/followers","following_url":"https://api.github.com/users/ryanflach/following{/other_user}","gists_url":"https://api.github.com/users/ryanflach/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanflach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanflach/subscriptions","organizations_url":"https://api.github.com/users/ryanflach/orgs","repos_url":"https://api.github.com/users/ryanflach/repos","events_url":"https://api.github.com/users/ryanflach/events{/privacy}","received_events_url":"https://api.github.com/users/ryanflach/received_events","type":"User","site_admin":false},"body":"This PR completes base functionality of the CLI accepting input from the user and converting to speech. Additionally, documentation has been updated and completed.\r\n\r\nNotes by file:\r\n- `lib/text_talk.ex`\r\n  - `start/2` is run automatically with `mix run`\r\n  - Triggers output of a welcome message and runs the `get_input/0` function in the Speech module.\r\n- `lib/text_talk/speech.ex`\r\n  - Main functionality lives here\r\n  - documentation is discarded for private methods, so it is only supplied for `get_input/0`\r\n  - `process_input/1` splits the input string at '|' and sends to exit if the head of the created List is 'exit' - matching case insensitively. Otherwise the split input is sent to one of two functions.\r\n  - `send_to_speech/1` has two variants - one with a clause for when there is only a head in the List, and one that processes a list with two items. Both send the appropriate args to `speak/2`\r\n  - `speak/2` accepts two args and has a default for the second (voice). This function triggers the actual speech. It returns a tuple of `{:ok, line, voice}`, though this would only been seen in iex.\r\n  - `exit_program/0` outputs a message and exits the program.\r\n\r\nIn `exit_program/0` I am using `System.halt(0)` to exit discretely (i.e., without warning output). I was originally attempting to use `exit/1` but was unable to find a means of doing so discretely. Because of the simplicity of this program (no other running processes) `System.halt(0)` seems fine, but I would love to know of a better way, if there is something more appropriate in this context.","created_at":"2016-11-03T17:47:34Z","updated_at":"2016-11-03T20:52:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29d9b2dcf0b2f941c534ccf37383cd593f31ca54","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ryanflach/text_talk/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ryanflach/text_talk/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ryanflach/text_talk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ryanflach/text_talk/issues/1/comments","statuses_url":"https://api.github.com/repos/ryanflach/text_talk/statuses/55ed3a36c10dd85dd21c3938407961d64c599fbc","head":{"label":"ryanflach:text_to_speech","ref":"text_to_speech","sha":"55ed3a36c10dd85dd21c3938407961d64c599fbc","user":{"login":"ryanflach","id":11306104,"avatar_url":"https://avatars.githubusercontent.com/u/11306104?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanflach","html_url":"https://github.com/ryanflach","followers_url":"https://api.github.com/users/ryanflach/followers","following_url":"https://api.github.com/users/ryanflach/following{/other_user}","gists_url":"https://api.github.com/users/ryanflach/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanflach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanflach/subscriptions","organizations_url":"https://api.github.com/users/ryanflach/orgs","repos_url":"https://api.github.com/users/ryanflach/repos","events_url":"https://api.github.com/users/ryanflach/events{/privacy}","received_events_url":"https://api.github.com/users/ryanflach/received_events","type":"User","site_admin":false},"repo":{"id":72769778,"name":"text_talk","full_name":"ryanflach/text_talk","owner":{"login":"ryanflach","id":11306104,"avatar_url":"https://avatars.githubusercontent.com/u/11306104?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanflach","html_url":"https://github.com/ryanflach","followers_url":"https://api.github.com/users/ryanflach/followers","following_url":"https://api.github.com/users/ryanflach/following{/other_user}","gists_url":"https://api.github.com/users/ryanflach/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanflach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanflach/subscriptions","organizations_url":"https://api.github.com/users/ryanflach/orgs","repos_url":"https://api.github.com/users/ryanflach/repos","events_url":"https://api.github.com/users/ryanflach/events{/privacy}","received_events_url":"https://api.github.com/users/ryanflach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryanflach/text_talk","description":"Simple Elixir text-to-speech CLI application","fork":false,"url":"https://api.github.com/repos/ryanflach/text_talk","forks_url":"https://api.github.com/repos/ryanflach/text_talk/forks","keys_url":"https://api.github.com/repos/ryanflach/text_talk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryanflach/text_talk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryanflach/text_talk/teams","hooks_url":"https://api.github.com/repos/ryanflach/text_talk/hooks","issue_events_url":"https://api.github.com/repos/ryanflach/text_talk/issues/events{/number}","events_url":"https://api.github.com/repos/ryanflach/text_talk/events","assignees_url":"https://api.github.com/repos/ryanflach/text_talk/assignees{/user}","branches_url":"https://api.github.com/repos/ryanflach/text_talk/branches{/branch}","tags_url":"https://api.github.com/repos/ryanflach/text_talk/tags","blobs_url":"https://api.github.com/repos/ryanflach/text_talk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryanflach/text_talk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryanflach/text_talk/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryanflach/text_talk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryanflach/text_talk/statuses/{sha}","languages_url":"https://api.github.com/repos/ryanflach/text_talk/languages","stargazers_url":"https://api.github.com/repos/ryanflach/text_talk/stargazers","contributors_url":"https://api.github.com/repos/ryanflach/text_talk/contributors","subscribers_url":"https://api.github.com/repos/ryanflach/text_talk/subscribers","subscription_url":"https://api.github.com/repos/ryanflach/text_talk/subscription","commits_url":"https://api.github.com/repos/ryanflach/text_talk/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryanflach/text_talk/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryanflach/text_talk/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryanflach/text_talk/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryanflach/text_talk/contents/{+path}","compare_url":"https://api.github.com/repos/ryanflach/text_talk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryanflach/text_talk/merges","archive_url":"https://api.github.com/repos/ryanflach/text_talk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryanflach/text_talk/downloads","issues_url":"https://api.github.com/repos/ryanflach/text_talk/issues{/number}","pulls_url":"https://api.github.com/repos/ryanflach/text_talk/pulls{/number}","milestones_url":"https://api.github.com/repos/ryanflach/text_talk/milestones{/number}","notifications_url":"https://api.github.com/repos/ryanflach/text_talk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryanflach/text_talk/labels{/name}","releases_url":"https://api.github.com/repos/ryanflach/text_talk/releases{/id}","deployments_url":"https://api.github.com/repos/ryanflach/text_talk/deployments","created_at":"2016-11-03T17:28:15Z","updated_at":"2016-11-03T17:49:47Z","pushed_at":"2016-11-03T18:39:11Z","git_url":"git://github.com/ryanflach/text_talk.git","ssh_url":"git@github.com:ryanflach/text_talk.git","clone_url":"https://github.com/ryanflach/text_talk.git","svn_url":"https://github.com/ryanflach/text_talk","homepage":"","size":6,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ryanflach:master","ref":"master","sha":"b44ed3272d47c11ebdf150fd1933ca78615d6310","user":{"login":"ryanflach","id":11306104,"avatar_url":"https://avatars.githubusercontent.com/u/11306104?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanflach","html_url":"https://github.com/ryanflach","followers_url":"https://api.github.com/users/ryanflach/followers","following_url":"https://api.github.com/users/ryanflach/following{/other_user}","gists_url":"https://api.github.com/users/ryanflach/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanflach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanflach/subscriptions","organizations_url":"https://api.github.com/users/ryanflach/orgs","repos_url":"https://api.github.com/users/ryanflach/repos","events_url":"https://api.github.com/users/ryanflach/events{/privacy}","received_events_url":"https://api.github.com/users/ryanflach/received_events","type":"User","site_admin":false},"repo":{"id":72769778,"name":"text_talk","full_name":"ryanflach/text_talk","owner":{"login":"ryanflach","id":11306104,"avatar_url":"https://avatars.githubusercontent.com/u/11306104?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanflach","html_url":"https://github.com/ryanflach","followers_url":"https://api.github.com/users/ryanflach/followers","following_url":"https://api.github.com/users/ryanflach/following{/other_user}","gists_url":"https://api.github.com/users/ryanflach/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanflach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanflach/subscriptions","organizations_url":"https://api.github.com/users/ryanflach/orgs","repos_url":"https://api.github.com/users/ryanflach/repos","events_url":"https://api.github.com/users/ryanflach/events{/privacy}","received_events_url":"https://api.github.com/users/ryanflach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryanflach/text_talk","description":"Simple Elixir text-to-speech CLI application","fork":false,"url":"https://api.github.com/repos/ryanflach/text_talk","forks_url":"https://api.github.com/repos/ryanflach/text_talk/forks","keys_url":"https://api.github.com/repos/ryanflach/text_talk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryanflach/text_talk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryanflach/text_talk/teams","hooks_url":"https://api.github.com/repos/ryanflach/text_talk/hooks","issue_events_url":"https://api.github.com/repos/ryanflach/text_talk/issues/events{/number}","events_url":"https://api.github.com/repos/ryanflach/text_talk/events","assignees_url":"https://api.github.com/repos/ryanflach/text_talk/assignees{/user}","branches_url":"https://api.github.com/repos/ryanflach/text_talk/branches{/branch}","tags_url":"https://api.github.com/repos/ryanflach/text_talk/tags","blobs_url":"https://api.github.com/repos/ryanflach/text_talk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryanflach/text_talk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryanflach/text_talk/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryanflach/text_talk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryanflach/text_talk/statuses/{sha}","languages_url":"https://api.github.com/repos/ryanflach/text_talk/languages","stargazers_url":"https://api.github.com/repos/ryanflach/text_talk/stargazers","contributors_url":"https://api.github.com/repos/ryanflach/text_talk/contributors","subscribers_url":"https://api.github.com/repos/ryanflach/text_talk/subscribers","subscription_url":"https://api.github.com/repos/ryanflach/text_talk/subscription","commits_url":"https://api.github.com/repos/ryanflach/text_talk/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryanflach/text_talk/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryanflach/text_talk/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryanflach/text_talk/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryanflach/text_talk/contents/{+path}","compare_url":"https://api.github.com/repos/ryanflach/text_talk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryanflach/text_talk/merges","archive_url":"https://api.github.com/repos/ryanflach/text_talk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryanflach/text_talk/downloads","issues_url":"https://api.github.com/repos/ryanflach/text_talk/issues{/number}","pulls_url":"https://api.github.com/repos/ryanflach/text_talk/pulls{/number}","milestones_url":"https://api.github.com/repos/ryanflach/text_talk/milestones{/number}","notifications_url":"https://api.github.com/repos/ryanflach/text_talk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryanflach/text_talk/labels{/name}","releases_url":"https://api.github.com/repos/ryanflach/text_talk/releases{/id}","deployments_url":"https://api.github.com/repos/ryanflach/text_talk/deployments","created_at":"2016-11-03T17:28:15Z","updated_at":"2016-11-03T17:49:47Z","pushed_at":"2016-11-03T18:39:11Z","git_url":"git://github.com/ryanflach/text_talk.git","ssh_url":"git@github.com:ryanflach/text_talk.git","clone_url":"https://github.com/ryanflach/text_talk.git","svn_url":"https://github.com/ryanflach/text_talk","homepage":"","size":6,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ryanflach/text_talk/pulls/1"},"html":{"href":"https://github.com/ryanflach/text_talk/pull/1"},"issue":{"href":"https://api.github.com/repos/ryanflach/text_talk/issues/1"},"comments":{"href":"https://api.github.com/repos/ryanflach/text_talk/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ryanflach/text_talk/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ryanflach/text_talk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ryanflach/text_talk/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ryanflach/text_talk/statuses/55ed3a36c10dd85dd21c3938407961d64c599fbc"}}}}
{"actor":{"display_login":"ryanflach"}}