[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xdg
Subject:    Emoticons theme specification
From:       Olivier Goffart <ogoffart () tiscalinet ! be>
Date:       2005-01-07 17:11:31
Message-ID: 200501071811.43642.ogoffart () tiscalinet ! be
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Hello

This mail is a suite for my previous mail in the kde-core-devel mailing list
http://lists.kde.org/?l=kde-core-devel&m=110510845929729&w=2

Konversation and Kopete want to share the same emoticons themes, There is also 
interest in KMail to support them.

It may be a good idea to standardize that as a freedesktop specification. So 
the same emoticons theme could be used in every others program as well. 
(Gaim, evolution, ...)

So I've finally specified today the original format I wrote 2 years ago for 
Kopete.

It's my first specification, so please be indulgent, and thanks to notify me 
errors.

I've attached the docbook file since I have currently no real place to host 
it.

Thanks for your comments.

--
Olivier

["emoticonspec.docbook" (text/docbook)]

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
				  ]>
<article id="index">
  <articleinfo>
    <title>Emoticons Specification</title>
    <releaseinfo>Version 0.1</releaseinfo>
    <date>07 January 2005</date>
    <authorgroup>
      <author>
	<firstname>Olivier</firstname>
	<surname>Goffart</surname>
	<affiliation>
	  <address>
	    <email>ogoffart@tiscalinet.be</email>
	  </address>
	</affiliation>
      </author>
    </authorgroup>
  </articleinfo>


  <sect1 id="introduction">
    <title>Introduction</title>
    <para>
      This DRAFT document defines how to make a theme of emoticons typically used
		in instant messaging applications
    </para>
    <para>
      The basic scheme is very simple. The theme consits in one sub directory which
		contains all the pictures and an XML file that gives each picture ASCII symbols.
		a .directory file might be used
    </para>
  </sect1>
  <sect1 id="location">
    <title>File locations</title>
    <para>
      Files involved in this specification are located according to the "desktop
      base directory specification" which can be found on <ulink
      url="http://www.freedesktop.org/standards/">www.freedesktop.org</ulink>.
    </para>
    <para>
		All the files of the theme must be placed in a sub directory of
		 <varname>$XDG_DATA_DIRS</varname>/emoticons/
		 The name of the directory must be equal to the name of the theme.
		 That directory MUST contains a file called <varname>emoticons.xml</varname>
		 the format of that file is described bellow.
	</para>
	<para>
		  The theme directory may also contains a .directory file which contains
		  translations of the theme name and/or an icon for that theme.
	</para>
  </sect1>
  <sect1 id="emoticons-map-format">
    <title>Format of the emoticons.xml file</title>
    <para>
      Emoticon map files must be well-formed XML files.
		Implementations should ignore unknown tag or unknown attributes.
    </para>
    <sect2 id="emoticons-map-elements">
      <title>Elements</title>
      <para>
        <variablelist>
          <varlistentry>
					<term>&lt;messaging-emoticon-map&gt; [version="0.1"]</term>
            <listitem>
              <para>
						 The root element is &lt;messaging-emoticon-map&gt;
						 every others element are contained by it.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>&lt;emoticon file="..."&gt;</term>
            <listitem>
              <para>
						This element represents one emoticon.
						The attribute file is the name of the image file which must be in the same directory.
						The extention may be omitted. In that case, the implementation look in that directory
						for a file with the same name in a supported format.
              </para>
				  <para>
						 There are no order for emoticon in the map. But the first one SHOULD be :-) which
						 may be taken as icon for the theme is the .directory files doesn't contains icon.
				  </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>&lt;string&gt;</term>
            <listitem>
              <para>
                This element may only appear below &lt;emoticon&gt;.
					 It represent the ASCII string which will be matched in the text,
					 and replaced by the image specified by the file attribute of the emoticon.
              </para>
				  <para>
						 There is no order for string inside an emoticon. But the first one SHOULD be
						 the default one, and will be taken if there is a GUI selector.
				  </para>
            </listitem>
          </varlistentry>
	    </variablelist>
  </para>
    </sect2>
  </sect1>

  <sect1 id="img-format">
    <title>Format of the image.</title>
    <para>
		All image SHOULD be in a supported format :  PNG, GIF or MNG.
    </para>
  </sect1>

  <sect1 id="implementation">
    <title>Implementations notes</title>
	 <sect2 id="impl-parser">
	  <title>Emoticon parser</title>
    <para>
		There are no real recommendation how to parse emoticons. But
		an emoticon with a longer string should have the priority over one with a shorter string.
		(Example: if both :-() and :-( are in a theme, the picture for the first one should be used
			when :-() is encounter)
    </para>
</sect2>
</sect1>

<appendix id="example">
	  <title>Registered Categories</title>
	  <para>
			 <programlisting>
	&lt;messaging-emoticon-map&gt;
		&lt;emoticon file="smile.png"&gt;
				&lt;string&gt;:-)&lt;/string&gt;
				&lt;string&gt;:)&lt;/string&gt;
				&lt;string&gt;:o)&lt;/string&gt;
		&lt;/emoticon&gt;

		&lt;emoticon file="wink.png"&gt;
				&lt;string&gt;;-)&lt;/string&gt;
				&lt;string&gt;;)&lt;/string&gt;
		&lt;/emoticon&gt;

		&lt;emoticon file="unhappy.png"&gt;
				&lt;string&gt;:-(&lt;/string&gt;
				&lt;string&gt;:(&lt;/string&gt;
		&lt;/emoticon&gt;
	&lt;/messaging-emoticon-map&gt;

 </programlisting>
</para>
</appendix>



			 <appendix id="todo">
	  <title>TODO</title>
	  <para>
			 A DTD of the XML file
	  </para>
</appendix>
</article>


[Attachment #6 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic