Esempio n. 1
0
                if module in config:
                    eval("modules.append(" + module + "." + module +
                         "(config))")

        # *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*

        text = ""
        has_text = False

        # Modules uitvoeren
        for module in modules:
            if (module.HasText()):
                text += module.GetText() + "<br/><br/>"
                has_text = True

        # Onnodige enters aan het eind verwijderen
        text = text.replace("<br />", "<br/>")
        while text[-5:] == "<br/>":
            text = text[:-5]

        if not prod:
            print(f.html2plain(text))

        if "Email" in config and has_text:
            email = Email(config)
            email.Send(text)

        if "Pushbullet" in config and has_text:
            pb = PushBullet(config)
            pb.Send(text)
Esempio n. 2
0
 def Send(self, text):
     pb = Pushbullet(self.config["Pushbullet"]["apikey"])
     pb.push_note(f.Goede(self.config), f.html2plain(text))