https://github.com/grazen0/ascii-converter
Convert images to high-quality ASCII art
https://github.com/grazen0/ascii-converter
ascii ascii-art npm-package typescript
Last synced: 3 months ago
JSON representation
Convert images to high-quality ASCII art
- Host: GitHub
- URL: https://github.com/grazen0/ascii-converter
- Owner: Grazen0
- License: mit
- Created: 2020-12-12T23:15:06.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-10T10:02:46.000Z (over 3 years ago)
- Last Synced: 2025-12-26T06:48:04.760Z (7 months ago)
- Topics: ascii, ascii-art, npm-package, typescript
- Language: TypeScript
- Homepage:
- Size: 162 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ascii-converter · ![Build][build]
A library for converting images into high-quality ASCII art.
It includes a command line interface (CLI) to convert images directly from the Command Prompt.
## Installation
You can install this package using [npm][npm] or [yarn][yarn]:
Locally:
```bash
$ npm i ascii-converter
$ yarn add ascii-converter
```
Globally:
```bash
$ npm i -g ascii-converter
$ yarn global add ascii-converter
```
## Usage
```javascript
const convertToASCII = require('ascii-converter').default; // CommonJS module
// or:
import convertToASCII from 'ascii-converter'; // ES6 module
/**
* Converts the local image "dog.png"
* into ASCII text, and logs it on
* the console.
*/
convertToASCII('dog.png')
.then(ascii => console.log(ascii))
.catch(console.error);
```
To use the CLI, this package must be installed globally. Then, you can run the following command:
```bash
$ ascii
```
This should show a menu to select a local image.
## Contributing
You can open pull requests on the project's [GitHub repository][repo], or make issues for major changes.
[build]: https://github.com/ElCholoGamer/ascii-converter/workflows/Build/badge.svg
[npm]: https://www.npmjs.com
[yarn]: https://yarnpkg.com
[repo]: https://github.com/ElCholoGamer/ascii-converter