A User Awarding System

The idea being OMG! is to have a central user awarding system where users collect trophies based on their activities and experience on the desktop environment. e.g:

  • For installing "Banshee" the user gets awarded with the "Banshee Discovery Trophy".
  • For working with Cheese for 30 minutes the user gets awarded with "Photogenic Trophy".
  • For Editing 100 documents using "gedit" the user gets awarded with "Badass Trophy"

OMG! Basics

OMG! is a little daemon. Applications communicate with it over DBus. As an awarding system awards users are awarded with trophies: A trophy consists of:

  • Id: An identifier for each trophy which is actually of the format Set/Application/Title
  • Set: The group under which the Trophy can be classified. e.g. Music, Movies, Yearly Achievements
  • Title: String with the title of the trophy
  • Description: String with a more detailed description of WHY the user got the trophy (can be localized)
  • Application: The application which has registered the trophy. e.g. Banshee, Gnome Do, Docky for now the correct format is application://banshee.desktop
  • Timestamp : Integer with a Timestamp of when it was awarded.
  • IconPath : String with the path to the Icon for the Trophy

  • Status: A boolean describing if the Trophy is awarded unlocked or is locked until the requirements are fulfilled
  • Priority: Integer from 0 - 2 describing how relevantly big the achievement is.
  • Locale: The fully culture aware format. en-us and it-it are examples of such. en or it or fr is not

Applications are responsible for awarding their own trophies. OMG! is only a trophy collection and a notification system for that. It is intended to build another little Zeitgeist based application to monitor and evaluate activities to award users. Also achievements will be stored in Zeitgeist to show them in GAJ and allow applications to query their own awards.

OMG! Simple API

Thus the API is very straight forward

  • AwardTrophy (String Title, String Application): No Return

  • DeleteTrophy (String Title, String Application): No Return

  • GetTrophies ( ): Returns an Array of Trophies (String Title, String Description, String Application, Integer Timestamp, String IconPath, Boolean Status, Integer Priority.

The API can keep on changing and as the daemon becomes more mature, more methods will be added

OMG! Concept

  • Applications register their trophy by just putting a trophy file in a specific folder and the daemon picks it up and registers it
  • Each trophy has a Set and is associated with an Application
    • Example:
      • The Trophy name can be "Rock Addict" can be awarded by Banshee(Application) and can be under the Set - "Music"
  • The Appplication knows what all trophies it has registered. The application is also expected to keep a list of it. We might add a method to DBus infuture
  • The application can Award a trophy, if the trophy is already awarded, nothing happens

Trophy Format

  • The Trophy file is a Key, Value pair seperate by a =
  • The first line is mostly [ Trophy ], this line is discarded by the Trophy File Parser. It is just for reading
  • You have Key=Value pair on each line.
    • Example: Title=Metalhead
  • Please don't put "" around the strings on the Value
  • Lines such as Key=Value=Foo are ignored
  • white spaces are ignored aroung Key and Values
    • Example: Let _ represent whitespace, then
      • Title_=_Metal_Head_

        • interprets to
          • Title & Metal_Head

  • The allowed keys for Trophy file is ID, Title, Description, Application, SetName, IconPath, Priority, Locale

  • If any key is outside the allowed keys, it is simply ignored
  • If the Id is not equal to Set/Application/Title, then it is not registered
  • Please don't bring in trophies with duplicate Ids, they wont be added to the database

Example Trophy File


ID=Year Achievements/Don't know/Whoa


Description=What to do

Application=Don't know

SetName=Year Achievements




OMG! Code

Attic/OMG (last edited 2013-11-23 01:36:56 by WilliamJonMcCann)