Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/icanzilb/powerups
cli for dynamic XML includes
https://github.com/icanzilb/powerups
swift xml
Last synced: 14 days ago
JSON representation
cli for dynamic XML includes
- Host: GitHub
- URL: https://github.com/icanzilb/powerups
- Owner: icanzilb
- License: mit
- Created: 2022-03-17T22:43:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-18T09:36:58.000Z (over 2 years ago)
- Last Synced: 2024-03-15T12:49:09.159Z (8 months ago)
- Topics: swift, xml
- Language: Swift
- Homepage: https://trycombine.com/posts/xcode-powerups/
- Size: 10.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PowerUps
A command line tool to help me manage a large Xcode Instruments XML file. It's designed to process a bunch of includes and variables before running in Xcode and then remove the automatically generated code when the run has finished.
![Diagram of the powerups workflow](https://trycombine.com/images/timelane/powerups-workflow.png)
## Usage
This tool has a very specific use-case aimed at large XML files (like Xcode Instruments). I've written a blog post with more details here: https://trycombine.com/posts/xcode-powerups/
Generally, these are the steps to integrate with an Xcode Instruments project:
1. Add a Build/pre-action to run the powerups on your instruments file:
```
/path/to/powerups \
$SOURCE_ROOT/Instrument/MyInstrument.instrpkg \
--includesFolder \
$SOURCE_ROOT/Instrument \
--variables \
$SOURCE_ROOT/Instrument/global-variables.json \
--overwrite \
> $SOURCE_ROOT/logs/powerups-log.txt
```This pre-action will run the compiled `powerups` binary and feed it the `instrpkg` file and the given includes directory and global variables file. The output is saved to the given log text file.
2. Add a Run/post-action to clean up your `instrpkg` file so you can edit it manually if needed after running:
```
/path/to/powerups \
$SOURCE_ROOT/Instrument/MyInstrument.instrpkg \
--cleanup \
--overwrite \
&& > $SOURCE_ROOT/logs/powerups-log.txt
```That's it. When you run the instrument for testing, powerups will process the includes and variables, add the generated content in the package file, and finally when you close Instruments and stop running, it'll remove the generated content from your source file.
## Example
For a simple use case from the command line run the `run-demo.sh` script in the repo root folder.
## License
Copyright (c) Marin Todorov 2022 This code is provided under the MIT License.