Author Topic: WhatsApp emojipack (+Apple/Telegram)  (Read 92072 times)

0 Members and 1 Guest are viewing this topic.

Offline Thug

Re: WhatsApp smiles (need help)
« Reply #45 on: 16 07 2015, 12:57:28 »
This one works for most smileys, you are right.
Should work for 100% :) Please report if you find any issues.

There was an error during second part unzipping related to e521.png file, however seems it affects nothing.
This is multi-volume archive (I had to split it due to forum limitations). Such archives should be opened by placing all the parts to the same folder and using only the first part. The error occures while trying to unzip other parts separately, no need to do it...

Smileys from the wiki plugins page are not working
Ofcourse they aren't - I've told about it just before your fist post in this thread ???

watcher, please, update the smileypack on the server...
« Last Edit: 16 07 2015, 13:01:09 by Thug »
 

Offline dyrkin

  • Newbie
  • *
  • Posts: 9
Re:WhatsApp smiles (need help)
« Reply #46 on: 18 07 2015, 13:52:47 »
BTW, here is a full Emoji set grabbed from the official page. With tooltips :)
Feel free to use, share, or whatever you want..

Traditionally, here is the code used for files generation
Code: [Select]
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.jsoup.nodes.Document;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;

import java.io.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by bykov on 13.07.2015.
 */
public class EmojiProcessor {

    private static final String outDir = "data/out/";

    private static final Map<String, HashMap <String, String>> protocols = new HashMap<>();
    static {
        protocols.put("BW", new HashMap<String, String>());
        protocols.get("BW").put("name", "BW");
        protocols.get("BW").put("index", "3");
        protocols.put("Apple", new HashMap<String, String>());
        protocols.get("Apple").put("name", "Apple");
        protocols.get("Apple").put("index", "4");
        protocols.put("Andr", new HashMap<String, String>());
        protocols.get("Andr").put("name", "Andr");
        protocols.get("Andr").put("index", "5");
        protocols.put("Twit", new HashMap<String, String>());
        protocols.get("Twit").put("name", "Twit");
        protocols.get("Twit").put("index", "6");
        protocols.put("Wind", new HashMap<String, String>());
        protocols.get("Wind").put("name", "Wind");
        protocols.get("Wind").put("index", "7");
        protocols.put("GMail", new HashMap<String, String>());
        protocols.get("GMail").put("name", "GMail");
        protocols.get("GMail").put("index", "8");
        protocols.put("DCM", new HashMap<String, String>());
        protocols.get("DCM").put("name", "DCM");
        protocols.get("DCM").put("index", "9");
        protocols.put("KDDI", new HashMap<String, String>());
        protocols.get("KDDI").put("name", "KDDI");
        protocols.get("KDDI").put("index", "10");
        protocols.put("SB", new HashMap<String, String>());
        protocols.get("SB").put("name", "SB");
        protocols.get("SB").put("index", "11");
    }

    public static void main(String[] args) throws java.io.IOException{
        //Uncomment to use online version
        //Document doc = Jsoup.connect("http://unicode.org/emoji/charts/full-emoji-list.html").get();
        File input = new File("data/Full Emoji Data.html");
        Document doc = Jsoup.parse(input, "UTF-8");
        String rownumber;
        String character;
        String tooltip;

        // Clean files and prepare msl files
        for (HashMap protocol: protocols.values()) {
            FileUtils.deleteDirectory(new File(outDir + protocol.get("name").toString() + "/"));
            new File(outDir + protocol.get("name").toString()).mkdir();
            prepareMSLFiles(protocol.get("name").toString());
        }

        // Parse html file extract images and compile msl file
        for (Element table: doc.select("table")) {
            for (Element row : table.select("tr")) {
                // Ignore headers
                if ("Count".equals(row.child(0).text()))
                    continue;
                else {
                    rownumber = row.child(0).text();
                    character = row.child(1).child(0).attr("name");
                    tooltip = row.child(12).text();
                }
                // For each table record save image and add record to msl file
                for (HashMap protocol: protocols.values()) {
                    if (!row.child((Integer.parseInt(protocol.get("index").toString()))).children().isEmpty()) {
                        savePicture(protocol.get("name").toString(), getImageData(row, Integer.parseInt(protocol.get("index").toString())), rownumber);
                        addMSLRecord(protocol.get("name").toString(),getPNGName(rownumber),character, tooltip);
                    }
                }
            }
        }
    }

    // Decode Base64 data tag and save it as png file
    private static void savePicture(String protocol, String img, String name) throws java.io.IOException{
        byte[] data = Base64.decodeBase64(img);
        String filename = outDir + protocol + "/" + getPNGName(name);
        OutputStream stream = new FileOutputStream(filename);
        stream.write(data);
        stream.close();
    }

