Example #1
0
 def __init__(self):
     LunchCLIModule.__init__(self)
     iface_gui_plugin.__init__(self)
     
     self.sqlResultTable = None
     self.times_called=0
     self.last_key=-1
     self.options = [((u"query_db_connection", u"DB Connection to send statements to", [],
                       self._changeQueryDB),
                      get_settings().get_default_db_connection()),
                     ((u"db_connection", u"DB Connection to store history", [],
                       self._reconnectDB),
                      get_settings().get_default_db_connection()),
                     ((u"use_textedit", u"Use multi-line sql editor"),False)]
     self.db_connection = None
     
     self.add_supported_dbms("SQLite Connection", sql_commands_sqlite)
Example #2
0
 def do_rot13(self, args):
     """
     Encryption, now for the command line.
     Usage: rot13 <text> [<text2> [...]]
     """
     import string
     from lunchinator.cli import LunchCLIModule
     rot13 = string.maketrans( 
         u"ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz", 
         u"NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm")
     
     args = LunchCLIModule.getArguments(args)
     for aString in args:
         try:
             aString = aString.encode("utf-8")
             print string.translate(aString, rot13)
         except:
             self.logger.exception("Error encrypting string: %s", aString)
Example #3
0
 def __init__(self):
     iface_gui_plugin.__init__(self)
     LunchCLIModule.__init__(self)
     self.options = [((u"url", u"Lunch Menu URL", self._urlChanged), "")]
     self._initLunchMenu = None
Example #4
0
 def __init__(self):
     iface_gui_plugin.__init__(self)
     LunchCLIModule.__init__(self)
     self.options = [((u"url", u"Lunch Menu URL", self._urlChanged), "")]
     self._initLunchMenu = None