{"id":19134647,"url":"https://github.com/marktsuchida/vcxproj-stream-editor","last_synced_at":"2025-05-06T19:28:44.348Z","repository":{"id":9759323,"uuid":"11726275","full_name":"marktsuchida/vcxproj-stream-editor","owner":"marktsuchida","description":"Simple Python library to modify Visual Studio .vcxproj files without spurious changes","archived":false,"fork":false,"pushed_at":"2024-07-07T19:35:13.000Z","size":24,"stargazers_count":11,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T09:43:46.842Z","etag":null,"topics":["vcxproj","visual-studio"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/vcxproj-stream-editor/","language":"Python","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/marktsuchida.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-28T21:44:24.000Z","updated_at":"2024-07-07T19:35:15.000Z","dependencies_parsed_at":"2024-11-09T06:28:25.455Z","dependency_job_id":"11b29756-8dcd-4276-872f-b9b4191c0a14","html_url":"https://github.com/marktsuchida/vcxproj-stream-editor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktsuchida%2Fvcxproj-stream-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktsuchida%2Fvcxproj-stream-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktsuchida%2Fvcxproj-stream-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktsuchida%2Fvcxproj-stream-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marktsuchida","download_url":"https://codeload.github.com/marktsuchida/vcxproj-stream-editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752425,"owners_count":21798796,"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":["vcxproj","visual-studio"],"created_at":"2024-11-09T06:27:37.976Z","updated_at":"2025-05-06T19:28:44.323Z","avatar_url":"https://github.com/marktsuchida.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vcxproj-stream-editor\nSimple Python library to parse Microsoft Visual Studio .vcxproj files and modify/rewrite without spurious changes\n\n`pip install vcxproj-stream-editor`\n\n## Usage:\n\nGiven the following simplified `myproject.vcxproj`:\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cProject DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"\u003e\n  \u003cPropertyGroup Label=\"Globals\"\u003e\n    \u003cProjectGuid\u003e{96F21549-A7BF-4695-A1B1-B43625B91A14}\u003c/ProjectGuid\u003e\n  \u003c/PropertyGroup\u003e\n  \u003cItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\"\u003e\n    \u003cClCompile\u003e\n      \u003cWarningLevel\u003eLevel3\u003c/WarningLevel\u003e\n    \u003c/ClCompile\u003e\n  \u003c/ItemDefinitionGroup\u003e\n\u003c/Project\u003e\n```\n\n### Example 1 (input only):\n``` python\nimport vcxproj\n\n@vcxproj.coroutine\ndef print_project_guid():\n    while True:\n        action, params = yield\n        if action == \"start_elem\" and params[\"name\"] == \"ProjectGuid\":\n            action, params = yield\n            assert action == \"chars\"\n            print(\"Project GUID is \", params[\"content\"])\n\nvcxproj.check_file(\"myproject.vcxproj\", print_project_guid)\n```\nOutput:\n```\nProject GUID is {96F21549-A7BF-4695-A1B1-B43625B91A14}\n```\n\n### Example 2 (input and output):\n``` python\nimport vcxproj\n\n@vcxproj.coroutine\ndef remove_warning_level(target)\n    while True:\n        action, params = yield\n        if action == \"start_elem\" and params[\"name\"] == \"WarningLevel\":\n            action, params = yield\n            assert action == \"chars\"\n            action, params = yield\n            assert action == \"end_elem\"\n            assert params[\"name\"] == \"WarningLevel\"\n            continue\n        target.send((action, params))\n        \nvcxproj.filter_file(\"myproject.vcxproj\", remove_warning_level, \"myproject.stripped.vcxproj\")\n```\n\n`myproject.stripped.vcxproj` will have the following content:\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cProject DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"\u003e\n  \u003cPropertyGroup Label=\"Globals\"\u003e\n    \u003cProjectGuid\u003e{96F21549-A7BF-4695-A1B1-B43625B91A14}\u003c/ProjectGuid\u003e\n  \u003c/PropertyGroup\u003e\n  \u003cItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\"\u003e\n    \u003cClCompile\u003e\n    \u003c/ClCompile\u003e\n  \u003c/ItemDefinitionGroup\u003e\n\u003c/Project\u003e\n```\n\n### Possible values for `(action, params)`:\n| action       | params                                                               |\n|--------------|----------------------------------------------------------------------|\n| `start_elem` | `{\"name\":\u003celem_name\u003e, \"attrs\":{\u003cattr1\u003e:\u003cvalue1\u003e, \u003cattr2\u003e:\u003cvalue2\u003e}}` |\n| `chars`      | `{\"content\":\u003ccontent\u003e}`                                              |\n| `end_elem`   | `{\"name\":\u003celem_name\u003e}`                                               |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarktsuchida%2Fvcxproj-stream-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarktsuchida%2Fvcxproj-stream-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarktsuchida%2Fvcxproj-stream-editor/lists"}