Permalink
Browse files

changed 'message' to 'comment'

  • Loading branch information...
1 parent 187f2bd commit b05cb9bd4e1abc1953d8c1187572b684a741604e @Vhati committed Oct 10, 2012
View
@@ -40,12 +40,12 @@
dest_path = "./MockTM - Moontrap.srt"
-# Optional substring to expect of the first tweeted message.
-# Use this to skip early msgs, or set to None.
+# Optional substring for parsers to expect of the first tweeted comment.
+# Use this to skip early comments, or set to None.
first_msg = None
-# Delay all msgs (+/-).
+# Use this to delay all comments (+/-).
fudge_time = timedelta(minutes=0, seconds=0)
# Users egregiously out of sync can be additionally offset (+/-).
@@ -62,8 +62,8 @@
ignore_users = []
-# Optional in-movie time to truncate msgs (after fudging).
-# Use this to skip late msgs, or set to None.
+# Optional in-movie time to truncate comments (after fudging).
+# Use this to skip late comments, or set to None.
# end_time = timedelta(hours=2, minutes=0, seconds=0)
#
end_time = None
@@ -77,7 +77,7 @@
# At low resolutions, colored text can be ugly in VLC.
color_enabled = "random"
-# Duration each msg appears on-screen.
+# Duration each comment appears on-screen.
show_time = timedelta(seconds=6)
# Parser-specific options.
View
@@ -40,22 +40,22 @@ def get_arginfo(self):
description="Destination file to write."))
args.append(arginfo.Arg(name="first_msg", type=arginfo.STRING,
required=False, default=None, choices=None, multiple=False,
- description="Optional substring to expect of the first tweeted message.\nUse this to skip early msgs, or set to None."))
+ description="Optional substring for parsers to expect of the first comment.\nUse this to skip early comments."))
args.append(arginfo.Arg(name="fudge_time", type=arginfo.TIMEDELTA,
required=True, default=timedelta(minutes=0, seconds=0), choices=None, multiple=False,
- description="Delay all msgs (+/-)."))
+ description="Delay all comments (+/-)."))
args.append(arginfo.Arg(name="ignore_users", type=arginfo.STRING,
required=False, default=None, choices=None, multiple=True,
description="Users to ignore."))
args.append(arginfo.Arg(name="end_time", type=arginfo.TIMEDELTA,
required=False, default=None, choices=None, multiple=False,
- description="Optional in-movie time to truncate msgs (after fudging).\nUse this to skip late msgs."))
+ description="Optional in-movie time to truncate comments (after fudging).\nUse this to skip late comments."))
args.append(arginfo.Arg(name="color_enabled", type=arginfo.STRING,
required=True, default="random", choices=["no","random","default"], multiple=False,
description="Colored subtitles\n no: there will be no color info.\n random: assign colors to users randomly.\n default: let the parser decide.\nAt low resolutions, colored text can be ugly in VLC."))
args.append(arginfo.Arg(name="show_time", type=arginfo.TIMEDELTA,
required=True, default=timedelta(minutes=0, seconds=6), choices=None, multiple=False,
- description="Duration each msg appears on-screen."))
+ description="Duration each comment appears on-screen."))
return args
def apply_current_values_to_args(self, args, parser_namespace=None, exporter_namespace=None):
@@ -22,7 +22,7 @@
def get_description():
- return "Writes snarks as html with links to each user and message."
+ return "Writes snarks as html with links to each user and comment."
def get_arginfo():
args = []
@@ -31,11 +31,11 @@ def get_arginfo():
description="Boolean to only generate an excerpt to paste elsewhere.\nDefault is True."))
args.append(arginfo.Arg(name="faux_twitter_links", type=arginfo.BOOLEAN,
required=False, default=False, choices=[True,False], multiple=False,
- description="Boolean to guess twitter user links, if the parser didn't provide them.\nLinks to messages still can't be guessed and will be \"#\"\nDefault is False."))
+ description="Boolean to guess twitter user links, if the parser didn't provide them.\nLinks to comments still can't be guessed and will be \"#\"\nDefault is False."))
return args
def write_snarks(dest_file, snarks, show_time, options={}, keep_alive_func=None, sleep_func=None):
- """Writes snarks as html with links to each user and message.
+ """Writes snarks as html with links to each user and comment.
Links will be inert unless snarks have the non-standard
"user_url" and "msg_url" attributes, or the faux_twitter_links
@@ -51,7 +51,7 @@ def write_snarks(dest_file, snarks, show_time, options={}, keep_alive_func=None,
faux_twitter_links (optional):
Boolean to guess twitter user links, if snarks
lack the "user_url" attribute. But links to
- messages will still be "#". Default is False.
+ comments will still be "#". Default is False.
:param keep_alive_func: Optional replacement to get an abort boolean.
:param sleep_func: Optional replacement to sleep N seconds.
"""
View
@@ -3,7 +3,7 @@
# Global constants.
-VERSION = "3.51"
+VERSION = "3.52"
_settings_dir = "."
_cleanup_handler = cleanup.CustomCleanupHandler()
@@ -29,7 +29,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
"""Collects snarks from somewhere.
:param src_path: A url, or file.
- :param first_msg: If not None, ignore messages until this substring is found.
+ :param first_msg: If not None, ignore comments until this substring is found.
:param options: A dict of extra options specific to this parser.
Not used.
:param keep_alive_func: Optional replacement to get an abort boolean.
@@ -33,7 +33,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
clobbered later, however.
:param src_path: A local file (because other urls aren't read as binary).
- :param first_msg: If not None, ignore messages until this substring is found.
+ :param first_msg: If not None, ignore comments until this substring is found.
:param options: A dict of extra options specific to this parser.
Not used.
:param keep_alive_func: Optional replacement to get an abort boolean.
@@ -25,7 +25,7 @@ def get_arginfo():
args = []
args.append(arginfo.Arg(name="reply_name", type=arginfo.STRING,
required=False, default=None, choices=None, multiple=False,
- description="The name to which replies were directed (no \"@\").\nRegexes will remove it from messages."))
+ description="The name to which replies were directed (no \"@\").\nRegexes will remove it from comments."))
return args
def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_func=None):
@@ -36,11 +36,11 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
clobbered later.
:param src_path: A url, or file.
- :param first_msg: If not None, ignore messages until this substring is found.
+ :param first_msg: If not None, ignore comments until this substring is found.
:param options: A dict of extra options specific to this parser.
reply_name (optional):
The name to which replies were directed (no "@").
- Regexes will remove it from messages.
+ Regexes will remove it from comments.
:param keep_alive_func: Optional replacement to get an abort boolean.
:param sleep_func: Optional replacement to sleep N seconds.
:return: A List of snark dicts.
@@ -53,7 +53,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
snark_ptn = re.compile("[^t]*\t([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})\t([0-9A-Fa-f]{6}?)\t([^\t]+)\t([^\t]+)")
- # List of pattern/replacement tuples to strip reply topic from messages.
+ # List of pattern/replacement tuples to strip reply topic from comments.
reply_regexes = []
if (ns+"reply_name" in options and options[ns+"reply_name"]):
reply_name_escaped = re.escape(options[ns+"reply_name"])
@@ -25,7 +25,7 @@ def get_arginfo():
args = []
args.append(arginfo.Arg(name="reply_name", type=arginfo.STRING,
required=False, default=None, choices=None, multiple=False,
- description="The name to which replies were directed (no \"@\").\nRegexes will remove it from messages."))
+ description="The name to which replies were directed (no \"@\").\nRegexes will remove it from comments."))
return args
def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_func=None):
@@ -39,11 +39,11 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
disregard this info.
:param src_path: A url, or saved html source.
- :param first_msg: If not None, ignore messages until this substring is found.
+ :param first_msg: If not None, ignore comments until this substring is found.
:param options: A dict of extra options specific to this parser.
reply_name (optional):
The name to which replies were directed.
- Regexes will remove it from messages.
+ Regexes will remove it from comments.
:param keep_alive_func: Optional replacement to get an abort boolean.
:param sleep_func: Optional replacement to sleep N seconds.
:return: A List of snark dicts.
@@ -57,7 +57,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
# Regex to parse tweet info out of html.
snark_ptn = re.compile("(?:<p>)?<a href='([^']*)'>([^<]*)</a>: (.*?) +<br ?/><font size=-3><a href='([^']*)'[^>]*>([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})</a></font>(?:<br ?/>|</p>)?", re.IGNORECASE)
- # List of pattern/replacement tuples to strip reply topic from messages.
+ # List of pattern/replacement tuples to strip reply topic from comments.
reply_regexes = []
if (ns+"reply_name" in options and options[ns+"reply_name"]):
reply_name_escaped = re.escape(options[ns+"reply_name"])
@@ -30,7 +30,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
See: https://github.com/Vhati/TweetSubs
:param src_path: A url, or file.
- :param first_msg: If not None, ignore messages until this substring is found.
+ :param first_msg: If not None, ignore comments until this substring is found.
:param options: A dict of extra options specific to this parser.
Not used.
:param keep_alive_func: Optional replacement to get an abort boolean.
@@ -46,7 +46,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
disregard this info.
:param src_path: Not used.
- :param first_msg: If not None, ignore messages until this substring is found.
+ :param first_msg: If not None, ignore comments until this substring is found.
:param options: A dict of extra options specific to this parser.
since_date (optional):
UTC Datetime to limit dredging up old tweets.
@@ -76,7 +76,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
try:
my_screen_name = tweepy_api.auth.get_username()
- # List of pattern/replacement tuples to strip reply topic from messages.
+ # List of pattern/replacement tuples to strip reply topic from comments.
reply_name_escaped = re.escape(my_screen_name)
reply_regexes = [(re.compile(" +@"+ reply_name_escaped +" +", re.IGNORECASE), " "),
(re.compile(" *@"+ reply_name_escaped +" *", re.IGNORECASE), "")]
@@ -138,7 +138,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
if (first_msg):
if (snark["msg"].find(first_msg) != -1):
- done = True # Found the first message.
+ done = True # Found the first comment.
break
if (last_status_id is not None):
@@ -59,7 +59,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
Twitter's search API only reaches back a few days. :/
:param src_path: Not used.
- :param first_msg: If not None, ignore messages prior to one containing this substring.
+ :param first_msg: If not None, ignore comments prior to one containing this substring.
:param options: A dict of extra options specific to this parser.
reply_name:
The name to which replies were directed (no "@").
@@ -96,7 +96,7 @@ def fetch_snarks(src_path, first_msg, options={}, keep_alive_func=None, sleep_fu
logging.error("Required parser options weren't provided: %s." % ", ".join(missing_options))
raise common.ParserError("Parser failed.")
- # List of pattern/replacement tuples to strip reply topic from messages.
+ # List of pattern/replacement tuples to strip reply topic from comments.
reply_name_escaped = re.escape(options[ns+"reply_name"])
reply_regexes = [(re.compile(" +@"+ reply_name_escaped +" +", re.IGNORECASE), " "),
(re.compile(" *@"+ reply_name_escaped +" *", re.IGNORECASE), "")]
View
@@ -1,4 +1,4 @@
-CompileSubs v3.51
+CompileSubs v3.52
Author:
David Millis (tvtronix@yahoo.com)
@@ -51,6 +51,7 @@ in the ./share/ directory.
Changes
+3.52 - Changed 'message'/'msg' to 'comment' in descriptions.
3.51 - Added twitter_mentions parser.
Added threading for parsers and exporters.
Widened in-gui config text fields.
View
@@ -39,12 +39,12 @@ src_path = ${src_path}
dest_path = ${dest_path}
-# Optional substring to expect of the first tweeted message.
-# Use this to skip early msgs, or set to None.
+# Optional substring for parsers to expect of the first tweeted comment.
+# Use this to skip early comments, or set to None.
first_msg = ${first_msg}
-# Use this to delay all msgs (+/-).
+# Use this to delay all comments (+/-).
fudge_time = ${fudge_time}
# Users egregiously out of sync can be additionally offset (+/-).
@@ -60,8 +60,8 @@ ${fudge_users_block}
ignore_users = ${ignore_users}
-# Optional in-movie time to truncate msgs (after fudging).
-# Use this to skip late msgs, or set to None.
+# Optional in-movie time to truncate comments (after fudging).
+# Use this to skip late comments, or set to None.
# end_time = timedelta(hours=2, minutes=0, seconds=0)
#
end_time = ${end_time}
@@ -75,7 +75,7 @@ end_time = ${end_time}
# At low resolutions, colored text can be ugly in VLC.
color_enabled = ${color_enabled}
-# Duration each msg appears on-screen.
+# Duration each comment appears on-screen.
show_time = ${show_time}
# Parser-specific options.
View
@@ -40,12 +40,12 @@
dest_path = "./MockTM - Moontrap.srt"
-# Optional substring to expect of the first tweeted message.
-# Use this to skip early msgs, or set to None.
+# Optional substring for parsers to expect of the first tweeted comment.
+# Use this to skip early comments, or set to None.
first_msg = None
-# Use this to delay all msgs (+/-).
+# Use this to delay all comments (+/-).
fudge_time = timedelta(minutes=0, seconds=0)
# Users egregiously out of sync can be additionally offset (+/-).
@@ -62,8 +62,8 @@
ignore_users = []
-# Optional in-movie time to truncate msgs (after fudging).
-# Use this to skip late msgs, or set to None.
+# Optional in-movie time to truncate comments (after fudging).
+# Use this to skip late comments, or set to None.
# end_time = timedelta(hours=2, minutes=0, seconds=0)
#
end_time = None
@@ -77,7 +77,7 @@
# At low resolutions, colored text can be ugly in VLC.
color_enabled = "random"
-# Duration each msg appears on-screen.
+# Duration each comment appears on-screen.
show_time = timedelta(seconds=6)
# Parser-specific options.

0 comments on commit b05cb9b

Please sign in to comment.