{"id":111340,"date":"2023-11-06T15:10:43","date_gmt":"2023-11-06T13:10:43","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/argparse-3-0"},"modified":"2023-11-06T15:10:43","modified_gmt":"2023-11-06T13:10:43","slug":"argparse-3-0","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/novosti-interneta\/argparse-3-0","title":{"rendered":"argparse 3.0","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"argparse 3.0\" src=\"\/wp-content\/uploads\/2023\/11\/dac068866e8d7593954c61f76ef98905.jpg\" style=\"display:block;margin: 0 auto;\" \/>                                <noindex>      <noindex><\/p>\n<p>L\u00ebshimi i versionit 3.0 t\u00eb bibliotek\u00ebs C++ (dialekti C++17) p\u00ebr analizimin e argumenteve t\u00eb linj\u00ebs s\u00eb komand\u00ebs, <a rel=\"nofollow\" href=\"https:\/\/github.com\/p-ranav\/argparse\">argparse<\/a>, e shp\u00ebrndar\u00eb n\u00ebn licenc\u00ebn MIT.<\/p>\n<p><\/noindex><\/noindex>  <\/p>\n<p>\u00c7far\u00eb ka t\u00eb re:<\/p>\n<ul>\n<li>Shtuar mb\u00ebshtetje p\u00ebr argumente ekskluzive:<\/li>\n<\/ul>\n<p> auto &amp;group = program.add_mutually_exclusive_group(); group.add_argument(&quot;&#8212;first&quot;); group.add_argument(&quot;&#8212;second&quot;);   <\/p>\n<ul>\n<li>Shtuar moduli C++20;<\/li>\n<li>Shtuar mb\u00ebshtetje p\u00ebr zgjedhje nga shum\u00eb vlera:<\/li>\n<\/ul>\n<p> program.add_argument(&quot;input&quot;)   .default_value(std::string{&quot;baz&quot;})   .choices(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;);  program.add_argument(&quot;count&quot;)   .default_value(0)   .choices(0, 1, 2, 3, 4, 5);   <\/p>\n<ul>\n<li>Shtuar mb\u00ebshtetje p\u00ebr notimin binar, p\u00ebr shembull, 0b101:<\/li>\n<\/ul>\n<p> argparse::ArgumentParser program(&quot;test&quot;); program.add_argument(&quot;-n&quot;).scan&lt;&#8216;b&#8217;, uint8_t&gt;();   <\/p>\n<ul>\n<li>Shtuar versionin e tepruar is_subcommand_used, q\u00eb merr parserin e n\u00ebnkomandave;<\/li>\n<li>Shtuar parametri exit_on_default_arguments n\u00eb ArgumentParser;<\/li>\n<li>\u00ebsht\u00eb shtuar mb\u00ebshtetje p\u00ebr fshehjen e n\u00ebnkomandave nga dalja e komand\u00ebs &#8212;help:<\/li>\n<\/ul>\n<p> argparse::ArgumentParser program(&quot;test&quot;);  argparse::ArgumentParser hidden_cmd(&quot;hidden&quot;); hidden_cmd.add_argument(&quot;files&quot;).remaining(); hidden_cmd.set_suppress(true);  program.add_subparser(hidden_cmd);   <\/p>\n<ul>\n<li>Shtuar mund\u00ebsia p\u00ebr t\u00eb verifikuar pranin\u00eb e vlerave t\u00eb analizuar n\u00eb ArgumentParser;<\/li>\n<li>Shtuar p\u00ebrputhje p\u00ebr kolona t\u00eb ndar\u00eb n\u00eb dokumentacionin shum\u00ebstr\u00ebsh p\u00ebr argumentet;<\/li>\n<li>u rregulluan shum\u00eb gabime.<\/li>\n<\/ul>\n<p>Burimi: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.linux.org.ru\/news\/development\/17405052\">linux.org.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0432\u044b\u043f\u0443\u0441\u043a 3.0 C++ (\u0434\u0438\u0430\u043b\u0435\u043a\u0442 C++17) header-only \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 argparse, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT. \u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432: auto &amp;group = program.add_mutually_exclusive_group(); group.add_argument(&quot;&#8212;first&quot;); group.add_argument(&quot;&#8212;second&quot;); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c C++20; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: program.add_argument(&quot;input&quot;) .default_value(std::string{&quot;baz&quot;}) .choices(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;); program.add_argument(&quot;count&quot;) .default_value(0) .choices(0, 1, 2, 3, 4, 5); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":111341,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-111340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-novosti-interneta"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0432\u044b\u043f\u0443\u0441\u043a 3.0 C++ (\u0434\u0438\u0430\u043b\u0435\u043a\u0442 C++17) header-only \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 argparse, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT. \u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432: auto &amp;group = program.add_mutually_exclusive_group(); group.add_argument(&quot;--first&quot;); group.add_argument(&quot;--second&quot;); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c C++20; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: program.add_argument(&quot;input&quot;) .default_value(std::string{&quot;baz&quot;}) .choices(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;); program.add_argument(&quot;count&quot;) .default_value(0) .choices(0, 1, 2, 3, 4, 5); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/novosti-interneta\/argparse-3-0\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47argparse 3.0 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0432\u044b\u043f\u0443\u0441\u043a 3.0 C++ (\u0434\u0438\u0430\u043b\u0435\u043a\u0442 C++17) header-only \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 argparse, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT. \u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432: auto &amp;group = program.add_mutually_exclusive_group(); group.add_argument(&quot;--first&quot;); group.add_argument(&quot;--second&quot;); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c C++20; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: program.add_argument(&quot;input&quot;) .default_value(std::string{&quot;baz&quot;}) .choices(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;); program.add_argument(&quot;count&quot;) .default_value(0) .choices(0, 1, 2, 3, 4, 5); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/novosti-interneta\/argparse-3-0\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-11-06T13:10:43+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-11-06T13:10:43+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47argparse 3.0 | ProHoster","description":"U lan\u00e7ua versionin 3.0 C++ (dialekti C++17) t\u00eb bibliotek\u00ebs header-only p\u00ebr analiz\u00ebn e argumenteve t\u00eb linj\u00ebs s\u00eb komand\u00ebs argparse, e shp\u00ebrndar\u00eb sipas licenc\u00ebs MIT. \u00c7far\u00eb \u00ebsht\u00eb e re: \u00ebsht\u00eb shtuar mb\u00ebshtetje p\u00ebr argumentet q\u00eb p\u00ebrjashtojn\u00eb nj\u00ebri-tjetrin: auto &amp;group = program.add_mutually_exclusive_group(); group.add_argument(\"--first\"); group.add_argument(\"--second\"); \u00ebsht\u00eb shtuar moduli C++20; \u00ebsht\u00eb shtuar mb\u00ebshtetje p\u00ebr zgjedhjen nga disa vlera: program.add_argument(\"input\").default_value(std::string{\"baz\"}).choices(\"foo\", \"bar\", \"baz\"); program.add_argument(\"count\").default_value(0).choices(0, 1, 2, 3, 4, 5); \u00ebsht\u00eb shtuar mb\u00ebshtetje binare","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/novosti-interneta\/argparse-3-0","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47argparse 3.0 | ProHoster","og:description":"\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0432\u044b\u043f\u0443\u0441\u043a 3.0 C++ (\u0434\u0438\u0430\u043b\u0435\u043a\u0442 C++17) header-only \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 argparse, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 MIT. \u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432: auto &amp;group = program.add_mutually_exclusive_group(); group.add_argument(&quot;--first&quot;); group.add_argument(&quot;--second&quot;); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c C++20; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: program.add_argument(&quot;input&quot;) .default_value(std::string{&quot;baz&quot;}) .choices(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;); program.add_argument(&quot;count&quot;) .default_value(0) .choices(0, 1, 2, 3, 4, 5); \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439","og:url":"https:\/\/prohoster.info\/sq\/blog\/novosti-interneta\/argparse-3-0","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2023-11-06T13:10:43+00:00","article:modified_time":"2023-11-06T13:10:43+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/111340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=111340"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/111340\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/111341"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=111340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=111340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=111340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}