• Stars
    star
    152
  • Rank 236,196 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Emojis for Go 😄🐢🚀

turtle

Emojis for Go 😄🐢🚀

Reference

Follow this link to view the reference documentation: GoDoc Reference 📝

Installation

Library

To install the turtle library run:

go get github.com/hackebrot/turtle

CLI app

If you would also like to use the turtle CLI app run:

go get github.com/hackebrot/turtle/cmd/turtle

See the turtle CLI README for more information.

Usage

Emoji lookup

turtle.Emojis is a map which contains all emojis available in turtle. You can use it to look up emoji by their name.

package main

import (
	"fmt"
	"os"

	"github.com/hackebrot/turtle"
)

func main() {
	name := "turtle"
	emoji, ok := turtle.Emojis[name]

	if !ok {
		fmt.Fprintf(os.Stderr, "no emoji found for name: %v\n", name)
		os.Exit(1)
	}

	fmt.Printf("Name: %q\n", emoji.Name)
	fmt.Printf("Char: %s\n", emoji.Char)
	fmt.Printf("Category: %q\n", emoji.Category)
	fmt.Printf("Keywords: %q\n", emoji.Keywords)
}
Name: "turtle"
Char: 🐢
Category: "animals_and_nature"
Keywords: ["animal" "slow" "nature" "tortoise"]

Search

Use Search() to find all emojis with a name that contains the search string.

package main

import (
	"fmt"
	"os"

	"github.com/hackebrot/turtle"
)

func main() {
	s := "computer"
	emojis := turtle.Search(s)

	if emojis == nil {
		fmt.Fprintf(os.Stderr, "no emojis found for search: %v\n", s)
		os.Exit(1)
	}

	fmt.Printf("%s: %s\n", s, emojis)
}
computer: [💻 🖱 🖥 ]

Category

Use Category() to find all emojis of the specified category.

package main

import (
	"fmt"
	"os"

	"github.com/hackebrot/turtle"
)

func main() {
	c := "travel_and_places"
	emojis := turtle.Category(c)

	if emojis == nil {
		fmt.Fprintf(os.Stderr, "no emojis found for category: %v\n", c)
		os.Exit(1)
	}

	fmt.Printf("%s: %s\n", c, emojis)
}
travel_and_places: [🚡 ✈️ 🚑 ]

Keyword

Use Keyword() to find all emojis by a keyword.

package main

import (
	"fmt"
	"os"

	"github.com/hackebrot/turtle"
)

func main() {
	k := "happy"
	emojis := turtle.Keyword(k)

	if emojis == nil {
		fmt.Fprintf(os.Stderr, "no emoji found for keyword: %v\n", k)
		os.Exit(1)
	}

	fmt.Printf("%s: %s\n", k, emojis)
}
happy: [😊 😁 😀 😂 ]

Emojis

Emoji names, categories and keywords are based on the fantastic muan/emojilib keyword library 📖

At this point, the turtle project supports the emojis that are also available on GitHub. See the GitHub REST API documentation for more information.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

License

Distributed under the terms of the MIT license, turtle is free and open source software.

More Repositories

1

pytest-tricks

😏 Tips and Tricks for the Python Testing Tool
Python
191
star
2

pytest-cookies

The pytest plugin for your Cookiecutter templates. 🍪
Python
160
star
3

poyo

A lightweight YAML Parser for Python. 🐓
Python
136
star
4

jinja2-time

📆 Jinja2 Extension for Dates and Times
Python
67
star
5

labels

CLI app for managing GitHub labels for Python 3.6 and newer. 📝
Python
66
star
6

cookiedozer

📱 Cookiecutter for i18n Kivy Apps
Python
49
star
7

pytest-emoji

A pytest plugin that adds emojis to your test result report 😍
Python
47
star
8

pytest-md

Plugin for generating Markdown reports for pytest results 📝
Python
34
star
9

cookiecutter-kivy

🎮 Minimal Cookiecutter for Python Kivy Apps
Python
31
star
10

python-composition

Code for my talk at the Python Pizza micro conference. 🧀🍅🧄🥦
Python
24
star
11

pytest-snail

Plugin for adding a marker to slow running tests. 🐌
Python
15
star
12

earth

Example Python project for my talk: Customizing your pytest test suite 🌍
Python
14
star
13

pytest-covfefe

👐 I have the best code! Everyone says so.
Python
12
star
14

go-repr

String representations for Go values. 💬
Go
12
star
15

cibopath

🔍 Search Cookiecutters on GitHub
Python
9
star
16

amelia

Create GitHub gists from your CLI 📄
Go
8
star
17

go-librariesio

📘 API client for libraries.io written in Go
Go
6
star
18

tapioca-toggl

🕓 A Python Wrapper for Toggl API v8
Python
5
star
19

dotfiles

My configuration files for git, zsh, bash, vscode etc. 🦊
Shell
3
star
20

python-super

Code examples for teaching Python's super. 🦸‍♀️
3
star
21

kivy-gallery

Gallery like app for presenting various media-types such as images or walkarounds with the kivy framework.
Python
3
star
22

install-firefox

💻 Shell script to install Firefox and Geckodriver
Shell
2
star
23

floof

Golang CLI App to Create GitHub Gists
Go
1
star
24

awesome-talks

📺 A curated list of awesome conference talks
1
star
25

hackebrot

All about Raphael 👨🏻‍💻
1
star
26

sfallhands

🍣 Code examples for my pytest talk
Python
1
star
27

pytest-regression-tests

Run pytest release candidates against repos
1
star
28

dockerfiles

🐋 Dockerfiles for development and testing
Shell
1
star
29

python-type-hints

💻 Example code for Python's type hints.
Python
1
star