Open Snailedlt opened 2 years ago
Related [vscode extension]() to preview .eps files: https://github.com/ahnafnafee/PostScript-Preview
It's pretty bare-bones, but it works:
Possible tools we could use:
I haven't been successful in getting .eps file syntax highlighting for devicon's .eps files inside of vscode, even with the PostScript Language extension.
I suspect the reason is one of these:
If it's one of the last two, we might need some guides on how to create and upload .eps files, so that they are editable and not corrupted.
Any input here is helpful
Once you save a file as an EPS, you can no longer edit it. If you notice any mistakes and want to make edits, you’ll need to return to the original design file to make your changes before resaving the EPS.
Source: Adobe Creative Cloud - EPS files.
We can locally convert .eps
to .svg
using Inkscape, but we will need to install Ghostscript first.
Here's the tutorial made by Open Source Bug: Youtube - IMPORT EPS IN INKSCAPE ON WINDOWS | Open File Tutorial
Extending tutorial - In Inkscape
Import...
or Ctrl+I
.eps
fileAll
and click ok
Poppler/Cairo import
, then click ok
Ctrl+Shift+R
We can preview .svg
files quite easier in VS Code by SVG extension.
Since it's a public project, maybe it's possible to use Cloud convert - EPS to SVG API.
I like the little demo of PostScript-Preview extension, but didn't install it yet. About the online preview options, personally, PostScript Viewer is the best followed by EPS Viewer.
Seems like the software you need to open and edit .eps files depend on which software made the .eps file to start with: https://www.quora.com/How-do-I-open-and-edit-an-EPS-file/answer/Monika-Gause
Question:
How do I open and edit an EPS file?
Answer:
Depends on what kind of EPS it is.
Vector EPS: any vector application that can fully handle CMYK
EPS saved by Adobe Illustrator: Adobe Illustrator, because the EPS might contain a fully editable AI file
Raster based EPS: Photoshop, because Photoshop is able to edit those specific prepress features a raster based EPS might have
I'd say this is most likely a very accurate answer, seing as Monica Guase (the person who wrote the answer) has 15 years of experience writing books about Adobe Illustrator:
Since most EPS images made for devicons are made with adobe illustrator we might be in deep water here :/ But there's hope, since Inkscape supports both .eps and .ai files: https://inkscape.org/learn/faq/#what-formats-can-inkscape-importexport
I used Cloud convert - EPS to SVG and I noticed that the .svg
file was generated by Inkscape, so that make me think: "It must have a CLI version." And it actually does! 🤩
After playing with it for a while I came to this result:
* Some paths from terminal are hidden.
Requirements:
Operational system: Windows 10
I have searched through the issues and didn't find my problem.
Problem
There are quite a few PRs that include .eps files with the original unedited icons in it. It would be nice if it was possible to see a preview of it without opening it up locally.
Possible Solution
Maybe we could make a github bot/workflow which opens the file and takes a screenshot of the content, then posts it as a comment? We should be able to reuse the code from our peek-bot for the image upload and commenting part, so the hardest issue to figure out would be how to open up the file and screenshot the content
Additional information
I'm not sure how hard this is to implement, but it would be very valuable for us maintainers. Currently we either have to spend quote some time opening up and reviewing the .eps file, or just trusting it looks fine and accept the PR. So a preview would make the PR review process quicker and more robust.