~tualatrix/ubuntu-tweak/arb-packaging

« back to all changes in this revision

Viewing changes to ubuntutweak/common/appdata.py

  • Committer: TualatriX
  • Date: 2009-10-22 14:14:56 UTC
  • Revision ID: git-v1:455f01496d7149fb9832dabdf1bf0eef506a0101
WIP, make most things works

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
# Ubuntu Tweak - PyGTK based desktop configure tool
 
4
#
 
5
# Copyright (C) 2007-2008 TualatriX <tualatrix@gmail.com>
 
6
#
 
7
# Ubuntu Tweak is free software; you can redistribute it and/or modify
 
8
# it under the terms of the GNU General Public License as published by
 
9
# the Free Software Foundation; either version 2 of the License, or
 
10
# (at your option) any later version.
 
11
#
 
12
# Ubuntu Tweak is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
15
# GNU General Public License for more details.
 
16
#
 
17
# You should have received a copy of the GNU General Public License
 
18
# along with Ubuntu Tweak; if not, write to the Free Software Foundation, Inc.,
 
19
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
20
 
 
21
import os
 
22
import gtk
 
23
from consts import *
 
24
 
 
25
__all__ = (
 
26
    'get_app_describ',
 
27
    'get_source_describ',
 
28
    'get_app_logo',
 
29
    'get_source_logo',
 
30
)
 
31
 
 
32
def get_app_describ(name):
 
33
    name = name.replace(' ', '-').lower()
 
34
    try:
 
35
        desc = APP_DICT[name]
 
36
    except KeyError:
 
37
        desc = 'Unknown Error'
 
38
 
 
39
    return desc
 
40
 
 
41
def get_source_describ(name):
 
42
    name = name.replace(' ', '-').lower()
 
43
    try:
 
44
        desc = SOURCE_DICT[name]
 
45
    except KeyError:
 
46
        desc = get_app_describ(name)
 
47
 
 
48
    return desc
 
49
 
 
50
def get_app_logo(name, size=32):
 
51
    try:
 
52
        name = '%s.png' % name.replace(' ', '-').lower()
 
53
        path = os.path.join(DATA_DIR, 'applogos', name)
 
54
 
 
55
        pixbuf = gtk.gdk.pixbuf_new_from_file(path)
 
56
        if pixbuf.get_width() != size or pixbuf.get_height() != size:
 
57
            pixbuf = pixbuf.scale_simple(size, size, gtk.gdk.INTERP_BILINEAR)
 
58
        return pixbuf
 
59
    except:
 
60
        icon = gtk.icon_theme_get_default()
 
61
        return icon.load_icon(gtk.STOCK_MISSING_IMAGE, size, 0)
 
62
 
 
63
def get_source_logo(name):
 
64
    return get_app_logo(name)
 
65
 
 
66
APP_DICT = {
 
67
    'agave': _('A color scheme designer'),
 
68
    'amarok-nightly': _('Development version of an audio player for KDE'),
 
69
    'amule': _('Client for the eD2k and Kad networks'),
 
70
    'anjuta': _('GNOME IDE for C/C++, Java, Python'),
 
71
    'arc-colors': _('Arc-Colors is a set of wallpapers and GDM themes made to complement the Shiki-Colors GTK+ themes and the GNOME-Colors icon themes.'),
 
72
    'audacious': _('A skinned multimedia player for many platforms'),
 
73
    'audacity': _('Record and edit audio files'),
 
74
    'avant-window-navigator': _('Fully customisable dock-like window navigator'),
 
75
    'avant-window-navigator-trunk': _('Fully customisable dock-like window navigator(Unstable)'),
 
76
    'avidemux': _('A free video editor'),
 
77
    'azureus': _('BitTorrent client written in Java'),
 
78
    'banshee': _('Audio Management and Playback application'),
 
79
    'blueman': _('GTK+ Bluetooth Manager'),
 
80
    'backintime-gnome': _('Simple backup system for GNOME Desktop'),
 
81
    'backintime-kde4': _('Simple backup system for KDE4 Desktop'),
 
82
    'breathe-icon-theme': _("The Breathe icon theme is a refresh of the Human icon theme using KDE's Oxygen icon set as an inspiration but with that distinctly Human feel."),
 
83
    'cairo-dock': _('A true dock for linux'),
 
84
    'chmsee': _('A chm file viewer written in GTK+'),
 
85
    'christine': _('Desired to be small and fast, christine is a simple media player, that let you play your favorite music and videos from one single application.'),
 
86
    'chromium-browser': _('Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web.'),
 
87
    'codeblocks': _('The open source, cross-platform IDE'),
 
88
    'compizconfig-settings-manager': _('Advanced Desktop Effects Settings Manager'),
 
89
    'devhelp': _('An API documentation browser for GNOME.'),
 
90
    'deluge-torrent': _('A Bittorrent client written in PyGTK'),
 
91
    'nautilus-dropbox': _('Store, Sync and Share your files online.'),
 
92
    'eclipse': _('Extensible Tool Platform and Java IDE'),
 
93
    'eioffice-personal': _('EIOffice Personal 2009. Free for Chinese users. See http://www.evermoresw.com.'),
 
94
    'emesene': _('A client for the Windows Live Message network'),
 
95
    'empathy': _('Empathy consists of a rich set of reusable instant messaging widgets, and a GNOME client using those widgets.'),
 
96
    'exaile': _('flexible audio player, similar to Amarok, but written in GTK+'),
 
97
    'filezilla': _('File transmission via ftp, sftp and ftps'),
 
98
    'pcmanfm': _('An extremly fast and lightweight file manager'),
 
99
    'galaxium': _('Galaxium is an instant messenger application designed for the GNOME desktop'),
 
100
    'gajim': _('A GTK+ jabber client'),
 
101
    'geany': _('A fast and lightweight IDE'),
 
102
    'gftp': _('A multithreaded FTP client'),
 
103
    'ghex': _('GNOME Hex editor'),
 
104
    'gloobus-preview': _('Gloobus is an extension of Gnome designed to enable a full screen preview of any kind of file.'),
 
105
    'gimp': _('The GNU Image Manipulation Program'),
 
106
    'giver': _('A simple file sharing desktop application'),
 
107
    'gmail-notify': _('Notifies the user upon arrival of new mail in Gmail'),
 
108
    'gmchess': _('GMChess is chinese chess game write by gtkmm'),
 
109
    'gnome-do': _('A powerful, speedy, and sexy remote control for the GNOME Desktop'),
 
110
    'gnome-do-plugins': _('Extra functionality for GNOME-Do launcher'),
 
111
    'gnome-globalmenu': _('Global Menu Bar for GNOME'),
 
112
    'gnome-colors': _('GNOME-Colors is a set of GNOME icon themes, with some inspiration from Tango, Elementary, Discovery, Tango Generator and others.'),
 
113
    'gnote': _('a C++ port of Tomboy'),
 
114
    'googleearth': _("A program that combines satellite imagery and maps to put the world's geographic information at your fingertips."),
 
115
    'google-gadgets': _('Platform for running Google Gadgets on Linux'),
 
116
    'google-chrome-unstable': _('Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.'),
 
117
    'gparted': _('GNOME partition editor'),
 
118
    'gpicview': _('Lightweight image viewer'),
 
119
    'gtk-recordmydesktop': _('Graphical frontend for recordmydesktop'),
 
120
    'gtg': _('GTG is a personal organizer for the GNOME desktop environment, it focuses on ease of use and flexibility, while keeping things simple.'),
 
121
    'gwibber': _('Gwibber is an open source microblogging client for GNOME'),
 
122
    'isomaster': _('A graphical CD image editor'),
 
123
    'ibus': _('Intelligent Input Bus for Linux / Unix OS'),
 
124
    'ibus-pinyin': _('It is a PinYin engine for IBus.'),
 
125
    'ibus-table': _('IBus-Table is the IM Engine framework for table-based input methods, such as ZhengMa, WuBi, ErBi, ChangJie and so on.'),
 
126
    'ibus-table-wubi': _('Wubi input method based on table engine of ibus'),
 
127
    'inkscape': _('Create and edit Scalable Vector Graphics images'),
 
128
    'inkscape-devel': _('Create and edit Scalable Vector Graphics images'),
 
129
    'kino': _('Non-linear editor for Digital Video data'),
 
130
    'lastfm': _('A music player for Last.fm personalized radio'),
 
131
    'leafpad': _('GTK+ based simple text editor'),
 
132
    'liferea': _('Feed aggregator for GNOME'),
 
133
    'mail-notification': _('Mail notification in system tray'),
 
134
    'meld': _('Adcal tool to diff and merge files'),
 
135
    'mirage': _('A fast and simple GTK+ Image Viewer'),
 
136
    'miro': _('Open internet TV, beyond anything else'),
 
137
    'midori': _('Webkit based lightweight web browser'),
 
138
    'moovida': _('The free media player - play all your files'),
 
139
    'monodevelop': _('An IDE to Develop .NET applications.'),
 
140
    'moblin': _('A moblin feature enabled environment for Ubuntu (Testing Only)'),
 
141
    'mplayer': _('The Ultimate Movie Player For Linux'),
 
142
    'netbeans': _('IDE for Java, C/C++, Ruby, UML, etc.'),
 
143
    'opera': _('The Opera Web Browser'),
 
144
    'pidgin': _('Pidgin is a graphical modular messaging client based on libpurple which is capable of connecting to AIM, MSN, Yahoo!, XMPP, ICQ, IRC, SILC, SIP/SIMPLE, Novell GroupWise, Lotus Sametime, Bonjour, Zephyr, MySpaceIM, Gadu-Gadu, and QQ all at once.'),
 
145
    'playonlinux': _('PlayOnLinux is a front-end for wine. It permits you to install Windows Games and softwares on Linux.'),
 
146
    'picasa': _('Image management application from Google'),
 
147
    'qt-creator': _('IDE for Development with Qt'),
 
148
    'rednotebook': _('RedNotebook is a graphical diary and journal to keep track of notes and thoughts throughout the day. It includes a calendar navigation, customisable templates for each day, and a keyword search and cloud.'),
 
149
    'shiki-colors': _('Shiki-Colors is a set of Metacity/GTK-2+ themes which mix the elegance of a dark theme with the usability of a light theme, resulting in a hybrid theme.'),
 
150
    'screenlets': _('A framework for desktop widgets'),
 
151
    'shutter': _('Feature-rich screenshot application(formerly known as GScrot)'),
 
152
    'skype': _('Make audio/video calls using this VoIP Software'),
 
153
    'smplayer': _('A great MPlayer front-end, written in QT4'),
 
154
    'soundconverter': _('Convert audio files into other formats'),
 
155
    'spicebird': _('A fully integrated mail, PIM and instant messaging client'),
 
156
    'stardict': _('An international dictionary'),
 
157
    'swiftweasel': _('Swiftweasel is an optimized build of the Mozilla Firefox web browser for Linux'),
 
158
    'specto': _('A desktop application that will watch for events (website updates, emails, file and folder changes...)'),
 
159
    'synapse': _('An instant messaging application powered by qt-mono-bindings'),
 
160
    'tasque': _('A Useful Task List'),
 
161
    'terminator': _('Multiple GNOME terminals in one window'),
 
162
    'transmission-gtk': _('Transmission is a fast, easy, and free multi-platform BitTorrent client.'),
 
163
    'ubuntu-tweak': _('Ubuntu Tweak makes it easier to configure Ubuntu'),
 
164
    'ubuntu-restricted-extras': _('Commonly used restricted packages'),
 
165
    'ubudsl': _('configure your USB ADSL modem and connection easier than ever!'),
 
166
    'virtualbox': _('A feature rich, high performance virtualization software'),
 
167
    'virtualbox-3.0': _('A feature rich, high performance virtualization software'),
 
168
    'virtualbox-ose': _('A feature rich, high performance virtualization software'),
 
169
    'vlc': _('Read, capture, broadcast your multimedia streams'),
 
170
    'vmware-player': _('Run Virtual Machines using VMware'),
 
171
    'wine': _('A compatibility layer for running Windows programs'),
 
172
    'wine-doors': _('Wine-doors is an application designed to make installing windows software on Linux, Solaris or other Unix systems easier.'),
 
173
    'xbmc': _('XBMC is a free and open source software media player and entertainment hub'),
 
174
    'zim': _('Zim is a WYSIWYG text editor. It aims at bringing the concept of a wiki to your desktop.'),
 
175
    'step-into-freedom-theme': _('Step-into-freedom theme contains a full theme for GNOME based system.'),
 
176
    'ubuntu-sunrise-theme': _('Ubuntu-sunrise theme contains a full theme for GNOME based system.'),
 
177
    'bamboo-zen-theme': _('Bamboo-zen theme contains a full theme for GNOME based system.'),
 
178
    'exotic-theme': _('Exotic theme contains a full theme for GNOME based system.'),
 
179
    'aquadreams-theme': _('Aquadreams theme contains a full theme for GNOME based system.'),
 
180
    'showtime-theme': _('Showtime theme contains a full theme for GNOME based system.'),
 
181
    'infinity-theme': _('Infinity theme contains a full theme for GNOME based system.'),
 
182
    'tropical-theme': _('Tropical theme contains a full theme for GNOME based system.'),
 
183
    'wild-shine-theme': _('Wild-shine theme contains a full theme for GNOME based system.'),
 
184
    'balanzan-theme': _('Balanzan theme contains a full theme for GNOME based system.'),
 
185
    'dia': _('Dia is an editor for diagrams, graphs, charts etc.'),
 
186
    'pitivi': _('non-linear audio/video editor using GStreamer'),
 
187
    'lyx': _('LyX is an almost WYSIWYG-frontend for LaTeX.'),
 
188
    'texmaker': _('Texmaker is a clean, highly configurable LaTeX editor with good hot key support and extensive LaTeX documentation.'),
 
189
    'tomboy': _('Tomboy is a desktop note-taking application which is simple and easy to use.'),
 
190
    'pdfmod': _('PDF Mod is a simple tool for modifying PDF documents.'),
 
191
    'osdlyrics': _('An OSD lyrics show compatible with various media players.'),
 
192
    'openshot': _('OpenShot Video Editor is a free, open-source, non-linear video editor, based on Python, GTK, and MLT.'),
 
193
}
 
