How to use the memacs.lib.memacs.Memacs._parser_parse_args 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 / csv.py View on Github external
def _parser_parse_args(self):
        """
        overwritten method of class Memacs

        all additional arguments are parsed in here
        """
        Memacs._parser_parse_args(self)

        if self._args.fieldnames:
            self._args.fieldnames = [name.strip() for name in self._args.fieldnames.split(',')]
github novoid / Memacs / memacs / whatsapp.py View on Github external
def _parser_parse_args(self):
        """
        overwritten method of class Memacs

        all additional arguments are parsed in here
        """
        Memacs._parser_parse_args(self)
        if self._args.orgcontactsfile:
            if not (os.path.exists(self._args.orgcontactsfile) or \
                    os.access(self._args.orgcontactsfile, os.R_OK)):
                self._parser.error("Org-contacts file not found or not readable")
            self._numberdict = parse_org_contact_file(self._args.orgcontactsfile)
        else:
            self._numberdict = {}
github novoid / Memacs / memacs / phonecalls_superbackup.py View on Github external
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")
github novoid / Memacs / memacs / gpx.py View on Github external
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.source):
            self._parser.error("source file or folder does not exist")

        if self._args.url and not self._args.url.startswith("http"):
            self._parser.error("invalid url given")
github novoid / Memacs / memacs / photos.py View on Github external
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.photo_folder):
            self._parser.error("photo folder does not exist")
github novoid / Memacs / memacs / lastfm.py View on Github external
def _parser_parse_args(self):
        """
        overwritten method of class Memacs

        all additional arguments are parsed in here
        """
        Memacs._parser_parse_args(self)

        if self._args.output_format:
            self._args.output_format = self._args.output_format
github novoid / Memacs / memacs / chrome.py View on Github external
def _parser_parse_args(self):
        """
        overwritten method of class Memacs

        all additional arguments are parsed in here
        """
        Memacs._parser_parse_args(self)
github novoid / Memacs / memacs / filenametimestamps.py View on Github external
def _parser_parse_args(self):
        Memacs._parser_parse_args(self)

        if self._args.filenametimestamps_folder and self._args.filelist:
            self._parser.error("You gave both \"--filelist\" and \"--folder\" argument. Please use either or.\n")

        if self._args.omit_drawers and self._args.append:
            self._parser.error("You gave both \"--append\" and \"--omit-drawers\" argument. Please use either or.\n")

        if not self._args.filelist and not self._args.filenametimestamps_folder:
            self._parser.error("no filenametimestamps_folder specified")

        if self._args.filelist:
            if not os.path.isfile(self._args.filelist):
                self._parser.error("Check the filelist argument: " +
                                   "[" + str(self._args.filelist) + "] is not an existing file")

        if self._args.filenametimestamps_folder:
github novoid / Memacs / memacs / sms.py View on Github external
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")

        if self._args.orgcontactsfile:
            if not (os.path.exists(self._args.orgcontactsfile) or \
                    os.access(self._args.orgcontactsfile, os.R_OK)):
                self._parser.error("Org-contacts file not found or not readable")
            self._numberdict = parse_org_contact_file(self._args.orgcontactsfile)