def start(self): name = self.getCfgValue('account', 'name') pwd = self.getCfgValue('account', 'pwd') show = self.getCfgValue('init_param', 'show') status = self.getCfgValue('init_param', 'status') self.setState(show, status) self.gnotebook = GNotebook(name, pwd) if self.gnotebook: print "Google Notebook connected!" GtalkRobot.start(self, name, pwd)
# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # PyGtalkRobot Homepage: http://code.google.com/p/pygtalkrobot/ # RaspiBot Homepage: http://code.google.com/p/pygtalkrobot/ # import time # import RPi.GPIO as GPIO from PyGtalkRobot import GtalkRobot from configs.config import configs from configs.strings import strings # GPIO.setmode(GPIO.BOARD) # or GPIO.setmode(GPIO.BCM) ############################################################################################################################ if __name__ == "__main__": bot = GtalkRobot(configs().settings["server"], configs().settings["port"], debug=configs().debug) bot.setState("available", strings().status) bot.start(configs().settings["BOT_GTALK_USER"], configs().settings["BOT_GTALK_PASS"])