# Path: memacs/sms_superbackup.py
# class SmsSuperBackupMemacs(Memacs):
#     def _parser_add_arguments(self):
#         """
#         overwritten method of class Memacs
# 
#         add additional arguments
#         """
#         Memacs._parser_add_arguments(self)
# 
#         self._parser.add_argument(
#             "-f", "--file", dest="smsxmlfile",
#             action="store", required=True,
#             help="path to sms xml backup file")
# 
#         self._parser.add_argument(
#             "--ignore-incoming", dest="ignore_incoming",
#             action="store_true",
#             help="ignore incoming smses")
# 
#         self._parser.add_argument(
#             "--ignore-outgoing", dest="ignore_outgoing",
#             action="store_true",
#             help="ignore outgoing smses")
# 
#     def _parser_parse_args(self):
#         """
#         overwritten method of class Memacs
# 
#         all additional arguments are parsed in here
#         """
#         Memacs._parser_parse_args(self)
#         if not (os.path.exists(self._args.smsxmlfile) or \
#                      os.access(self._args.smsxmlfile, os.R_OK)):
#             self._parser.error("input file not found or not readable")
# 
#     def _main(self):
#         """
#         get's automatically called from Memacs class
#         read the lines from sms 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'),
#                                 SmsSaxHandler(self._writer,
#                                               self._args.ignore_incoming,
#                                               self._args.ignore_outgoing))
#         except SAXParseException:
#             logging.error("No correct XML given")
#             sys.exit(1)


from memacs.sms_superbackup import SmsSuperBackupMemacs
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Time-stamp: <2013-09-12 09:11 igb>


PROG_VERSION_NUMBER = "0.1"
PROG_VERSION_DATE = "2012-03-07"
PROG_SHORT_DESCRIPTION = "Memacs for sms"
PROG_TAG = "sms"
PROG_DESCRIPTION = """
This Memacs module will parse output of sms xml backup files

> A sample xml file you find in the documentation file memacs_sms.org.

Then an Org-mode file is generated.
"""
COPYRIGHT_YEAR = "2011-2013"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>
Ian Barton <ian@manor-farm.org>"""


def main():
    global memacs

# Path: memacs/sms_superbackup.py
# class SmsSuperBackupMemacs(Memacs):
#     def _parser_add_arguments(self):
#         """
#         overwritten method of class Memacs
# 
#         add additional arguments
#         """
#         Memacs._parser_add_arguments(self)
# 
#         self._parser.add_argument(
#             "-f", "--file", dest="smsxmlfile",
#             action="store", required=True,
#             help="path to sms xml backup file")
# 
#         self._parser.add_argument(
#             "--ignore-incoming", dest="ignore_incoming",
#             action="store_true",
#             help="ignore incoming smses")
# 
#         self._parser.add_argument(
#             "--ignore-outgoing", dest="ignore_outgoing",
#             action="store_true",
#             help="ignore outgoing smses")
# 
#     def _parser_parse_args(self):
#         """
#         overwritten method of class Memacs
# 
#         all additional arguments are parsed in here
#         """
#         Memacs._parser_parse_args(self)
#         if not (os.path.exists(self._args.smsxmlfile) or \
#                      os.access(self._args.smsxmlfile, os.R_OK)):
#             self._parser.error("input file not found or not readable")
# 
#     def _main(self):
#         """
#         get's automatically called from Memacs class
#         read the lines from sms 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'),
#                                 SmsSaxHandler(self._writer,
#                                               self._args.ignore_incoming,
#                                               self._args.ignore_outgoing))
#         except SAXParseException:
#             logging.error("No correct XML given")
#             sys.exit(1)


# Path: bin/memacs_sms_superbackup.py
from memacs.sms_superbackup import SmsSuperBackupMemacs

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Time-stamp: <2013-09-12 09:11 igb>


PROG_VERSION_NUMBER = "0.1"
PROG_VERSION_DATE = "2012-03-07"
PROG_SHORT_DESCRIPTION = "Memacs for sms"
PROG_TAG = "sms"
PROG_DESCRIPTION = """
This Memacs module will parse output of sms xml backup files

> A sample xml file you find in the documentation file memacs_sms.org.

Then an Org-mode file is generated.
"""
COPYRIGHT_YEAR = "2011-2013"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>
Ian Barton <ian@manor-farm.org>"""


def main():
    global memacs

    memacs = SmsSuperBackupMemacs(