10 if not os.path.exists(yaml_path):
11 rospy.logerr(
'"{}" not found'.format(yaml_path))
12 rospy.logerr(
"$ get access token from https://apps.twitter.com/")
13 rospy.logerr(
"cat {} <<EOF".format(yaml_path))
14 rospy.logerr(
"CKEY: xxx")
15 rospy.logerr(
"CSECRET: xxx")
16 rospy.logerr(
"AKEY: xxx")
17 rospy.logerr(
"ASECRET: xxx")
19 return None,
None,
None,
None 20 with open(yaml_path,
'r') as f: 21 key = yaml.load(f, Loader=yaml.SafeLoader) 23 csecret = key[
'CSECRET']
25 asecret = key[
'ASECRET']
26 return ckey, csecret, akey, asecret
31 if sys.version_info.major <= 2:
32 text = text.decode(
'utf-8')
34 if unicodedata.east_asian_width(c)
in 'FWA':
45 if sys.version_info.major <= 2:
46 text = text.decode(
'utf-8')
50 texts.append(split_text[:-1])
51 split_text = split_text[-1:]
54 texts.append(split_text)
58 if unicodedata.east_asian_width(c)
in 'FWA':
63 texts.append(split_text)