https://github.com/lunatic-fox/eps2img
An action to convert .eps (Encapsulated PostScript) files to image and vector formats.
https://github.com/lunatic-fox/eps2img
bmp converter eps github-action github-actions jpeg pdf png ps svg tiff
Last synced: about 1 year ago
JSON representation
An action to convert .eps (Encapsulated PostScript) files to image and vector formats.
- Host: GitHub
- URL: https://github.com/lunatic-fox/eps2img
- Owner: lunatic-fox
- License: mit
- Created: 2022-11-14T02:29:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-02T06:14:14.000Z (over 3 years ago)
- Last Synced: 2025-04-03T04:03:30.548Z (about 1 year ago)
- Topics: bmp, converter, eps, github-action, github-actions, jpeg, pdf, png, ps, svg, tiff
- Language: Shell
- Homepage: https://github.com/marketplace/actions/eps-2-image
- Size: 38.1 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

### *An action to convert `.eps` (Encapsulated PostScript) files to image and vector formats.*
***Supported output formats***
- **Image formats (*raster*)**
- `.png` ***\* default***
- `.bmp`
- `.tiff`
- `.jpeg`
- **Vector formats**
- `.svg`
- `.ps`
- `.pdf`
## Usage
### Inputs
```yaml
input:
description: Input path of the EPS file.
required: true
output:
description: Output path of the image file.
required: false
format:
description: Format of the image file.
required: false
default: png
```
### Outputs
Images exist only within workflow, so you will need another action to commit or upload the created images.\
Here are some suggestions of 3rd party actions:
#### *To auto commit*
- [**Git Auto Commit**](https://github.com/marketplace/actions/git-auto-commit)
#### *To upload image*
- [**Publish on imgur**](https://github.com/marketplace/actions/publish-on-imgur)
---
### Available options
```yaml
- uses: lunatic-fox/eps2img@v1
with:
# Required. Full relative path to EPS file.
input: ./pathToEPS/file.eps
# Optional. Path to the output file.
# Patterns: "" | "./" | "./dirname/" | "./filename" | "./filename.xyz"
output: ./pathTo/outputFilename
# Optional. Format of the output file.
# Options: "png" | "bmp" | "tiff" | "jpeg" | "svg" | "ps" | "pdf"
format: png
```
---
#### `input`
This input parameter is required and is the full relative path to your `.eps` file.
***Example***
```yaml
input: ./folder/myFile.eps
```
---
#### `output`
This input parameter is optional and can be used as shown in the patterns below.
***Example: If `output` does not exist***\
Creates the output file in the same path and with the same filename of the `.eps` file.
```yaml
input: ./folder/myFile.eps
# creates -> output: ./folder/myFile.png
```
***Example: Is a complete path***\
Creates the output file in the described path.
```yaml
input: ./folder/myFile.eps
output: ./myConvertedFile.png
```
***Example: Is an incomplete path***\
Creates the output file in the same path until the last `/` and uses the end of path as the filename.
```yaml
input: ./folder/myFile.eps
output: ./screenshot/myPicture
# creates -> output: ./screenshot/myPicture.png
```
***Example: Is an endpoint***\
Creates the output file in the described path and names the file with the same filename of the `.eps` file.
```yaml
input: ./folder/myFile.eps
output: ./screenshot/
# creates -> output: ./screenshot/myFile.png
```
---
#### `format`
This input parameter is optional and `output` have priority over it.
***Example: If `output` is a complete path***\
Creates the output file in the described path. `format` will be ignored.
```yaml
input: ./folder/myFile.eps
output: ./myConvertedFile.png
format: tiff
```
***Example: If `output` is an incomplete path***\
Creates the output file in the same path until the last `/`, uses the end of path as the filename and convert the `.eps` file to defined `format`.
```yaml
input: ./folder/myFile.eps
output: ./screenshot/myPicture
format: jpeg
# creates -> output: ./screenshot/myPicture.jpeg
```
***Example: If `output` is an endpoint***\
Creates the output file in the described path, names the file with the same name of the `.eps` file and convert the `.eps` file to defined `format`.
```yaml
input: ./folder/myFile.eps
output: ./screenshot/
format: bmp
# creates -> output: ./screenshot/myFile.bmp
```
***Example: If `output` does not exist***\
Creates the output file in the same path, with the same filename of the `.eps` file and convert the file to defined `format`.
```yaml
input: ./folder/myFile.eps
format: pdf
# creates -> output: ./folder/myFile.pdf
```
### [Workflow example](./.github/workflows/demo.yml)
Made with ❤