/noto-emoji-animation

Google Emoji mass downloader, and other tools

Primary LanguageJavaScriptOtherNOASSERTION

Animated Emojis by Google

=> Google: The hub for everything animated emoji!

Google F.A.Q. item

This ain't a regular emoji website or smth. like this.. here it's all about the animated emojis available from Google; .. and one or two scripts which will 'use them better'.. so this ain't a regular site for emoji downloads! ^_^

:zany-face:

Mass download (all emojis in one packet)

This was a requested feature: as Google wasn't willing to allow users to mass download all the emojis at once, in just one packet.. you had to scroll through the list, select your emojis and then decide which one of three image types (supported: GIF, WebP and Lottie (.json)).

But I didn't want to manually download them, I just wanted my own copy (for template/pre-precessor replacements), so I hacked up a bit into the sources and quickly found everything necessary for this. And the mass download is really fast, as Google really wants users to request any icon every time on demand! :)~

So that's the reason for this emoji.js and emoji.php. :)~

Tag Lookup

My PHP script is also there, just to request emojis by their tags (Google /seems/ to not support it right now?). PLUS some other features! Check out the PHP script section! :)~

And, jfyi, it works both in console and web browser requests.. see below.

I also published an example here (feel free to use this script right here, from my server, it'll relay to the original Google URL):

Index

  1. Animated Emojis by Google
  2. Mass download (all emojis in one packet)
  3. Tag Lookup
  4. Downloads
  5. .json output
  6. Features
  7. Screenshot
  8. Mirror
  9. Configuration
  10. PHP script
  11. Copyright and License

Downloads

Warning Only tested in a Linux environment, so I'm not sure whether it'll all work w/ Windows OS..

.json output

Features

  • Locally existing emojis will be updated if a remote one has been updated (using the HTTP ETag header, or by comparing the Content-Length);
  • All downloads are working asynchronous, and also every file operation (I really like efficiency ;)~
  • Configurable downloads: maximum concurrent ones and limit on how many connections per second are initiated.
  • The download rate can be limited.. both for each link and for all links together (the whole line).
  • The images itself are stored in the same fs hierarchy like at the Google servers, so image mirroring is possible.
  • Additionally creates symbolic links to the images by all possible tags (to lookup tags, very important! ;)~
  • Three .json output files are created (see the .json output section below).
  • And a fourth .json with the last ETag HTTP header values (if the server supports them);

.. for this moment I recommend you to .. read the fucking source! I'm going to explain more l8rs.

Screenshot

Downloads in progess:

Screenshot

Mirror

I've mirrored Google's original.. That's only fair, because I published this mirroring alike script.. ;)~

Configuration

Located on (more/less) the top of this emoji.js script..

Note My own getopt.js is TODO! ;)~

PHP script

Just made a PHP script emoji.php (v2.1.1).

This script runs either via web server request, or in CLI mode (command line interface). :)~ In CLI mode you've to define two parameters, whereas the first is the tag itself, the second is the type! Otherwise call via browser like ...?tag=zipper-face&type=webp, or maybe ...?tag=:zipper-face:&type=string.. ;)~

Note As a shebang is not supported here (because of the HTTPD mode), I just created a tiny shell script to start this .php script. See the emoji.sh.

For direct emoji requests by emoji tags (like :smile:, etc.). These ones are really on demand, directly from the Google servers.

Warning You need a copy of my emoji.index.json (which was meant for such cases like this script). Get it by using the emoji.js script itself!

These are the supported types to query for (2nd parameter in the command line argv[]):

Key/Name Alias(es) Description/Comment
test -/- Just return 0 or 1, depending on the pure existence of an emoji tag
string utf, utf8 The unicode string representation of an emoji (the used font is maybe important)
codepoint code The codepoint(s). If more than just one, they're separated by spaces (by default)
webp -/- The WebP image format (image/webp), designed by Google
gif -/- The old GIF format (image/gif); only 256 colors supported..
json lottie A newer vector format (application/json), n1!

In the browser you'll automatically get relayed to the image/data itself; in the console the link will just be shown.

Only in the browser: The new GET[] parameter ?size is available now, for:

  • (a) Scaling up the string (w/ also new parameter ?font, to also specify font-family: 'Noto Emoji')
  • (b) Putting the images (like ?type=webp) into <span> w/ size(s) css styles.. instead of only direct relay. ;)~

Copyright and License

The rest, everything on the Google servers (or smth. similar) is owned by Google, with their own license(s). I do NOT own anything which is coming from the Google servers, also not my mirrored images, etc.. I'm only the creator of everything available on this github site (up until https://github.com/kekse1/), etc..

The Copyright is (c) Sebastian Kucharczyk, and it's licensed under the MIT (also known as 'X' or 'X11' license).

kekse.biz