    // Remove 'data:image/png;base64,' from the beginning
    private static String getImageData(Element row, int index) {
        return row.child(index).child(0).attr("src").substring(22);
    }

    // Left pad 5 leading zeros to PNG filename
    private static String getPNGName(String name) {
        return String.format("%1$" + 5 + "s", name).replace(' ', '0') + ".png";
    }

    // Add record to msl file for specified picture file and character
    private static void addMSLRecord(String protocol, String pngname, String character, String tooltip) throws java.io.IOException{
        String filename = outDir + protocol + ".msl";
        Writer out = new OutputStreamWriter(new FileOutputStream(filename, true), "UTF-16LE");
        out.append("Smiley = \"")
                .append(protocol)
                .append("\\")
                .append(pngname)
                .append("\",0,\"")
                .append(returnUnicodeChars(character))
                .append("\",\"")
                .append(tooltip)
                .append("\"\r\n");
        out.close();
    }

    // Create msl file and add headers
    private static void prepareMSLFiles(String protocol) throws java.io.IOException{
        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
        Date date = new Date();

        String filename = outDir + protocol + ".msl";
        OutputStreamWriter stream = new OutputStreamWriter(new FileOutputStream(filename), "UTF-16LE");
        BufferedWriter out = new BufferedWriter(stream);
        // BOM
        out.write("\ufeff");
        // Header
        out.write("Name = \"" + protocol + " Emoji set\""); out.newLine();
        out.write("Author = \"Pavel Bykov\""); out.newLine();
        out.write("Date = \"" + dateFormat.format(date) + "\""); out.newLine();
        out.write("Version = \"1.0\""); out.newLine();
        out.write("SelectionSize = 24, 24"); out.newLine();
        out.write("WindowSize = 10, 8"); out.newLine();
        out.newLine();
        out.close();
    }

    private static String returnUnicodeChars(String character) {
        String[] chars;
        String returnchar = "";
        chars = character.split("_");
        for (int i=0; i<chars.length; i++) {
            returnchar+=String.valueOf(Character.toChars(Integer.parseInt(chars[i],16)));
        }
        return returnchar;
    }
}

Thank you
 

Offline Thug

Re: WhatsApp smiles (need help)
« Reply #47 on: 05 10 2015, 15:08:19 »
Hi. First of all, thanks a lot to MikalaiR for implementing horizontal sorting in SmileyAdd plugin, looks much better now :THUMBS UP:

And now, behold a new version (1.3) of whatsapp smilepack! Here are the changes:
 - multicultural emoji are added, including new emoji "Spock" and "Middle Finger". These new emoji are united in 59 six-icon pictures in android client sources, so, due to the lack of plugin functionality, I had to just split them in graphics redactor.
 - updated the flags (new Pakistan and Bangladesh flags were added, the rest were redesigned).

There are 1191 emoji in the pack now, and looks like will be much more in the future. As you can see, it's getting pretty hard to navigate through it. New functions such as tabs and that selection window for multicultural emoji are needed.

Btw, I have noticed that some odd symbol comes from iPhones with a group of emoji. The symbol is "FE0F" in hexademical code. And the emoji are, for example, horoscope signs, a snowflake, and many others. I wonder what is the purpose of it :-\
« Last Edit: 01 07 2023, 07:04:36 by Thug »
 

Offline watcher

Re: WhatsApp smiles (need help)
« Reply #48 on: 05 10 2015, 17:02:48 »
Thug,  can't download the pack for updating on server :( "Page not found" error.
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 

Offline Thug

Re: WhatsApp smiles (need help)
« Reply #49 on: 05 10 2015, 21:22:44 »
Thug,  can't download the pack for updating on server  "Page not found" error.
Sorry, made an attachment. Thought of using VK as a file hosting and failed ;D Thanks!
« Last Edit: 05 10 2015, 22:03:17 by Thug »
 

Offline watcher

Re: WhatsApp smiles (need help)
« Reply #50 on: 05 10 2015, 21:32:45 »
The pack has been updated.
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 
The following users thanked this post: Thug

Offline Thug

Re: WhatsApp emoji
« Reply #51 on: 08 12 2016, 11:59:11 »
Hi. I had stopped updating this pack almost a year ago - when whatsapp plugin became completely unusable. But I was researching the web version of whatsapp recently and found all the source data requiered to build a new version of the smileypack, so I decided to undertake it again :)

The new version contains all currently supported 1770 emoji (+1 strange icon without a code) extracted from the web version as well as two discontinued emoji (Shibuya and Olympic Rings - they still work in some old clients). Now they are available in two resolutions: 40x40 and 64x64.

I have hidden all the multicultural (different skin color) emoji and the ones located in the last section ("Other") to make the selection menu look nicer and in order to match the official presentation. Feel free to unhide them by removing "*" symbol in "Smiley*" at the beginning of the strings.
* Thanks to Wishmaster for the tip!

