~yan/rhythmbox-swedishradio/trunk

« back to all changes in this revision

Viewing changes to plugins/bash.py

  • Committer: duanedesign
  • Date: 2010-05-07 02:40:15 UTC
  • Revision ID: duanedesign@gmail.com-20100507024015-sa8t3yq0h8u385dr
patch fixing bug LP 575903

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
import commands
11
11
from desktopcouch.records.server import CouchDatabase
12
12
from desktopcouch.records.record import Record as CouchRecord
13
 
#from core.stipple import PluginBase
 
13
from core.stipple import PluginBase
14
14
 
15
15
database = CouchDatabase("packages", create=True)
16
16
databaserecord = ""
17
17
RECORD_TYPE = 'http://www.okiebuntu.homelinux.com/packagesync'
18
18
BASH_CONFIG = os.path.expanduser("~") + "/.bashrc"
19
19
 
20
 
class Plugin():
 
20
class Plugin(PluginBase):
21
21
    
22
22
    def __init__ (self):
23
 
        """ Function doc """
24
23
        self.name = "Bash"
25
24
        self.icon = None
26
25
 
27
26
    
28
27
    def sync(self):
29
 
        ''' get simple list of installed apps to search for config files '''
 
28
        ''' get simple list of installed apps 
 
29
        to search for config files '''
30
30
        search_string = commands.getoutput("dpkg --get-selections '*'")
31
31
        if search_string.find("bash") != -1:
32
32
            ''' write the bash config to a couchdb '''
59
59
        bash_file = open(os.path.expanduser("~") + "/.bashrc2", 'w')
60
60
        bash_file.write(config_iter)
61
61
        bash_file.close()
62
 
        
63
 
'''
64
 
1.- pregutar si vim esta instalado
65
 
2.- copiar el .vimrc a la base de datos
66
 
3.- si hay un /home/malev/vim comprimirlo y ponerlo en una carpeta
67
 
en ubuntu-one
68
 
4.- guardar data de esto en la base de datos
69
 
5.- chequear cual es el directorio de ubuntu-one
70
 
'''
 
62