def guess_mode(args, config):
 compose = True
 export = False
 if ((args.decrypt is not False) or (args.encrypt is not False) or (args.export is not False) or any((args.short, args.tags, args.edit))):
  compose = False
  export = True
 elif any((args.start_date, args.end_date, args.on_date, args.limit, args.strict, args.starred)):
  compose = False
 elif (args.text and all(((word[0] in config[u'tagsymbols']) for word in u' '.join(args.text).split()))):
  compose = False
 return (compose, export)

def guess_mode ( args , config ) : compose = True export = False if ( ( args . decrypt is not False ) or ( args . encrypt is not False ) or ( args . export is not False ) or any ( ( args . short , args . tags , args . edit ) ) ) : compose = False export = True elif any ( ( args . start_date , args . end_date , args . on_date , args . limit , args . strict , args . starred ) ) : compose = False elif ( args . text and all ( ( ( word [ 0 ] in config [ u'tagsymbols' ] ) for word in u' ' . join ( args . text ) . split ( ) ) ) ) : compose = False return ( compose , export )
guesses the mode from the given arguments .