本文整理汇总了Python中lib.memacs.Memacs._parser_parse_args方法的典型用法代码示例。如果您正苦于以下问题:Python Memacs._parser_parse_args方法的具体用法?Python Memacs._parser_parse_args怎么用?Python Memacs._parser_parse_args使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.memacs.Memacs
的用法示例。
在下文中一共展示了Memacs._parser_parse_args方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
示例2: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
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")
示例3: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
Memacs._parser_parse_args(self)
if not self._args.filenametimestamps_folder:
self._parser.error("no filenametimestamps_folder specified")
for f in self._args.filenametimestamps_folder:
if not os.path.isdir(f):
self._parser.error("Check the folderlist - " + \
"one or more aren't folders")
示例4: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
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")
示例5: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
if not self._args.list_folders and not self._args.folder_name:
self._parser.error("please specify a folder " + \
"use --list to find a folder")
示例6: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
if not self._args.folder_path:
self._parser.error("please specify the path to Maildir folder")
if not (os.path.exists(self._args.folder_path) or \
os.access(self._args.folder_path, os.R_OK)):
self._parser.error("folder path not found")
示例7: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
Memacs._parser_parse_args(self)
if not self._args.calendar_url and not self._args.calendar_file:
self._parser.error("specify a calendar url or calendar file")
if self._args.calendar_url and self._args.calendar_file:
self._parser.error(
"only set a url or path to a calendar not both.")
if self._args.calendar_file \
and not os.path.exists(self._args.calendar_file):
self._parser.error("calendar path not exists")
示例8: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
if not self._args.store_file:
self._parser.error("please specify the path to "
"store.tgs")
if not (os.path.exists(self._args.store_file) or \
os.access(self._args.store_file, os.R_OK)):
self._parser.error("path not found")
'''if not self._args.store_path:
示例9: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
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.gitrevfile and not (
os.path.exists(self._args.gitrevfile) or os.access(self._args.gitrevfile, os.R_OK)
):
self._parser.error("input file not found or not readable")
if not self._args.encoding:
self._args.encoding = "utf-8"
示例10: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
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 = self.parse_org_contact_file(self._args.orgcontactsfile)
示例11: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
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.url and self._args.file:
self._parser.error("you cannot set both url and file")
if not self._args.url and not self._args.file:
self._parser.error("please specify a file or url")
if self._args.file:
if not os.path.exists(self._args.file):
self._parser.error("file %s not readable", self._args.file)
if not os.access(self._args.file, os.R_OK):
self._parser.error("file %s not readable", self._args.file)
示例12: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
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 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:
for f in self._args.filenametimestamps_folder:
if not os.path.isdir(f):
self._parser.error("Check the folderlist argument: " + \
"[" + str(f) + "] and probably more aren't folders")
示例13: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
if not self._args.mail_file and not self._args.news_file:
self._parser.error("please specify a file")
if self._args.mail_file and self._args.news_file:
self._parser.error("please specify an mbox mail file "
"OR an mbox newsgroup file - not both")
if self._args.mail_file and not (os.path.exists
(self._args.mail_file) or \
os.access(self._args.mail_file, os.R_OK)):
self._parser.error("input file not found or not readable")
if self._args.news_file and not (os.path.exists
(self._args.news_file) or \
os.access(self._args.news_file, os.R_OK)):
self._parser.error("input file not found or not readable")
示例14: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
if not self._args.csvfile:
self._parser.error("please specify input csv file")
if not (os.path.exists(self._args.csvfile) or \
os.access(self._args.csvfile, os.R_OK)):
self._parser.error("input file not found or not readable")
if self._args.delimiter:
self._args.delimiter = self._args.delimiter
else:
self._args.delimiter = ";"
if not self._args.encoding:
self._args.encoding = "utf-8"
if not self._args.timestamp_index:
self._parser.error("need to know timestamp index")
else:
try:
self._args.timestamp_index = int(self._args.timestamp_index)
except ValueError:
self._parser.error("timestamp index not an int")
if not self._args.timestamp_format:
self._parser.error("need to know timestamp format")
if not self._args.output_indices:
self._parser.error("need to know output indices")
else:
try:
self._args.output_indices = map(
int, self._args.output_indices.split())
except ValueError:
self._parser.error("output-indices must have " + \
"following format i.e: \"1 2 3\"")
示例15: _parser_parse_args
# 需要导入模块: from lib.memacs import Memacs [as 别名]
# 或者: from lib.memacs.Memacs import _parser_parse_args [as 别名]
def _parser_parse_args(self):
"""
overwritten method of class Memacs
all additional arguments are parsed in here
"""
Memacs._parser_parse_args(self)
self._query = []
if self._args.sender:
self._args.sendern = self._args.sender.strip()
self._sender = list(self._args.sender.split(" "))
else:
raise ValueError('You have to specify at least one e mail adress')
if self._args.query:
self._query = self._args.query
if self._args.todo:
self._todo = True
else:
self._todo = False