Code Monkey home page Code Monkey logo

ascii-art's Introduction

Ascii Art CLI

Description

This is a command-line tool (CLI) for making ascii art. If you are unfamiliar with the command-line environment, this program probably is not for you.

Installation

Prerequistes

You will need to install the .NET SDK 8.0.100 as well as the .NET Runtime 8.0.0.

These can be found on this page.

Download or clone this repo

To get the program on your computer either:

  • Download the latest release from "releases".
  • Run git clone https://github.com/OliFryser/ascii-art.git in a your preferred termninal.

Running the program

Then open a terminal in that the folder you downloaded or "git cloned" the program to. Then navigate into the folder "ascii-art-cli".

Here you should be able to run dotnet run in the terminal and see an ascii version of the dog, that is also in resources/baby.jpg.

Setting custom flags

So, if you want anything else other than a dog, you can specify flags for the program. This is done by running dotnet run. Note: Use the longform flags, when using dotnet run. The shortform do not work, since they conflict with some of the dotnet programs flags.

A filepath passed to the program is interpreted as a filepath, if it is the first unspecified argument. The second unspecified argument will be interpreted as the density string.

For example, running the program with:

dotnet run ../resources/baby.jpg 10

will produce a picture of the dog "baby", only with 1's and 0's.

Consult the table below to see which flags are available:

Flag Longform Example Description
-f --filepath --filepath ../resources/baby.jpg Specifies a filepath to the ascii image.
-d --density --density .,-# Sets the density string to a custom string, meaning the ascii image will only be made out of those.
-c --contrast --contrast 10 Sets the contrast of the image.
-a --alternative --alternative Toggles whether to use a denser density string.
-i --invert --invert Inverts the image (by reversing the density string)
-w --webcam --webcam 0 Starts the program in webcam mode. It takes a webcam index as argument. If you are unsure, try a few (0, most likely).
-f --framerate --framerate 30 Specifies the framerate to run webcam mode in (must be a whole number)

Webcam mode (advanced)

The webcam mode only works is only verified to work on windows, but it you may just need to add the correct nuget package.

ascii-art's People

Contributors

olifryser avatar

Stargazers

 avatar

Watchers

 avatar

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.