GeometrizeTwitterBot  1.0
Python Twitter bot for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables
Namespaces | Functions | Variables File Reference


 This module contains code that reads tweet text and figures out how the bot should do in response.


def tweet_parser._represents_int
 Returns true if the given string represents an integer value. More...
def tweet_parser._clamp
 Clamps the given number within the range smallest, largest. More...
def tweet_parser._add_shape_type_for_keywords
 Adds the given items to the given dictionary, mapping each keyword to the given shape name. More...
def tweet_parser._make_shape_keyword_dictionary
 Creates a dictionary mapping shape keywords to canonical shape names used by ChaiScript scripts Provides a convenient way to map words in tweets like "rects" to the shape type "RECTANGLE". More...
def tweet_parser._max_quantity_for_shape_type
 Gets the maximum number of shapes allowed for the given shape type This to to set a sensible limit on the length of time the bot will spend on a single image. More...
def tweet_parser._plural_name_for_shape_type
 Gets a human-readable name for the given shape type. More...
def tweet_parser._make_loop_body
 Helper for constructing a ChaiScript script for geometrizing shapes. More...
def tweet_parser._make_for_loop
 Helper for constructing a ChaiScript script for geometrizing shapes. More...
def tweet_parser._make_shape_code
 Helper for constructing a ChaiScript script for geometrizing shapes. More...
def tweet_parser.make_shape_quantity_dictionary
 Parses a tweet message and returns a dictionary of the shape types and quantities that were requested. More...
def tweet_parser.make_code_for_shape_tweet
 Parses the given tweet, returning the ChaiScript code for Geometrize to run based on the contents of the tweet. More...
def tweet_parser.make_message_for_shape_dictionary
 Creates a message for the given shape dictionary, suitable for tweeting along with the result of running the script. More...


list tweet_parser._rect_keywords = [ "rect", "rects", "rectangle", "rectangles" ]
list tweet_parser._rotated_rect_keywords = [ "rotated_rect", "rotated_rects", "rotated_rectangle", "rotated_rectangles" ]
list tweet_parser._triangle_keywords = [ "tri", "tris", "triangle", "triangles" ]
list tweet_parser._ellipse_keywords = [ "ellipse", "ellipses" ]
list tweet_parser._rotated_ellipse_keywords = [ "rotated_ellipse", "rotated_ellipses" ]
list tweet_parser._circle_keywords = [ "circ", "circs", "circle", "circles" ]
list tweet_parser._line_keywords = [ "line", "lines" ]
list tweet_parser._quadratic_bezier_keywords = [ "bezier", "beziers", "quadratic_bezier", "quadratic_beziers" ]
list tweet_parser._polyline_keywords = [ "polyline", "polylines" ]