2022-02-04 15:48:21 +03:00
|
|
|
# YAITAA - Yet Another Image To A(NSI) Art (converter)
|
2022-01-31 14:40:06 +03:00
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9fdbd9f8bc7843df9a6715b72b4da2fd)](https://www.codacy.com/gh/hatkidchan/yaitaa/dashboard?utm_source=github.com&utm_medium=referral&utm_content=hatkidchan/yaitaa&utm_campaign=Badge_Grade)
|
2022-01-31 14:40:06 +03:00
|
|
|
|
2022-02-03 23:46:56 +03:00
|
|
|
Yes, very original. Old name is `asciify-reborn` for reasons stated bellow
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
## Reasons for reimplementation
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
Everything is already described in
|
|
|
|
[hatkidchan/asciify](https://github.com/hatkidchan/asciify#readme), but just as
|
|
|
|
recap:
|
|
|
|
|
|
|
|
1. I'm not happy with old project structure
|
|
|
|
2. Some new features may be pain in the ass to add
|
|
|
|
3. Spaghetti code
|
|
|
|
4. Literally dublication
|
|
|
|
5. Separate binaries for each mode
|
|
|
|
6. Git submodules. Yay.
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
## Build instructions
|
|
|
|
### 1. Make sure that you have C compiler and make
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
```sh
|
|
|
|
cc --version && make --version && echo 'ok'
|
|
|
|
```
|
|
|
|
|
|
|
|
Both of commands should succeed.
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
### 2. Clone repo
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone --recursive https://github.com/hatkidchan/yaitaa
|
|
|
|
cd yaitaa
|
|
|
|
```
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
### 2. Build it
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
```sh
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
### 3. Run it
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
```sh
|
|
|
|
./yaitaa -M braille -S 256 -W 80 -H 24 ~/images/kitty.png
|
|
|
|
```
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
### Build end notes
|
2022-02-03 23:46:56 +03:00
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
#### 1. It is preferred to use `clang` as your compiler
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
Main reason being that it is more strict, so any issues I've missed may be
|
|
|
|
reported on that step. Feel free to send them to me!
|
|
|
|
|
|
|
|
```sh
|
|
|
|
CC=clang make
|
|
|
|
```
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
#### 2. Strip binary to reduce size (saves ~100KiB)
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
```sh
|
|
|
|
strip ./yaitaa
|
|
|
|
```
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
#### 3. Installation
|
2022-02-03 23:46:56 +03:00
|
|
|
|
|
|
|
```sh
|
2022-02-07 12:25:03 +03:00
|
|
|
# as root
|
2022-02-07 12:34:57 +03:00
|
|
|
make install # Will install it to /bin/
|
2022-02-03 23:46:56 +03:00
|
|
|
```
|
|
|
|
|
2022-02-07 12:25:03 +03:00
|
|
|
Alternatively, you can install it to your local user directory, if it's in your
|
2022-02-03 23:46:56 +03:00
|
|
|
`$PATH`:
|
|
|
|
|
|
|
|
```sh
|
2022-02-07 12:34:57 +03:00
|
|
|
make install PREFIX=$HOME/.local/ # will install it to $HOME/.local/bin/
|
2022-02-03 23:46:56 +03:00
|
|
|
```
|
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
## License
|
2022-02-03 23:46:56 +03:00
|
|
|
|
2022-02-03 23:58:53 +03:00
|
|
|
```text
|
2022-02-03 23:46:56 +03:00
|
|
|
yaitaa - Yet Another Image To A(NSI) Art (converter)
|
|
|
|
Copyright (C) 2022 hatkidchan <hatkidchan at gmail dot com>
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
```
|