194
 
 
195
SOURCE_DICT = {
 
196
    'firefox': _('Development Version of Mozilla Firefox'),
 
197
    'compiz': _('Development version of Compiz'),
 
198
    'google': _("Google's Linux Repository"),
 
199
    'kde-4': _('Development Version of K Desktop Environment'),
 
200
    'lxde': _('Lightweight X11 Desktop Environment: GPicView, PCManFM'),
 
201
    'webkitgtk': _('WebkitGtk+, Liferea (Webkit), Midori and other WebKit related projects.'),
 
202
    'medibuntu': _('Multimedia, Entertainment and Distraction In Ubuntu\nMedibuntu is a repository of packages that cannot be included into the Ubuntu distribution for legal reasons (copyright, license, patent, etc).'),
 
203
    'openoffice': 'OpenOffice.org 3.1 for Ubuntu',
 
204
    'ubuntu-cn': _('Ubuntu repository for Chinese users.\n'
 
205
        'Including EIOffice, Ubuntu Tweak, ibus input method, OpenOffice.org 3.0 and other softwares.'),
 
206
    'getdeb': _('GetDeb extends the existing software options for Ubuntu (and derived) Linux distributions by providing major updates and software not yet available on the official Ubuntu repositories.'),
 
207
    'ubuntu-x': _('Updated versions of X.org drivers, libraries, etc. for Ubuntu.'),
 
208
    'gnome-games': _('Gnome Games built from Git, with all experimental features and staging games enabled.'),
 
209
    'mozilla-security': _('Ubuntu Mozilla Security Team provides beta and final stable/security updates for mozilla software in its PPA'),
 
210
    'qt': _('A cross-platform application and UI framework'),
 
211
    'mono': _('Mono is a cross platform, open source .NET development framework.'),
 
212
    'clutter': _('Clutter is an OpenGL based interactive canvas library, designed for creating fast, mainly 2D single window applications such as media box UIs, presentations, kiosk style applications and so on.'),
 
213
    'gloobus': _('Gloobus is an extension of Gnome designed to enable a full screen preview of any kind of file.'),
 
214
    'bisigi': _('Behind this African word, referring to the notion of imagination, you can find some themes for GNOME'),
 
215
    'kubuntu-update': _('Updates for Kubuntu releases which are due to go to Ubuntu Updates. Mostly KDE point releases.'),
 
216
    'kubuntu-backports': _('Backports of new versions of KDE for Kubuntu which are not yet tested enough to go to Ubuntu Backports.'),
 
217
}
 
218
 
 
219
P2P = (_('File-Sharing Clients'), 'p2p.png')
 
220
Image = (_('Image Tools'), 'image.png')
 
221
Sound = (_('Sound Tools'), 'sound.png')
 
222
Video = (_('Video Tools'), 'video.png')
 
223
Text = (_('Text Tools'), 'text.png')
 
224
IM = (_('Instant Messengers'), 'im.png')
 
225
Internet = (_('Internet Tools'), 'internet.png')
 
226
FTP = (_('FTP Tools'), 'ftp.png')
 
227
Desktop = (_('Desktop Tools'), 'desktop.png')
 
228
Disk = (_('CD/Disk Tools'), 'cd.png')
 
229
Develop = (_('Development'), 'develop.png')
 
230
Emulator = (_('Emulators'), 'emulator.png')
 
231
Theme = (_('Themes'), 'theme.png')
 
232
Mail = (_('E-mail Tools'), 'mail.png')
 
233
 
 
234
def create_cate(*items):
 
235
    new = []
 
236
    for i, item in enumerate(items):
 
237
        list = [i]
 
238
        list.extend(item)
 
239
        new.append(list)
 
240
    return new
 
241
 
 
242
CATES_DATA = create_cate(P2P, Image, Sound, Video, Text, IM, Internet, FTP, Desktop, Disk, Develop, Emulator, Theme, Mail)
 
243
 
 
244
APPS = \
 
245
{
 
246
    'agave': Image,
 
247
    'amule': P2P,
 
248
    'amarok-nightly': Sound,
 
249
    'anjuta': Develop,
 
250
    'audacious': Sound,
 
251
    'audacity': Sound,
 
252
    'avant-window-navigator': Desktop,
 
253
    'avant-window-navigator-trunk': Desktop,
 
254
    'avidemux': Video,
 
255
    'azureus': P2P,
 
256
    'banshee': Sound,
 
257
    'blueman': P2P,
 
258
    'backintime-gnome': Desktop,
 
259
    'backintime-kde4': Desktop,
 
260
    'breathe-icon-theme': Theme,
 
261
    'cairo-dock': Desktop,
 
262
    'chmsee': Text,
 
263
    'christine': Sound,
 
264
    'chromium-browser': Internet,
 
265
    'compizconfig-settings-manager': Desktop,
 
266
    'codeblocks': Develop,
 
267
    'devhelp': Develop,
 
268
    'deluge-torrent': P2P,
 
269
    'eclipse': Develop,
 
270
    'emesene': IM,
 
271
    'empathy': IM,
 
272
    'eioffice-personal': Text,
 
273
    'exaile': Sound,
 
274
    'filezilla': FTP,
 
275
    'pcmanfm': Desktop,
 
276
    'gimp': Image,
 
277
    'gloobus-preview': Desktop,
 
278
    'giver': P2P,
 
279
    'galaxium': IM,
 
280
    'gajim': IM,
 
281
    'geany': Develop,
 
282
    'gftp': FTP,
 
283
    'ghex': Text,
 
284
    'gmail-notify': Mail,
 
285
    'gnote': Text,
 
286
    'gnome-do': Desktop,
 
287
    'gnome-do-plugins': Desktop,
 
288
    'gnome-globalmenu': Desktop,
 
289
    'gnome-colors': Theme,
 
290
    'shiki-colors': Theme,
 
291
    'arc-colors': Theme,
 
292
    'googleearth': Internet,
 
293
    'google-gadgets': Desktop,
 
294
    'google-chrome-unstable': Internet,
 
295
    'gparted': Disk,
 
296
    'gpicview': Image,
 
297
    'gtk-recordmydesktop': Video,
 
298
    'gwibber': Internet,
 
299
    'gtg': Text,
 
300
    'isomaster': Disk,
 
301
    'inkscape': Image,
 
302
    'inkscape-devel': Image,
 
303
    'ibus-pinyin': Text,
 
304
    'ibus-table-wubi': Text,
 
305
    'kino': Video,
 
306
    'lastfm': Internet,
 
307
    'leafpad': Text,
 
308
    'liferea': Internet,
 
309
    'mail-notification': Mail,
 
310
    'meld': Text,
 
311
    'mirage': Image,
 
312
    'miro': Video,
 
313
    'midori': Internet,
 
314
    'moovida': Sound,
 
315
    'monodevelop': Develop,
 
316
    'mplayer': Video,
 
317
    'netbeans': Develop,
 
318
    'nautilus-dropbox': Internet,
 
319
    'opera': Internet,
 
320
    'playonlinux': Emulator,
 
321
    'picasa': Image,
 
322
    'qt-creator': Develop,
 
323
    'rednotebook': Text,
 
324
    'screenlets': Desktop,
 
325
    'specto': Desktop,
 
326
    'shutter': Image,
 
327
    'skype': IM,
 
328
    'smplayer': Video,
 
329
    'soundconverter': Sound,
 
330
    'stardict': Desktop,
 
331
    'synapse': IM,
 
332
    'spicebird': Internet,
 
333
    'tasque': Desktop,
 
334
    'terminator': Emulator,
 
335
    'transmission-gtk': P2P,
 
336
    'ubudsl': Internet,
 
337
    'ubuntu-restricted-extras': Desktop,
 
338
    'virtualbox-ose': Emulator,
 
339
    'virtualbox-3.0': Emulator,
 
340
    'vlc': Video,
 
341
    'vmware-player': Emulator,
 
342
    'wine': Emulator,
 
343
    'wine-doors': Emulator,
 
344
    'xbmc': Desktop,
 
345
    'zim': Text,
 
346
    'step-into-freedom-theme': Theme,
 
347
    'ubuntu-sunrise-theme': Theme,
 
348
    'bamboo-zen-theme': Theme,
 
349
    'exotic-theme': Theme,
 
350
    'aquadreams-theme': Theme,
 
351
    'showtime-theme': Theme,
 
352
    'infinity-theme': Theme,
 
353
    'tropical-theme': Theme,
 
354
    'wild-shine-theme': Theme,
 
355
    'balanzan-theme': Theme,
 
356
    'dia': Image,
 
357
    'pitivi': Video,
 
358
    'lyx': Text,
 
359
    'texmaker': Text,
 
360
    'tomboy': Text,
 
361
    'pdfmod': Text,
 
362
    'osdlyrics': Sound,
 
363
    'openshot': Video,
 
364
}
 
365
 
 
366
if __name__ == '__main__':
 
367
    print get_app_describ('Avant Window Navigator')
 
368
    print get_app_describ('Banshee')
 
369
    print get_source_describ('wine')