Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoticons standard format ? #30

Open
SkyzohKey opened this issue Mar 8, 2016 · 3 comments
Open

Emoticons standard format ? #30

SkyzohKey opened this issue Mar 8, 2016 · 3 comments

Comments

@SkyzohKey
Copy link

SkyzohKey commented Mar 8, 2016

Introduction:
The TCS should include a chapter on the emoticons packs storage. The emoticons packs would be stored in ~/.config/tox/emoticons/. This would permit differents clients to use the same packs and aswell save user's disk-space by not having 10 copy of the same emoticons packs.

I think we should make a strict format in order to ensure a good clients compatibility. See the following examples.

PoC for emoticon pack structure:

~/.config/tox/ || %APPDATA%/tox/ || ~/Library/Application Support/Tox/
emoticons/
-| twitter_emoji/
  -| package.json // A file that would map each image to the corresponding text-smiley.
  -| preview.png  // An image that would be used to preview a specific pack in clients.
  -| License      // The emoticon pack license.
  -| images/      // Here stands all the emoticons mapped in `package.json`
    -| smile.png
    -| blush.png
    -| thumbleweed.gif
    -| ...

A package.json file would look like this:

@field  author       The author of the emoticon pack.
@field  description  The description of the emoticon pack.
@field  url          The url from where the pack is available for downloading.
@field  license      The license of the emoticon pack.
@fiels  type         The pack type. Accepts "png", "gif", "mixed".
                     -- Where "mixed" is both "png" and "gif".
@field  map          A JSON array mapping images to strings.
{
  "author": "Pack author",
  "description": "Lorem impsum dolores sit amet.",
  "url": "https://url2download.thepack.tld",
  "license": {
    "type": "MIT",
    "online": "https://opensource.org/licenses/MIT"
  },
  "type": "mixed",

  "map": {
    "smile.png": [
      ":)",
      ":-)",
      "(smile)"
    ],
    "blush.png": [
      ":blush:",
      ":$"
    ],
    "thumbleweed.gif": ":thumbleweed:"
  }
}

Conclusion:
I think that we should stop to make clients without carying of compatibility with others and define formats for emoticons, stickers, friends profiles, avatars, clients settings, etc. All of this would be stored in the ~/.config/tox/ folder to centralize all the Tox's stuffs inside a single folder.
This would permit to just copy the tox/ dir to get the same Tox on another computer.

@Zer0-One
Copy link
Member

Zer0-One commented Mar 8, 2016

On one hand, I like the idea of using JSON for a manifest, because you can then use a JSON schema to ensure that the document is properly formatted, and most libraries will probably handle all of that automagically. On the other hand, some clients aren't going to want to implement JSON. Can we simplify package.json into a format that we can more easily parse line by line?

Also, I don't think clients are going to want to read emoticons out of an archive by themselves, so you should probably specify twitter_emoji instead of twitter_emoji.zip, or specify where the archive is meant to be extracted.

@SkyzohKey
Copy link
Author

Yeah, i'll edit with the folder type instead of .zip. Maybe that clients could perform the extraction themselves when the user drag&drop the .zip pack on the window then place the output folder in the emoticons/ folder.

About JSON: Maybe YAML so ?

@ProMcTagonist
Copy link

qTox currently uses the KDE emoticon format, which I think is actually a freedesktop thing. Something to take into account. I don't see much emoticon usage in other applications so I don't think incredible harm would come from switching to an internal format, except in the (rare?) case where someone has system emoticons and wants them to show up in Tox. We have to decide if we care about that or not.

Also,

we should ... define formats for emoticons, stickers, friends profiles, avatars, clients settings, etc.

Agreed. Been working on it for stickers, so I'll be lurking and copying any great ideas from here over to the article spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants