How to use the memacs.lib.reader.CommonReader.get_data_from_file function in memacs

To help you get started, we’ve selected a few memacs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github novoid / Memacs / memacs / phonecalls_superbackup.py View on Github external
def _main(self):
        """
        gets called automatically from Memacs class.
        read the lines from phonecalls backup xml file,
        parse and write them to org file
        """

        data = CommonReader.get_data_from_file(self._args.smsxmlfile)

        try:
            xml.sax.parseString(data.encode('utf-8'),
                                PhonecallsSaxHandler(self._writer,
                                              self._args.ignore_incoming,
                                              self._args.ignore_outgoing,
                                              self._args.ignore_missed,
                                              self._args.ignore_voicemail,
                                              self._args.ignore_rejected,
                                              self._args.ignore_refused,
                                              self._args.minimum_duration or 0,
                                              ))
        except SAXParseException:
            logging.error("No correct XML given")
            sys.exit(1)
github novoid / Memacs / memacs / phonecalls.py View on Github external
def _main(self):
        """
        gets called automatically from Memacs class.
        read the lines from phonecalls backup xml file,
        parse and write them to org file
        """

        data = CommonReader.get_data_from_file(self._args.smsxmlfile)

        try:
            xml.sax.parseString(data.encode('utf-8'),
                                PhonecallsSaxHandler(self._writer,
                                              self._args.ignore_incoming,
                                              self._args.ignore_outgoing,
                                              self._args.ignore_missed,
                                              self._args.ignore_cancelled,
                                              self._args.minimum_duration or 0,
                                              ))
        except SAXParseException:
            logging.error("No correct XML given")
            sys.exit(1)