https://github.com/srwiez/svgtinyps-cli
CLI tool for SVG Tiny P/S (Portable and Secure) conversion
https://github.com/srwiez/svgtinyps-cli
bimi cli phar php svg
Last synced: 16 days ago
JSON representation
CLI tool for SVG Tiny P/S (Portable and Secure) conversion
- Host: GitHub
- URL: https://github.com/srwiez/svgtinyps-cli
- Owner: SRWieZ
- License: mit
- Created: 2023-10-31T22:51:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-21T10:19:53.000Z (5 months ago)
- Last Synced: 2025-04-06T04:48:23.426Z (22 days ago)
- Topics: bimi, cli, phar, php, svg
- Language: PHP
- Homepage: https://checkbimi.com/convertsvg
- Size: 175 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# svgtinyps


CLI Tool for SVG Tiny P/S (Portable and Secure) conversion and BIMI compliance.
[Read more from bimi group](https://bimigroup.org/creating-bimi-svg-logo-files/)
and [the RFC](https://datatracker.ietf.org/doc/id/draft-svg-tiny-ps-abrotman-00.txt)๐งช If you just want to convert your SVG in a nice UI, you can use the
[online version of the converter!](https://checkbimi.com/convertsvg)You can also checkout the [PHP package](https://github.com/SRWieZ/php-svg-ps-converter) that this project is based on.
## ๐ Installation
[//]: # (Download the latest release from [Github releases](https://github.com/SRWieZ/svgtinyps-cli/releases))
Via [Composer](https://getcomposer.org/) global install command
```bash
composer global install srwiez/svgtinyps-cli
```By [downloading binaries](https://github.com/SRWieZ/svgtinyps-cli/releases/latest) on the latest release, currently only these binaries are compiled on the CI:
- macOS x86_64
- macOS arm64
- linux x86_64
- linux arm64
- windows x64[//]: # (Coming soon to [Homebrew](https://brew.sh/))
[//]: # (Via [Homebrew](https://brew.sh/) (macOS & Linux))
[//]: # (```bash)
[//]: # (brew tap srwiez/homebrew-tap)
[//]: # (brew install svgtinyps)
[//]: # (```)
## ๐ Usage
Identify issues in an SVG file
```bash
svgtinyps issues input.svg
```Convert an SVG file to SVG (P/S)
```bash
svgtinyps convert input.svg output.svg
```If in the identified issues, you missing th title tag, you can set its value with the `--title` option
```bash
svgtinyps convert input.svg output.svg --title="My awesome company"
```## ๐ฆ Testing
This project use [Pest](https://pestphp.com/) for testing.
```bash
composer test
```## ๐ฅ Contribute
This project follows PSR coding style. You can use `composer pint` to apply.All tests are executed with pest. Use `composer pest`
It's recommended to execute `composer qa` before commiting (alias for executing Pint and Pest)
## ๐ง Build from sources
This project use [box](https://github.com/box-project/box), [php-static-cli](https://github.com/crazywhalecc/static-php-cli) and [php-micro](https://github.com/dixyes/phpmicro).
A build script has been created to build the project. (tested only on macOS x86_64)```bash
composer build
```
Then you can build the binary that you can retrieve in `build/bin/`[//]: # (You can also build it from Github Workflow, or locally on MacOS using [act](https://github.com/nektos/act))
[//]: # (```bash)
[//]: # (act -j build-macos-binary -P macos-latest=-self-hosted)
[//]: # (act -j build-linux-binary)
[//]: # (act -j build-linux-arm-binary)
[//]: # (```)
## ๐ Roadmap
Pull requests are welcome! Here are some ideas to get you started:
- Use Symfony Console for better ui
- Publish on Homebrew## ๐ฅ Credits
**svgtinyps** was created by Eser DENIZ.
Inspired by the official scripts
of [authindicators/svg-ps-converters](https://github.com/authindicators/svg-ps-converters)Thanks to [gilbarbara/logos](https://github.com/gilbarbara/logos) for the logos used in the tests.
## ๐ License
**svgtinyps** PHP is licensed under the MIT License. See LICENSE for more information.