{"action":"created","comment":{"url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/comments/217308656","pull_request_review_id":154987127,"id":217308656,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzMwODY1Ng==","diff_hunk":"@@ -10,39 +9,18 @@ int main(int argc, char** argv) {\n \n   createLoggers();\n \n-  namespace po = boost::program_options;\n-  po::options_description desc(\"Allowed options\");\n-  // clang-format off\n-  desc.add_options()\n-    (\"max-size,m\", po::value<size_t>()->default_value(0),\n-     \"Generate only  arg  most common vocabulary items\")\n-    (\"help,h\", \"Print this message and exit\")\n-    ;\n-  // clang-format on\n-\n-  po::variables_map vm;\n-  try {\n-    po::store(po::parse_command_line(argc, argv, desc), vm);\n-    po::notify(vm);\n-  } catch(std::exception& e) {\n-    std::cerr << \"Error: \" << e.what() << std::endl << std::endl;\n-    std::cerr << \"Usage: \" << argv[0] << \" [options]\" << std::endl << std::endl;\n-    std::cerr << desc << std::endl;\n-    exit(1);\n-  }\n-\n-  if(vm.count(\"help\")) {\n-    std::cerr << \"Usage: \" << argv[0] << \" [options]\" << std::endl << std::endl;\n-    std::cerr << desc << std::endl;\n-    exit(0);\n-  }\n+  cli::CLIWrapper cli(\"Allowed options\");\n+  cli.add<size_t>(\n+      \"--max-size,-m\", \"Generate only  arg  most common vocabulary items\", 0);\n+\n+  cli.parse(argc, argv);\n \n   LOG(info, \"Creating vocabulary...\");\n \n   auto vocab = New<Vocab>();\n   InputFileStream corpusStrm(std::cin);\n   OutputFileStream vocabStrm(std::cout);\n-  vocab->create(corpusStrm, vocabStrm, vm[\"max-size\"].as<size_t>());\n+  vocab->create(corpusStrm, vocabStrm, cli.get<size_t>(\"max-size\"));","path":"src/command/marian_vocab.cpp","position":51,"original_position":51,"commit_id":"c31ed1fd5c32298ef01b97df40c8803412c09c68","original_commit_id":"c31ed1fd5c32298ef01b97df40c8803412c09c68","user":{"login":"snukky","id":1850195,"node_id":"MDQ6VXNlcjE4NTAxOTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1850195?v=4","gravatar_id":"","url":"https://api.github.com/users/snukky","html_url":"https://github.com/snukky","followers_url":"https://api.github.com/users/snukky/followers","following_url":"https://api.github.com/users/snukky/following{/other_user}","gists_url":"https://api.github.com/users/snukky/gists{/gist_id}","starred_url":"https://api.github.com/users/snukky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snukky/subscriptions","organizations_url":"https://api.github.com/users/snukky/orgs","repos_url":"https://api.github.com/users/snukky/repos","events_url":"https://api.github.com/users/snukky/events{/privacy}","received_events_url":"https://api.github.com/users/snukky/received_events","type":"User","site_admin":false},"body":"get() method can be already removed from CLI wrapper","created_at":"2018-09-13T08:55:19Z","updated_at":"2018-09-13T08:55:19Z","html_url":"https://github.com/marian-nmt/marian-dev/pull/303#discussion_r217308656","pull_request_url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/comments/217308656"},"html":{"href":"https://github.com/marian-nmt/marian-dev/pull/303#discussion_r217308656"},"pull_request":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303"}},"in_reply_to_id":217065781},"pull_request":{"url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303","id":214952033,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0OTUyMDMz","html_url":"https://github.com/marian-nmt/marian-dev/pull/303","diff_url":"https://github.com/marian-nmt/marian-dev/pull/303.diff","patch_url":"https://github.com/marian-nmt/marian-dev/pull/303.patch","issue_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues/303","number":303,"state":"closed","locked":false,"title":"Replace boost::program_options with a new CLI","user":{"login":"snukky","id":1850195,"node_id":"MDQ6VXNlcjE4NTAxOTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1850195?v=4","gravatar_id":"","url":"https://api.github.com/users/snukky","html_url":"https://github.com/snukky","followers_url":"https://api.github.com/users/snukky/followers","following_url":"https://api.github.com/users/snukky/following{/other_user}","gists_url":"https://api.github.com/users/snukky/gists{/gist_id}","starred_url":"https://api.github.com/users/snukky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snukky/subscriptions","organizations_url":"https://api.github.com/users/snukky/orgs","repos_url":"https://api.github.com/users/snukky/repos","events_url":"https://api.github.com/users/snukky/events{/privacy}","received_events_url":"https://api.github.com/users/snukky/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-12T12:59:57Z","updated_at":"2018-09-13T08:55:19Z","closed_at":"2018-09-12T13:37:08Z","merged_at":"2018-09-12T13:37:08Z","merge_commit_sha":"35707321edd4f98e69ab9bc82e6c563dbed971ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303/commits","review_comments_url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303/comments","review_comment_url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues/303/comments","statuses_url":"https://api.github.com/repos/marian-nmt/marian-dev/statuses/c31ed1fd5c32298ef01b97df40c8803412c09c68","head":{"label":"marian-nmt:rm-boost-po","ref":"rm-boost-po","sha":"c31ed1fd5c32298ef01b97df40c8803412c09c68","user":{"login":"marian-nmt","id":25546458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTQ2NDU4","avatar_url":"https://avatars3.githubusercontent.com/u/25546458?v=4","gravatar_id":"","url":"https://api.github.com/users/marian-nmt","html_url":"https://github.com/marian-nmt","followers_url":"https://api.github.com/users/marian-nmt/followers","following_url":"https://api.github.com/users/marian-nmt/following{/other_user}","gists_url":"https://api.github.com/users/marian-nmt/gists{/gist_id}","starred_url":"https://api.github.com/users/marian-nmt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marian-nmt/subscriptions","organizations_url":"https://api.github.com/users/marian-nmt/orgs","repos_url":"https://api.github.com/users/marian-nmt/repos","events_url":"https://api.github.com/users/marian-nmt/events{/privacy}","received_events_url":"https://api.github.com/users/marian-nmt/received_events","type":"Organization","site_admin":false},"repo":{"id":57997461,"node_id":"MDEwOlJlcG9zaXRvcnk1Nzk5NzQ2MQ==","name":"marian-dev","full_name":"marian-nmt/marian-dev","owner":{"login":"marian-nmt","id":25546458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTQ2NDU4","avatar_url":"https://avatars3.githubusercontent.com/u/25546458?v=4","gravatar_id":"","url":"https://api.github.com/users/marian-nmt","html_url":"https://github.com/marian-nmt","followers_url":"https://api.github.com/users/marian-nmt/followers","following_url":"https://api.github.com/users/marian-nmt/following{/other_user}","gists_url":"https://api.github.com/users/marian-nmt/gists{/gist_id}","starred_url":"https://api.github.com/users/marian-nmt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marian-nmt/subscriptions","organizations_url":"https://api.github.com/users/marian-nmt/orgs","repos_url":"https://api.github.com/users/marian-nmt/repos","events_url":"https://api.github.com/users/marian-nmt/events{/privacy}","received_events_url":"https://api.github.com/users/marian-nmt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marian-nmt/marian-dev","description":"The training framework for marian - development repository","fork":false,"url":"https://api.github.com/repos/marian-nmt/marian-dev","forks_url":"https://api.github.com/repos/marian-nmt/marian-dev/forks","keys_url":"https://api.github.com/repos/marian-nmt/marian-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marian-nmt/marian-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marian-nmt/marian-dev/teams","hooks_url":"https://api.github.com/repos/marian-nmt/marian-dev/hooks","issue_events_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues/events{/number}","events_url":"https://api.github.com/repos/marian-nmt/marian-dev/events","assignees_url":"https://api.github.com/repos/marian-nmt/marian-dev/assignees{/user}","branches_url":"https://api.github.com/repos/marian-nmt/marian-dev/branches{/branch}","tags_url":"https://api.github.com/repos/marian-nmt/marian-dev/tags","blobs_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marian-nmt/marian-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/marian-nmt/marian-dev/languages","stargazers_url":"https://api.github.com/repos/marian-nmt/marian-dev/stargazers","contributors_url":"https://api.github.com/repos/marian-nmt/marian-dev/contributors","subscribers_url":"https://api.github.com/repos/marian-nmt/marian-dev/subscribers","subscription_url":"https://api.github.com/repos/marian-nmt/marian-dev/subscription","commits_url":"https://api.github.com/repos/marian-nmt/marian-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/marian-nmt/marian-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/marian-nmt/marian-dev/contents/{+path}","compare_url":"https://api.github.com/repos/marian-nmt/marian-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marian-nmt/marian-dev/merges","archive_url":"https://api.github.com/repos/marian-nmt/marian-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marian-nmt/marian-dev/downloads","issues_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues{/number}","pulls_url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/marian-nmt/marian-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/marian-nmt/marian-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marian-nmt/marian-dev/labels{/name}","releases_url":"https://api.github.com/repos/marian-nmt/marian-dev/releases{/id}","deployments_url":"https://api.github.com/repos/marian-nmt/marian-dev/deployments","created_at":"2016-05-03T19:48:17Z","updated_at":"2018-09-12T18:10:47Z","pushed_at":"2018-09-12T18:23:51Z","git_url":"git://github.com/marian-nmt/marian-dev.git","ssh_url":"git@github.com:marian-nmt/marian-dev.git","clone_url":"https://github.com/marian-nmt/marian-dev.git","svn_url":"https://github.com/marian-nmt/marian-dev","homepage":"https://marian-nmt.github.io","size":7783,"stargazers_count":47,"watchers_count":47,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":39,"open_issues":47,"watchers":47,"default_branch":"master"}},"base":{"label":"marian-nmt:master","ref":"master","sha":"38722782de7b3a247e53e5218a9b259f3d740f8c","user":{"login":"marian-nmt","id":25546458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTQ2NDU4","avatar_url":"https://avatars3.githubusercontent.com/u/25546458?v=4","gravatar_id":"","url":"https://api.github.com/users/marian-nmt","html_url":"https://github.com/marian-nmt","followers_url":"https://api.github.com/users/marian-nmt/followers","following_url":"https://api.github.com/users/marian-nmt/following{/other_user}","gists_url":"https://api.github.com/users/marian-nmt/gists{/gist_id}","starred_url":"https://api.github.com/users/marian-nmt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marian-nmt/subscriptions","organizations_url":"https://api.github.com/users/marian-nmt/orgs","repos_url":"https://api.github.com/users/marian-nmt/repos","events_url":"https://api.github.com/users/marian-nmt/events{/privacy}","received_events_url":"https://api.github.com/users/marian-nmt/received_events","type":"Organization","site_admin":false},"repo":{"id":57997461,"node_id":"MDEwOlJlcG9zaXRvcnk1Nzk5NzQ2MQ==","name":"marian-dev","full_name":"marian-nmt/marian-dev","owner":{"login":"marian-nmt","id":25546458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTQ2NDU4","avatar_url":"https://avatars3.githubusercontent.com/u/25546458?v=4","gravatar_id":"","url":"https://api.github.com/users/marian-nmt","html_url":"https://github.com/marian-nmt","followers_url":"https://api.github.com/users/marian-nmt/followers","following_url":"https://api.github.com/users/marian-nmt/following{/other_user}","gists_url":"https://api.github.com/users/marian-nmt/gists{/gist_id}","starred_url":"https://api.github.com/users/marian-nmt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marian-nmt/subscriptions","organizations_url":"https://api.github.com/users/marian-nmt/orgs","repos_url":"https://api.github.com/users/marian-nmt/repos","events_url":"https://api.github.com/users/marian-nmt/events{/privacy}","received_events_url":"https://api.github.com/users/marian-nmt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marian-nmt/marian-dev","description":"The training framework for marian - development repository","fork":false,"url":"https://api.github.com/repos/marian-nmt/marian-dev","forks_url":"https://api.github.com/repos/marian-nmt/marian-dev/forks","keys_url":"https://api.github.com/repos/marian-nmt/marian-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marian-nmt/marian-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marian-nmt/marian-dev/teams","hooks_url":"https://api.github.com/repos/marian-nmt/marian-dev/hooks","issue_events_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues/events{/number}","events_url":"https://api.github.com/repos/marian-nmt/marian-dev/events","assignees_url":"https://api.github.com/repos/marian-nmt/marian-dev/assignees{/user}","branches_url":"https://api.github.com/repos/marian-nmt/marian-dev/branches{/branch}","tags_url":"https://api.github.com/repos/marian-nmt/marian-dev/tags","blobs_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marian-nmt/marian-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/marian-nmt/marian-dev/languages","stargazers_url":"https://api.github.com/repos/marian-nmt/marian-dev/stargazers","contributors_url":"https://api.github.com/repos/marian-nmt/marian-dev/contributors","subscribers_url":"https://api.github.com/repos/marian-nmt/marian-dev/subscribers","subscription_url":"https://api.github.com/repos/marian-nmt/marian-dev/subscription","commits_url":"https://api.github.com/repos/marian-nmt/marian-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/marian-nmt/marian-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/marian-nmt/marian-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/marian-nmt/marian-dev/contents/{+path}","compare_url":"https://api.github.com/repos/marian-nmt/marian-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marian-nmt/marian-dev/merges","archive_url":"https://api.github.com/repos/marian-nmt/marian-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marian-nmt/marian-dev/downloads","issues_url":"https://api.github.com/repos/marian-nmt/marian-dev/issues{/number}","pulls_url":"https://api.github.com/repos/marian-nmt/marian-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/marian-nmt/marian-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/marian-nmt/marian-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marian-nmt/marian-dev/labels{/name}","releases_url":"https://api.github.com/repos/marian-nmt/marian-dev/releases{/id}","deployments_url":"https://api.github.com/repos/marian-nmt/marian-dev/deployments","created_at":"2016-05-03T19:48:17Z","updated_at":"2018-09-12T18:10:47Z","pushed_at":"2018-09-12T18:23:51Z","git_url":"git://github.com/marian-nmt/marian-dev.git","ssh_url":"git@github.com:marian-nmt/marian-dev.git","clone_url":"https://github.com/marian-nmt/marian-dev.git","svn_url":"https://github.com/marian-nmt/marian-dev","homepage":"https://marian-nmt.github.io","size":7783,"stargazers_count":47,"watchers_count":47,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":39,"open_issues":47,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303"},"html":{"href":"https://github.com/marian-nmt/marian-dev/pull/303"},"issue":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/issues/303"},"comments":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/marian-nmt/marian-dev/statuses/c31ed1fd5c32298ef01b97df40c8803412c09c68"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"snukky"}}