def main(argv=None):
global VERBOSE
argv = sys.argv[1:] if argv is None else argv
args = parser.parse_args(argv)
VERBOSE = args.verbose
archives = list(args_get_archives(args))
if not archives:
print "ERROR: no archives specified. Specify an archive or a config file."
return 1
for a in archives:
print "Processing:", a["name"]
slack = Slacker(a["token"])
with SlackArchive(slack, a) as archive:
needs_upgrade = archive.needs_upgrade()
if needs_upgrade:
print "Notice: wayslack needs to fiddle around with some symlinks."
print "This will cause some non-destructive changes to the directory."
res = raw_input("Continue? Y/n: ")
if res and res.lower()[:1] != "y":
break
archive.upgrade()
if needs_upgrade or args.download_everything:
archive.download_all_files()
archive.refresh()
archive.delete_old_files(args.confirm_delete)
评论列表
文章目录