[axcel] update AcronymsExpanderPlugin
This commit is contained in:
		
							parent
							
								
									2278433f97
								
							
						
					
					
						commit
						9a78999565
					
				
					 2 changed files with 82 additions and 3 deletions
				
			
		
							
								
								
									
										69
									
								
								plugins/acronyms_expander/acronyms
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								plugins/acronyms_expander/acronyms
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,69 @@
 | 
			
		|||
{"afaik": "as far as I know",
 | 
			
		||||
"afaict": "as far as I can tell",
 | 
			
		||||
"afk": "away from keyboard",
 | 
			
		||||
"atm": "at the moment",
 | 
			
		||||
"bbiab": "be back in a bit",
 | 
			
		||||
"bbiaf": "be back in a few (minutes)",
 | 
			
		||||
"bbl": "be back later",
 | 
			
		||||
"bbs": "be back soon",
 | 
			
		||||
"b/c": "because",
 | 
			
		||||
"bf": "boyfriend",
 | 
			
		||||
"bfo": "blinding flash of the obvious",
 | 
			
		||||
"brb": "be right back",
 | 
			
		||||
"bsod": "blue screen of death",
 | 
			
		||||
"btw": "by the way",
 | 
			
		||||
"ciao": "Italian for goodbye",
 | 
			
		||||
"ctrn": "can't talk right now",
 | 
			
		||||
"cul8r": "see you later",
 | 
			
		||||
"cya": "see ya",
 | 
			
		||||
"dhtb": "don't have the bandwidth",
 | 
			
		||||
"f2f": "face to face",
 | 
			
		||||
"fubar": "fucked up beyond all recognition",
 | 
			
		||||
"fwiw": "for what it's worth",
 | 
			
		||||
"fyi": "for your information",
 | 
			
		||||
"gmta": "great minds think alike",
 | 
			
		||||
"iam": "in a meeting",
 | 
			
		||||
"ianal": "I am not a lawyer",
 | 
			
		||||
"ihmb": "I hate my boss",
 | 
			
		||||
"iirc": "if I recall correctly",
 | 
			
		||||
"imho": "in my humble opinion",
 | 
			
		||||
"imo": "in my opinion",
 | 
			
		||||
"iow": "in other words",
 | 
			
		||||
"irl": "in real life",
 | 
			
		||||
"<g>": "grin",
 | 
			
		||||
"*g*": "grin",
 | 
			
		||||
"gf": "girlfriend",
 | 
			
		||||
"gmta": "great minds think alike",
 | 
			
		||||
"g2g": "got to go",
 | 
			
		||||
"jid": "jabber identifier",
 | 
			
		||||
"j/k": "just kidding",
 | 
			
		||||
"ok": "okay",
 | 
			
		||||
"lol": "laugh out loud",
 | 
			
		||||
"l8r": "later",
 | 
			
		||||
"msg": "message",
 | 
			
		||||
"n/m": "never mind",
 | 
			
		||||
"n/p": "no problem",
 | 
			
		||||
"oAo": "over and out!",
 | 
			
		||||
"omg": "oh my god",
 | 
			
		||||
"oob": "out of band",
 | 
			
		||||
"otoh": "on the other hand",
 | 
			
		||||
"oww": "oops, wrong window!",
 | 
			
		||||
"otp": "on the phone",
 | 
			
		||||
"pita": "pain in the ass",
 | 
			
		||||
"pov": "point of view",
 | 
			
		||||
"pw": "password",
 | 
			
		||||
"rotfl": "rolling on the floor laughing",
 | 
			
		||||
"rsn": "real soon now",
 | 
			
		||||
"rtfm": "read the friendly manual",
 | 
			
		||||
"slap": "sounds like a plan",
 | 
			
		||||
"thx": "thanks",
 | 
			
		||||
"tia": "thanks in advance",
 | 
			
		||||
"tla": "three-letter arconym",
 | 
			
		||||
"ttfn": "ta ta for now",
 | 
			
		||||
"ttyl": "talk to you later",
 | 
			
		||||
"wb": "welcome back",
 | 
			
		||||
"wfm": "works for me",
 | 
			
		||||
"wtf": "what the fuck?!",
 | 
			
		||||
"wtg": "way to go!",
 | 
			
		||||
"xfer": "transfer",
 | 
			
		||||
"ymmv": "your mileage may vary",}
 | 
			
		||||
| 
						 | 
				
			
			@ -47,8 +47,7 @@ class AcronymsExpanderPlugin(GajimPlugin):
 | 
			
		|||
 | 
			
		||||
        self.config_default_values = {
 | 
			
		||||
            'INVOKER': (' ', ''),
 | 
			
		||||
            'ACRONYMS': ({'RTFM': 'Read The Friendly Manual',
 | 
			
		||||
                          '/slap': '/me slaps',
 | 
			
		||||
            'ACRONYMS': ({'/slap': '/me slaps',
 | 
			
		||||
                          'PS-': 'plug-in system',
 | 
			
		||||
                          'G-': 'Gajim',
 | 
			
		||||
                          'GNT-': 'http://trac.gajim.org/newticket',
 | 
			
		||||
| 
						 | 
				
			
			@ -57,6 +56,17 @@ class AcronymsExpanderPlugin(GajimPlugin):
 | 
			
		|||
                         },
 | 
			
		||||
                         ''),
 | 
			
		||||
        }
 | 
			
		||||
        if 'ACRONYMS' not in self.config:
 | 
			
		||||
            myAcronyms = self.get_own_acronyms_list()
 | 
			
		||||
            self.config['ACRONYMS'].update(myAcronyms)
 | 
			
		||||
 | 
			
		||||
    @log_calls('AcronymsExpanderPlugin')
 | 
			
		||||
    def get_own_acronyms_list(self):
 | 
			
		||||
        data_file = self.local_file_path('acronyms')
 | 
			
		||||
        data = open(data_file, 'r')
 | 
			
		||||
        acronyms = eval(data.read())
 | 
			
		||||
        data.close()
 | 
			
		||||
        return acronyms
 | 
			
		||||
 | 
			
		||||
    @log_calls('AcronymsExpanderPlugin')
 | 
			
		||||
    def textbuffer_live_acronym_expander(self, tb):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue