[go: up one dir, main page]

File: __init__.py

package info (click to toggle)
keysync 0.2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,388 kB
  • ctags: 230
  • sloc: python: 2,102; xml: 802; sh: 143; makefile: 4
file content (52 lines) | stat: -rw-r--r-- 1,675 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

'''sets up the otrapps module with all of the currently supported apps'''

import os
import sys

from pkg_resources import get_distribution, DistributionNotFound
try:
    _dist = get_distribution('keysync')
    if not __file__.startswith(os.path.join(_dist.location, 'otrapps')):
        raise DistributionNotFound
except DistributionNotFound:
    # probably running from source repo or another version is installed
    __version__ = '(local version)'
else:
    __version__ = _dist.version


__all__ = ['adium', 'chatsecure', 'irssi', 'jitsi', 'pidgin', 'gajim', 'gnupg', 'xchat', 'kopete',]

if __name__ == '__main__':
    sys.path.insert(0, "../") # so the main() test suite can find otrapps module
import otrapps.adium
import otrapps.chatsecure
import otrapps.irssi
import otrapps.jitsi
import otrapps.pidgin
import otrapps.gajim
import otrapps.gnupg
import otrapps.xchat
import otrapps.kopete

apps = { 'adium'     : otrapps.adium.AdiumProperties,
         'chatsecure': otrapps.chatsecure.ChatSecureProperties,
         'irssi'     : otrapps.irssi.IrssiProperties,
         'jitsi'     : otrapps.jitsi.JitsiProperties,
         'pidgin'    : otrapps.pidgin.PidginProperties,
         'gajim'     : otrapps.gajim.GajimProperties,
         'gnupg'     : otrapps.gnupg.GnuPGProperties,
         'xchat'     : otrapps.xchat.XchatProperties,
         'kopete'    : otrapps.kopete.KopeteProperties,
        }
apps_supported = apps.keys()

def make_outdir(output_folder, subdir):
    '''create the folder that the results will be written to'''
    outdir = os.path.join(output_folder, subdir)
    if not os.path.exists(outdir):
        os.makedirs(outdir)
    return outdir