{"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\/de\/blog\/news\/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>Die Version 3.0 der C++ (C++17-Dialekt) Header-only Bibliothek zur Parsing von Kommandozeilenargumenten wurde ver\u00f6ffentlicht. <a rel=\"nofollow\" href=\"https:\/\/github.com\/p-ranav\/argparse\">argparse<\/a>, lizenziert unter der MIT-Lizenz.<\/p>\n<p><\/noindex><\/noindex>  <\/p>\n<p>Neuigkeiten:<\/p>\n<ul>\n<li>Unterst\u00fctzung f\u00fcr gegenseitige Ausschlussargumente hinzugef\u00fcgt:<\/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>C++20-Modul hinzugef\u00fcgt;<\/li>\n<li>Unterst\u00fctzung f\u00fcr die Auswahl aus mehreren Werten hinzugef\u00fcgt:<\/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>Unterst\u00fctzung f\u00fcr die bin\u00e4re Notation, z. B. 0b101, hinzugef\u00fcgt:<\/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>\u00dcberladene Version von is_subcommand_used hinzugef\u00fcgt, die den Unterbefehl-Parser akzeptiert;<\/li>\n<li>Der Parameter exit_on_default_arguments wurde zum ArgumentParser hinzugef\u00fcgt;<\/li>\n<li>Die Unterst\u00fctzung f\u00fcr das Verstecken von Unterbefehlen aus der Ausgabe des Befehls &#8212;help wurde hinzugef\u00fcgt:<\/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>M\u00f6glichkeit zur \u00dcberpr\u00fcfung der Anwesenheit von geparsten Werten im ArgumentParser hinzugef\u00fcgt;<\/li>\n<li>Spaltenausrichtung f\u00fcr mehrzeilige Hilfe zu Argumenten hinzugef\u00fcgt;<\/li>\n<li>Viele Fehler wurden behoben.<\/li>\n<\/ul>\n<p>Quelle: <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-news"],"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.\" \/>\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\/de\/blog\/news\/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=\"de_DE\" \/>\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.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/news\/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":"Die Version 3.0 C++ (Dialekt C++17) ist nun header-only verf\u00fcgbar.","canonical_url":"https:\/\/prohoster.info\/de\/blog\/news\/argparse-3-0","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","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.","og:url":"https:\/\/prohoster.info\/de\/blog\/news\/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\/de\/wp-json\/wp\/v2\/posts\/111340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=111340"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/111340\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/111341"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=111340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=111340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=111340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}