/arsky

A command line interface (CLI) tool to fetch ascii-art from http://ascii-art.de/ or create new one

Primary LanguageTypeScript

ArSky

License: MIT npm version TypeScript

ArSky is a powerful and easy-to-use Node.js CLI tool for generating or fetching ASCII art. With ArSky, you can either retrieve ASCII art for any word or create your own from an image file.

Table of Contents

Features

  • Fetch ASCII art for given words or phrases
  • Generate ASCII art from image files
  • TypeScript support for enhanced type safety and developer experience
  • Comprehensive test suite using Jest
  • Consistent code style with ESLint and Prettier
  • Cross-platform compatibility (Windows, macOS, Linux)

Installation

Install ArSky globally using npm:

npm install -g arsky

For local development:

git clone https://github.com/ArgonautAli/arsky
cd arsky
npm install

Usage

ArSky can be used with the following options:

CLI Options

  • -g, --get <text>: Input text to get ASCII art
  • -c, --create <path>: Input path to an image file to create ASCII art
  • -v, --version: Display the current version of ArSky
  • -h, --help: Display help information

Examples

Fetch ASCII art for a word:

arsky -g coffee

Create ASCII art from an image:

arsky -c path/to/your/image.png

For more options and detailed usage instructions:

arsky --help

Development

Prerequisites

  • Node.js (version 14 or higher)
  • npm (version 6 or higher)

Available Scripts

  • npm run build: Compile TypeScript to JavaScript
  • npm start: Run the compiled app
  • npm run dev: Run the app in development mode with ts-node
  • npm test: Run the test suite
  • npm run lint: Run ESLint
  • npm run lint:fix: Run ESLint with auto-fix
  • npm run format: Format code with Prettier
  • npm run format:check: Check code formatting without making changes

Testing

We use Jest for unit testing. Run the test suite with:

npm test

Linting and Formatting

This project uses ESLint for linting and Prettier for code formatting.

To run the linter:

npm run lint

To automatically fix linting issues:

npm run lint:fix

To format code with Prettier:

npm run format

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please ensure your code adheres to the existing style by using the provided ESLint and Prettier configurations.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Troubleshooting

If you encounter any issues, please check the FAQ or open an issue in the GitHub repository.

Changelog

For a detailed list of changes and version history, please refer to the CHANGELOG.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • ASCII Art Archive for providing a vast collection of ASCII art
  • Sharp for high-performance image processing
  • Commander.js for command-line interface support
  • All the contributors who have helped shape ArSky