Giter Club home page Giter Club logo

yaitaa's Introduction

YAITAA - Yet Another Image To A(NSI) Art (converter)

Codacy Badge

Yes, very original. Old name is asciify-reborn for reasons stated bellow

Reasons for reimplementation

Everything is already described in hatkidchan/asciify, 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.

Build instructions

1. Make sure that you have C compiler and make

cc --version && make --version && echo 'ok'

Both of commands should succeed.

2. Clone repo

git clone --recursive https://github.com/hatkidchan/yaitaa
cd yaitaa

2. Build it

make

3. Run it

./yaitaa -M braille -S 256 -W 80 -H 24 ~/images/kitty.png

Build end notes

1. It is preferred to use clang as your compiler

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!

CC=clang make

2. Strip binary to reduce size (saves ~100KiB)

strip ./yaitaa

3. Installation

# as root
make install # Will install it to /bin/

Alternatively, you can install it to your local user directory, if it's in your $PATH:

make install PREFIX=$HOME/.local/ # will install it to $HOME/.local/bin/

License

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.

yaitaa's People

Contributors

hatkidchan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yaitaa's Issues

make it pretty, duh

current codebase looks like total crap, you shoudl work on it soemday maybe (i hope youw ill)

Can't build the binary using clang

Did I Do Everything Right?

Yes, probably? Cloned recursively, then used a plain make command.

Platform With The Issue

M1 Pro on macOS 12.1 with make version 4.3

Make Output on a Mac

cc -Wall -Wextra -Werror -pedantic -std=c99 -ggdb src/mod_blocks.c -Isrc -c -o obj/mod_blocks.o
src/mod_blocks.c:202:11: error: variable 'pal' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
          default: break;
          ^~~~~~~
src/mod_blocks.c:204:39: note: uninitialized use occurs here
        int index_top = closest_color(pal, top),
                                      ^~~
src/mod_blocks.c:196:9: note: variable 'pal' is declared here
        palette_t pal;
        ^
1 error generated.
make: *** [Makefile:19: obj/mod_blocks.o] Error 1

Am I Sure that It's Only on a Mac?

Pretty sure. But IDK why, though.
The build completes fine on a regular Linux machine.

Add tests

TODO: add test target to Makefile, as well as test scripts (in Python, Bash or even in C itself?).

Test scripts should download sample images from this issue (TODO: add images) into obj/ folder.

Test scripts should run after running testbuild target or as last step of it. Test scripts should depend on all target.

help wanted label is set, because I need some sample images, if possible. SFW-only, public domain and/or royalty-free only. Self-made content also allowed. Images should be in either PNG or BMP (i.e. lossless compression only) to reduce ambiguity caused by (de-)compression.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.