getemoji

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 15 Imported by: 0

README ΒΆ

getemoji πŸŽ¨πŸ˜€

getemoji is a command-line interface (CLI) tool that allows you to generate emoji images in SVG or PNG format. It downloads the emoji from twemoji and can optionally resize it to a specified size.

✨ Features

  • Generate emoji images in SVG or PNG format
  • Resize emojis to a specific size (for PNG output)
  • Support for emoji shortcodes and Unicode characters
  • Configurable via command-line flags, environment variables, or a YAML config file

πŸš€ Installation

There are two ways to install getemoji:

  1. Using Go: To install getemoji, you need to have Go installed on your system. Then, you can use the following command:

    go install github.com/igolaizola/getemoji@latest
    
  2. Downloading pre-built binaries: You can download pre-built binaries for your operating system from the Releases page of the GitHub repository.

πŸ›  Usage

The basic syntax for using getemoji is:

getemoji --emoji <emoji> --size <size> --output <output>
🚩 Flags
  • -emoji: The emoji to generate (required)
  • -size: The size of the output image in pixels (required for PNG output)
  • -output: The output file name (optional, defaults to icon.svg or icon<size>.png)
  • -config: Path to a YAML configuration file (optional)
🌿 Environment Variables

You can also use environment variables to set the flags. Prefix the flag name with GETEMOJI_. For example:

GETEMOJI_EMOJI="smile" GETEMOJI_SIZE=64 GETEMOJI_OUTPUT="smile.png" getemoji
πŸ“š Examples
  1. Generate an SVG of a smiley face emoji:

    getemoji -emoji "smile" -output smile.svg
    
  2. Generate a 64x64 PNG of a heart emoji:

    getemoji -emoji "❀️" -size 64 -output heart.png
    
  3. Use a configuration file:

    getemoji -config config.yaml
    

    Example config.yaml:

    emoji: "rocket"
    size: 128
    output: rocket.png
    

πŸ”’ Version Information

You can check the version of getemoji by running:

getemoji version

This will display the version number, commit hash, and build date (if available).

πŸ”— Dependencies

getemoji uses the following open-source libraries:

πŸ“œ License

getemoji is licensed under the MIT License.

The emoji graphics are from twemoji and are downloaded using https://cdn.jsdelivr.net/gh/jdecked/twemoji. These graphics are licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0). To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

🀝 Contributing

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

πŸ’¬ Support

If you encounter any problems or have any questions about getemoji, please open an issue on the GitHub repository.

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

func Run ΒΆ

func Run(ctx context.Context, cfg *Config) error

Run runs the getemoji process.

Types ΒΆ

type Config ΒΆ

type Config struct {
	Size   int
	Emoji  string
	Output string
}

Directories ΒΆ

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL