{"categories":[{"label":"Markup","url":"https://skillfed.io/packages/category/text-processing-markup/2"}],"enrichment":{"capability":"xmacro is a command-line and Python tool for defining and expanding XML macros\u2014named values, parameterized blocks, and conditional includes\u2014to generate expanded XML files suitable for URDF and SDF robot description formats.","skillfed_tags":["robot-description","xml-templating","abandoned"],"use_cases":["Reduce duplication in URDF robot descriptions by defining reusable inertia and geometry macros for common shapes","Generate multiple SDF model variants from a single template by overriding macro values at parse time","Preprocess robot description files in ROS 2 launch scripts using the Python API before deployment","Conditionally include or exclude robot components based on macro parameters without manual file editing","Include common macro definitions across multiple URDF or SDF files via the xmacro_include tag"],"what_it_does":"xmacro is a simplified XML macro language inspired by ROS's xacro, designed to preprocess URDF and SDF robot description files. It runs independently of ROS and can be installed via pip. The tool supports value macros (named constants substituted into XML), block macros (parameterized XML fragments), math expressions within substitution braces, file inclusion, and conditional blocks. It provides both a command-line interface and a Python API for integration into build or launch workflows.\n\nThe package includes two specialized variants: xmacro4sdf and xmacro4urdf, which add pre-defined geometry and inertia macros specific to each format, along with path resolution for model:// and package:// URIs. Macro nesting is supported up to 5 levels deep. The implementation uses Python's eval() for expression evaluation, which the documentation notes is unsafe for untrusted input.","worth_installing":"Yes, if you need XML macro expansion for URDF or SDF files and are comfortable with an abandoned package. The tool is simple, has no dependencies, and works well for its stated purpose. However, do not use it for untrusted or adversarial input due to eval()-based expression evaluation, and be aware that no security patches or feature updates will be released."},"id":"xmacro","links":{"html":"https://skillfed.io/packages/xmacro","md":"https://skillfed.io/packages/xmacro.md","pypi":"https://pypi.org/project/xmacro/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2022-01-18","license_spdx":null,"license_treatment":"permissive","name":"xmacro","python_support":"unspecified","summary":"a simple XML macro tool"},"popularity":{"monthly_downloads":77532,"position":14517,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2.1"}
