TheZoraiz / ascii-image-converter

A cross-platform command-line tool to convert images into ascii art and print them on the console. Now supports braille art!
Apache License 2.0
2.18k stars 127 forks source link

macOS version #5

Closed xmarcos closed 3 years ago

xmarcos commented 3 years ago

👋 , first of all, thanks for this tool, it's awesome :)

I was wondering why you don't include a macOS version.

I was able to build ascii-image-converter locally (on Big Sur) without problems and since you are using goreleaser, it shouldn't take more than including darwin in the target goos.

So, if there is no particular reason against it, i'd love to have a release for mac. I have little experience with go, but I'm happy to send an initial PR to get this going. Let me know!

TheZoraiz commented 3 years ago

Hey @xmarcos. That's a reasonable request. The only reason I didn't include macOS in the release is because I don't personally own a mac, which is required for testing purposes 😅. I don't know much about macOS except that it's Unix-based, like Linux. I'll have to test a few of the libraries I used on macOS before I feel confident enough to include it in the release. Will try running it in a virtual machine this week.

For the time being, if you've installed Go, you can use this command to install the latest release:

go install github.com/TheZoraiz/ascii-image-converter@latest

Although since you've already built it locally, how was your experience so far? Did you face any errors or bugs using ascii-image-converter?

xmarcos commented 3 years ago

Make sense, although you don't need an actual mac to build (for free) on macos. You can use Github Actions and GoReleaser.

Regarding my experience, I haven't found any issues so far. Since there are no test, I just run all the examples in the readme and they all seem to work. The only issue I found was with GIF's, ~I'll send a~ quick PR for that :)

If you decide to ship the macOS version, let me know if you need me to test anything!

TheZoraiz commented 3 years ago

@xmarcos Hmm, looks alright to me. I've merged your PR and added macOS binaries to the latest release now, but will hold off from updating installation instructions for it until I can test it myself.

Correct me if I'm wrong, but the binary storage path in macOS is /usr/bin and /usr/local/bin as well right?

xmarcos commented 3 years ago

On a clean install the PATH is:

❯ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

That said, pretty much everyone that uses the command line on macOS uses a package manager called brew .

TheZoraiz commented 3 years ago

@xmarcos I've made a homebrew repo so you should be able to install on macOS using brew:

brew install TheZoraiz/ascii-image-converter/ascii-image-converter

I was able to get macOS High Sierra running in a vm and it works so far. Try it and let me know if its working for you :)

xmarcos commented 3 years ago

@TheZoraiz works as expected on Big Sur (intel) 🚀