Giter Club home page Giter Club logo

emojis's Introduction

Build status Alire License GitHub release IRC Gitter chat

emojis

An Ada 2012 library to replace names between colons with emojis. Supports Emoji version 13.1.

Usage

Ada.Text_IO.Put_Line (Emojis.Replace ("Ada is :heart_eyes: <3"));

This will print to the terminal:

Ada is ๐Ÿ˜ ๐Ÿงก

Some of the text emojis like :o and :p are a prefix of certain labels. Use the Completions parameter to avoid the last one being replaced if the text is used in some input field (when the user is pressing the Tab key to cycle through all the labels):

Ada.Text_IO.Put_Line
  (Emojis.Replace ("XD :o :p", Completions => Emojis.Lower_Case_Text_Emojis));

Prints:

๐Ÿ˜† ๐Ÿ˜ฎ :p

The function Labels returns a list of all the labels.

The default value for the parameter Mappings is Emojis.Text_Emojis and contains the following:

Text Emoji
:) ๐Ÿ™‚
;) ๐Ÿ˜‰
:D ๐Ÿ˜€
:'D ๐Ÿ˜…
:') ๐Ÿ˜…
:") ๐Ÿ˜‚
XD ๐Ÿ˜†
X'D ๐Ÿคฃ
:o ๐Ÿ˜ฎ
:O ๐Ÿ˜ฎ
>:( ๐Ÿ˜ 
:( ๐Ÿ™
-_- ๐Ÿ˜’
:'( ๐Ÿ˜ข
:"( ๐Ÿ˜ญ
:p ๐Ÿ˜›
:P ๐Ÿ˜›
;p ๐Ÿ˜œ
;P ๐Ÿ˜œ
B) ๐Ÿ˜Ž
:+) ๐Ÿคก
:(= ๐Ÿฅต
o_O ๐Ÿคจ
O_o ๐Ÿคจ
XO= ๐Ÿคฎ
<3 ๐Ÿงก

Dependencies

In order to build the library, you need to have:

  • An Ada 2012 compiler

  • Alire

Using the library

Use the library in your crates as follows:

$ alr with emojis

Contributing

Read the contributing guidelines if you want to add a bugfix or an improvement.

License

The Ada code and unit tests are licensed under the Apache License 2.0. The first line of each Ada file should contain an SPDX license identifier tag that refers to this license:

SPDX-License-Identifier: Apache-2.0

Names and Unicode codepoints in package Emojis are from emoji-data project.

emojis's People

Contributors

onox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

emojis's Issues

Improve readability

Dear emojis developers,

Why not make the code more readable by replacing

emojis/src/emojis.adb

Lines 127 to 128 in f7b0896

if not (for some C of Completions => C = Pair.Text)
or (Index < Slices'Last and not Is_Completion)

by

               if (for all C of Completions => C /= Pair.Text) or
                 (Index < Slices'Last and not Is_Completion)

Greetings,
Pierre

Problem detected and solved by Rejuvenation-Ada crate
vote for Rejuvenation-Ada as The 2022 Ada Crate Of The Year

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.