{"id":17991325,"url":"https://github.com/oleksiyrudenko/commandlineparser","last_synced_at":"2025-04-04T04:15:46.262Z","repository":{"id":85274049,"uuid":"41595803","full_name":"OleksiyRudenko/CommandLineParser","owner":"OleksiyRudenko","description":null,"archived":false,"fork":false,"pushed_at":"2015-09-17T11:19:52.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T01:37:01.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OleksiyRudenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-29T14:19:47.000Z","updated_at":"2015-08-29T14:45:14.000Z","dependencies_parsed_at":"2023-03-06T07:16:08.327Z","dependency_job_id":null,"html_url":"https://github.com/OleksiyRudenko/CommandLineParser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2FCommandLineParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2FCommandLineParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2FCommandLineParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2FCommandLineParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OleksiyRudenko","download_url":"https://codeload.github.com/OleksiyRudenko/CommandLineParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247117762,"owners_count":20886439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T19:21:16.582Z","updated_at":"2025-04-04T04:15:46.246Z","avatar_url":"https://github.com/OleksiyRudenko.png","language":"C#","readme":"# C# Command Line Parser\nCommand Line Parser is a test application submitted to [Kottans](http://kottans.org/) to apply for a C# course.\nThe application parses console command line arguments producing predictable results according to an assignment.\n\n## Requirements\nTo build the application Visual Studio 2010+ is required.\n\n## Features\nCommand line arguments:\n* `-k key value key value...` - prints pairs of key and value; `\u003cnull\u003e` replaces absent value\n* `-print message to print` - prints given message\n* `-ping` - beeps and prints \"Pinging...\" NB! No actual pinging is effected whatever it might mean except the behaviour described\n* `-d [dateFormat]` - prints current date using given format; default format is yyyy-MM-dd.\n* `-exit` - terminates application immediately.\n\nUse `/?`, `-help` or `/help` command-line argument to get help from the application in console.\nCommands are executed in order of their appearance except for `/?`, `/help` and `-help`, which are ignored once help output occured.\n\n## Compilation\nOpen solution with Visual Studio and press F7 to build the application.\n\n## Tests\n1. Open solution root folder in Explorer.\n2. Launch `CommandLineParserTest.bat`\n\nYou will see app behaviour run with various command-line arguments as well as error handling.\n\n## Extending Features\nFor e.g. you want to implement new command, say, `-foo`.\nAdd new class to the solution.\nClass name should start with `Cmd` followed by command name (excluding leading dash) with first letter capitalized.\nThis class should extend abstract class Cmd and implement two methods:\n\n1. `Usage()`, which returns String containing command usage description.\n2. `ToString()`, which returns String containing arguments processing result.\n\nExample:\n```\n    class CmdFoo : Cmd\n    {\n        static public String Usage()\n        {\n            return \"-foo argument anotherArgument yetAnother Argument\";\n        }\n        override public String ToString()\n        {\n            // process arguments, contained in the field arguments of Queue\u003cString\u003e type\n            return (arguments.Count \u003e 0) ? arguments.Dequeue() : \"\"; // or whatever you want\n        }\n    }\n```\nAmend `CommandLineParserTest.bat` as appropriate to test your command.\n\n## Usage\nWell, I doubt one can make any real use from this application. But, please, feel free playing around.\n`CommandLineParserTest.bat` is a good source of ideas for that. Amend it to see how various command-line arguments affect application output.\n\n## Author\nOleksiy Rudenko oleksiy.rudenko@gmail.com\n\nAug 29, 2015","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleksiyrudenko%2Fcommandlineparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleksiyrudenko%2Fcommandlineparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleksiyrudenko%2Fcommandlineparser/lists"}