The msl is saved in a simple UTF-8 format.
Dunno why did we use UTF-16 LE ???

I could also make an online version (just an .msl with direct links to the icons on whatsapp server), but does anyone really need it? Note that whatsapp developers regulary change everything and the links can turn broken anytime. Anyway, if you are interested, the links look like this:
https://web.whatsapp.com/img/c9c24f56.png

Download WhatsApp emoji pack v. 2.0

Hope it will inspire someone to continue developing whatsapp plugin or at least will come in handy for something :THUMBS UP:
Btw, it is 90% compatible with VK protocol now.
« Last Edit: 11 12 2016, 14:41:25 by Thug »
 

Offline Thug

Re: WhatsApp emoji
« Reply #52 on: 22 02 2017, 10:54:10 »
Catching up with WhatsApp implementing iOS 10.2 emojis (added support for Unicode 9 emojis, as well as new professions and a graphical redesign).

Download WhatsApp emoji pack v. 2.1
 

Offline dartraiden

Re: WhatsApp emoji
« Reply #53 on: 29 11 2017, 12:39:49 »
WhatsApp plugin is deprecated.
 

Offline Thug

Re: WhatsApp emoji
« Reply #54 on: 22 09 2018, 19:02:35 »
Hi. I know that WhatsApp protocol is not supported right now. But sloppdawop asked me to include downsized images in the next release, so I have made the next release :)

Download:
WhatsApp EmojiPack 2.17

;  Version 2.17 (2018.09.22):
;     - Emojis from Unicode 10.0 and new flags are added.
;     - New WhatsApp emoji designs. The pack now includes both versions of the emoji designs
;       currently supported by WhatsApp: classic Apple designs (a) and WhatsApp custom designs (w)
;       (some emojis like Texas flag are missing from the Apple emoji set for now).
;     - Added downsized resolutions (32x32 and 20x20).
;     - The emojipack version number is aligned with Android WhatsApp version.

While researching whatsapp resources I have noticed that it stores both Apple and new custom WhatsApp emojis in the web and windows versions. If you use iPhone, the web or windows version will show you apple-style emojis, while using any other phone to connect via PC will trigger WhatsApp custom emoji set. The Apple version is missing some emojis, but iOS 12 already has some of them (like the Texas flag). Anyway, I'm a bit (about a year) late with this version. I guess you will see a new WhatsApp version in some days or weeks that will introduce a huge emoji update.
Btw, you can find an unused image e2364.png in the "a" version of the emojipack. If you are curious, it's just a censored version of Taiwanese flag for Chinese region of iPhone users.

And I still hope that someone will bring back WhatsApp to Miranda NG. There is a bunch of working unofficial clients already, but no one for Windows, what is strange.
« Last Edit: 26 01 2019, 20:22:56 by Thug »
 

Offline Thug

WhatsApp/Apple/Telegram
« Reply #55 on: 01 07 2023, 04:16:41 »
Давно пора обновить смайлпак :)
Сделал новую версию на основе актуальной веб-версии вацапа, заменил там только иконки для самых новых эмодзи в Apple наборе, потому что в веб-версии там до сих пор используются не эппловские картинки (это косяк веб-версии вацапа, который они должны будут устранить рано или поздно).
Напоминаю, что в веб-версии вацапа присутствуют два набора эмодзи - набор с собственным дизайном для пользователей на андройде, и набор с дизайном от Apple для пользователей на iOS (изначально он использовался во всех версиях вацапа на всех устройствах). Поэтому в этом смайлпаке присутствуют оба набора - выбирайте, какой хотите.

Скачать WhatsApp emojipack 2.2327.4
Отдельно загружаю версию 16x16, кому надо.

Скриншоты окна выбора смайлов

WhatsApp 20x20
[close]
WhatsApp 32x32
[close]
WhatsApp 40x40
[close]
WhatsApp 64x64
[close]

Apple 20x20
[close]
Apple 32x32
[close]
Apple 40x40
[close]
Apple 64x64
[close]
[close]

Что касается телеграма - делать для него отдельный смайлпак не вижу смысла, так как там используется дизайн от Apple. Можете смело использовать в телеграме набор Apple из этого пака.
« Last Edit: 05 03 2024, 06:36:51 by Thug »
 

Offline dartraiden

Re: WhatsApp emojipack (+Apple/Telegram)
« Reply #56 on: 28 07 2023, 19:37:01 »
Thug, если сделаете скриншот (окна со смайлами, вылезающими при нажатии "Тест" в настройках SmileyAdd), то я добавлю ваши смайлы на сайт.
 

Offline Thug

WhatsApp/Apple/Telegram
« Reply #57 on: 29 07 2023, 02:44:02 »
dartraiden, добавил в предыдущий пост под спойлер  :THUMBS UP:
« Last Edit: 29 07 2023, 02:51:20 by Thug »