PanderMusubi / inkscape-open-symbols

Open source SVG symbol sets that can be used as Inkscape symbols
MIT License
685 stars 95 forks source link

Divide Emoji One (and Two) in eight or four groups #82

Open PanderMusubi opened 6 years ago

PanderMusubi commented 6 years ago

In a desktop computer with an i3 processor (that performs good with other applications) it takes about half a minute to load the Emoji One symbol set. Each time you select that symbol set. The complete application goes blank and is not responding in that time. Other symbol sets open very quickly.

This is not nice to work for many users. It also happens the first time you open Inkscape after installing the symbols, even though you don't open Emoji One symbol set.

One solution is to divide these symbol sets into parts, as can be seen by the Material Design symbols. That will speed up the usage greatly. Here are the official categories

  1. Smileys & People
  2. Animals & Nature
  3. Food & Drink
  4. Activity
  5. Travel & Places
  6. Objects
  7. Symbols
  8. Flags

In order to offer the sets in a practical way, please vote for:

Xaviju commented 6 years ago

That's a neat idea and not hard to develop! On incoming releases of Inkscape this will be easier but still, it makes sense

PanderMusubi commented 6 years ago

Initially I thought Inkscape was hanging or had a major error. So if you please can, try to get it in before the next release.

Xaviju commented 6 years ago

I can't find a source of the icons or SVG sprites from EmojiOne that displays to which category each icon belongs in the current inkscape symbol set. Doing it manually could be a really long job. I need a reference or an SVG sprite already assembled (even if it does not work in Inkscape) to divide it in categories.

PanderMusubi commented 6 years ago

If you assign this to me for that part, I can find that out.

Xaviju commented 6 years ago

Thanks @PanderMusubi I've already tried, but failed.

PanderMusubi commented 6 years ago

http://4.bp.blogspot.com/-D7x3BlPScYI/UbArRxEO1LI/AAAAAAAAAI8/sHs7GU8QTe4/s1600/tim+allen.png ;-)

PanderMusubi commented 6 years ago

I have found the data. How would you like to receive it? JSON, XML, TSV or CSV? Lookup table from Unicode code point to category?

Xaviju commented 6 years ago

JSON please :)

PanderMusubi commented 6 years ago
#!/usr/bin/env python3

# Run in top-level directory of https://github.com/emojione/emojione

import json

data = None
categories = {}

with open('emoji.json') as json_data:
    data = json.load(json_data)
    json_data.close()

output = open('category-for-emoji.json', 'w')
output.write('{')
first = True
for code, value in sorted(data.items()):
    category = value['category']
    if first:
        first = False
    else:
        output.write(',')
    output.write('\n"{}":"{}"'.format(code, category))
    if category not in categories:
        categories[category] = []
    categories[category].append('"{}"'.format(code))
output.write('\n}\n')

output = open('emoji-for-category.json', 'w')
output.write('{')
first = True
for category, values in sorted(categories.items()):
    if first:
        first = False
    else:
        output.write(',')
    output.write('\n"{}":[{}]'.format(category, ','.join(values)))
output.write('\n}\n')
PanderMusubi commented 3 years ago

See also https://github.com/Xaviju/inkscape-open-symbols/issues/123