{"id":23589547,"url":"https://github.com/piaschilling/svgpathmapper","last_synced_at":"2026-04-16T17:32:13.962Z","repository":{"id":268727595,"uuid":"463563851","full_name":"PiaSchilling/SvgPathMapper","owner":"PiaSchilling","description":"Simple program to create material icons from svg files by mapping xml code to kotlin code","archived":false,"fork":false,"pushed_at":"2022-02-28T23:10:15.000Z","size":35,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T06:15:36.307Z","etag":null,"topics":["kotlin","xml"],"latest_commit_sha":null,"homepage":"","language":"Java","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/PiaSchilling.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":"2022-02-25T14:31:48.000Z","updated_at":"2022-02-28T23:06:29.000Z","dependencies_parsed_at":"2024-12-18T15:26:23.490Z","dependency_job_id":"5fe5de8e-f74a-4dee-8a6a-0723f74dba0d","html_url":"https://github.com/PiaSchilling/SvgPathMapper","commit_stats":null,"previous_names":["piaschilling/svgpathmapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiaSchilling%2FSvgPathMapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiaSchilling%2FSvgPathMapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiaSchilling%2FSvgPathMapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiaSchilling%2FSvgPathMapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiaSchilling","download_url":"https://codeload.github.com/PiaSchilling/SvgPathMapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239420313,"owners_count":19635544,"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":["kotlin","xml"],"created_at":"2024-12-27T06:15:39.510Z","updated_at":"2025-10-30T17:43:33.553Z","avatar_url":"https://github.com/PiaSchilling.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SvgPathMapper\nSimple program to create material icons from svg files by mapping xml code to kotlin code\n\n### What it can do - Example\n\n\nThe following svg code is used as the input: (the icon looks like this ![android_black_24dp](https://user-images.githubusercontent.com/96486990/156072201-e23e27cc-065c-4471-8002-ec3d9552c595.svg))\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003c!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"\u003e\n\u003csvg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"\u003e\n    \u003cpath d=\"M17.532,20.58C16.98,20.58 16.524,20.136 16.524,19.584C16.524,19.032 16.98,18.6 17.532,18.6C18.084,18.6 18.54,19.032 18.54,19.584C18.54,20.136 18.084,20.58 17.532,20.58M6.492,20.58C5.94,20.58 5.484,20.136 5.484,19.584C5.484,19.032 5.94,18.6 6.492,18.6C7.044,18.6 7.488,19.032 7.488,19.584C7.488,20.136 7.044,20.58 6.492,20.58M17.892,14.568L19.896,11.112C20.004,10.908 19.932,10.656 19.74,10.548C19.536,10.428 19.284,10.5 19.2,10.704L17.148,14.196C15.54,13.464 13.8,13.08 12,13.092C10.164,13.092 8.4,13.488 6.876,14.184L4.848,10.692C4.74,10.488 4.488,10.416 4.284,10.536C4.08,10.644 4.02,10.896 4.128,11.1L6.12,14.556C2.7,16.428 0.348,19.896 -0,24L24,24C23.664,19.908 21.324,16.44 17.892,14.568Z\" style=\"fill-rule:nonzero;\"/\u003e\n\u003c/svg\u003e\n```\n\nThe kotlin code created by the program then looks like this:\n\n```kotlin\nimport androidx.compose.material.icons.Icons\nimport androidx.compose.material.icons.materialIcon\nimport androidx.compose.material.icons.materialPath\nimport androidx.compose.ui.graphics.vector.ImageVector\n\npublic val Icons.Filled.Android: ImageVector\n    get() {\n        if (_android != null) {\n            return _android!!\n        }\n        _android = materialIcon(name = \"Filled.Android\") {\n            materialPath {\n               moveTo(17.532f,20.58f)\n               curveTo(16.98f,20.58f,16.524f,20.136f,16.524f,19.584f)\n               curveTo(16.524f,19.032f,16.98f,18.6f,17.532f,18.6f)\n               curveTo(18.084f,18.6f,18.54f,19.032f,18.54f,19.584f)\n               curveTo(18.54f,20.136f,18.084f,20.58f,17.532f,20.58f)\n               moveTo(6.492f,20.58f)\n               curveTo(5.94f,20.58f,5.484f,20.136f,5.484f,19.584f)\n               curveTo(5.484f,19.032f,5.94f,18.6f,6.492f,18.6f)\n               curveTo(7.044f,18.6f,7.488f,19.032f,7.488f,19.584f)\n               curveTo(7.488f,20.136f,7.044f,20.58f,6.492f,20.58f)\n               moveTo(17.892f,14.568f)\n               lineTo(19.896f,11.112f)\n               curveTo(20.004f,10.908f,19.932f,10.656f,19.74f,10.548f)\n               curveTo(19.536f,10.428f,19.284f,10.5f,19.2f,10.704f)\n               lineTo(17.148f,14.196f)\n               curveTo(15.54f,13.464f,13.8f,13.08f,12f,13.092f)\n               curveTo(10.164f,13.092f,8.4f,13.488f,6.876f,14.184f)\n               lineTo(4.848f,10.692f)\n               curveTo(4.74f,10.488f,4.488f,10.416f,4.284f,10.536f)\n               curveTo(4.08f,10.644f,4.02f,10.896f,4.128f,11.1f)\n               lineTo(6.12f,14.556f)\n               curveTo(2.7f,16.428f,0.348f,19.896f,-0f,24f)\n               lineTo(24f,24f)\n               curveTo(23.664f,19.908f,21.324f,16.44f,17.892f,14.568f)\n               close()\n\n            }\n        }\n        return _android!!\n    }\n\nprivate var _android: ImageVector? = null\n```\nA kotlin file is created, which contains the generated code to be able to include it easily into the project. The output file is saved to the same directory as the input svg file. \n\nPossibly existing matrix transformations are flattened/removed by calculating the path coordinates new based on the matrix values. Translate and other transformations are currently not taken care of. \n\n### How it works\n\nThere are two programm arguments required:\n\n1. the path to the input svg file \n2. the name the material icon should have (will be used to name the variables and the kotlin file)\n\nJust set both of them in the given order as arguments for the main method: e.g. `/Desktop/android_black_24dp.svg Android`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiaschilling%2Fsvgpathmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiaschilling%2Fsvgpathmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiaschilling%2Fsvgpathmapper/lists"}