From dff12c38d66913f60ad6f66a8a6ac7f731c141bc Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Fri, 30 Sep 2022 10:31:38 -0500 Subject: [PATCH] Adding toolchain and updating documentation --- Makefile | 27 +++++++++++++++++++++++++++ README.md | 37 +++++++++---------------------------- 2 files changed, 36 insertions(+), 28 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fb9dba1 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +BIN_DIR?=/usr/local/bin +LIB_DIR?=/usr/local/lib +COMP_DIR?=/usr/local/etc/bash_completion.d +GO_FILES=$(shell find -name '*.go') + +image2ascii: $(GO_FILES) + go build . + +.PHONY: clean +clean: + rm --force image2ascii + +.PHONY: test +test: clean + go test + +.PHONY: build +build: image2ascii + +.PHONY: install +install: image2ascii + install -m755 image2ascii $(BIN_DIR)/image2ascii + +.PHONY: uninstall +uninstall: + rm --force $(BIN_DIR)/image2ascii + diff --git a/README.md b/README.md index b715d0b..851f560 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,17 @@ -# :foggy: Image2ascii - -[![Build Status](https://travis-ci.org/qeesung/image2ascii.svg?branch=master)](https://travis-ci.org/qeesung/image2ascii) -[![Coverage Status](https://coveralls.io/repos/github/qeesung/image2ascii/badge.svg?branch=master)](https://coveralls.io/github/qeesung/image2ascii?branch=master) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/71a3059b49274dde9d81d58cedd80962)](https://app.codacy.com/app/qeesung/image2ascii?utm_source=github.com&utm_medium=referral&utm_content=qeesung/image2ascii&utm_campaign=Badge_Grade_Dashboard) -[![Go Report Card](https://goreportcard.com/badge/github.com/qeesung/image2ascii)](https://goreportcard.com/report/github.com/qeesung/image2ascii) -[![GoDoc](https://godoc.org/github.com/qeesung/image2ascii?status.svg)](https://godoc.org/github.com/qeesung/image2ascii) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) +# Image2ascii Image2ASCII is a library that converts images into ASCII images and provides command-line tools for easy use. -![demo](https://github.com/qeesung/image2ascii/blob/master/docs/images/lufei.gif?raw=true) +I forked this repository to port it from Dep to Go Modules. + +See demos hosted [in the upstream repository](https://https://git.dominic-ricottone.com/~dricottone/image2ascii/blob/master/docs/images/). ## Installation ```bash -go install github.com/qeesung/image2ascii@latest +git clone https://git.dominic-ricottone.com/~dricottone/image2ascii +make build +sudo make install ``` ## CLI usage @@ -46,7 +42,6 @@ convert the image fit the screen(default is true) ```bash image2ascii -f docs/images/pikaqiu2.jpg ``` -![demo](https://github.com/qeesung/image2ascii/blob/master/docs/images/pikaqiu_s.gif?raw=true) convert the image to ascii image with fixed width and height ```bash @@ -54,7 +49,6 @@ convert the image to ascii image with fixed width and height # height: 30 image2ascii -f docs/images/baozou.jpg -w 100 -g 30 ``` -![demo](https://github.com/qeesung/image2ascii/blob/master/docs/images/baozou.gif?raw=true) convert the image to ascii image by ratio ```bash @@ -63,13 +57,11 @@ convert the image to ascii image by ratio # height: imageHeight * 0.3 image2ascii -f docs/images/pikaqiu.jpg -r 0.3 ``` -![demo](https://github.com/qeesung/image2ascii/blob/master/docs/images/pikaqiu.gif?raw=true) convert the image to stretch the screen ```bash image2ascii -f docs/images/long.jpg -t ``` -![demo](https://github.com/qeesung/image2ascii/blob/master/docs/images/long.gif?raw=true) convert the image without the color ```bash @@ -93,7 +85,7 @@ package main import ( "fmt" - "github.com/qeesung/image2ascii/convert" + "https://git.dominic-ricottone.com/~dricottone/image2ascii/convert" _ "image/jpeg" _ "image/png" ) @@ -138,17 +130,6 @@ type Converter interface { } ``` -## Sample outputs - -| Raw Image | ASCII Image | -|:---------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------:| -| ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/lufei.jpg) | ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/lufei_ascii.png) | -| ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/lufei.jpg) | ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/lufei_ascii_colored.png) | -| ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/pikaqiu.jpeg) | ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/pikaqiu_ascii.png) | -| ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/pikaqiu.jpeg) | ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/pikaqiu_ascii_colored.png) | -| ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/baozou.jpg) | ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/baozou_ascii.png) | -| ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/baozou.jpg) | ![](https://raw.githubusercontent.com/qeesung/image2ascii/master/docs/images/baozou_ascii_colored.png) | - ## License -This project is under the MIT License. See the [LICENSE](https://github.com/qeesung/image2ascii/blob/master/LICENSE) file for the full license text. +This project is under the MIT License. See the LICENSE file for the full license text. -- 2.45.2