Module Expr Str Import alias Import alias Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Assign NameStore Num Assign NameStore Num ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareIs Call NameLoad NameLoad NameLoad CompareEq Call NameLoad NameLoad Num body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareLt NameLoad NameLoad body Return NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Return NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareLt AttributeLoad NameLoad attr Num body AugAssignAdd AttributeStore NameLoad attr Num orelse If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore Num Assign NameStore Num If CompareGt Call NameLoad NameLoad Num body If CompareEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Num Assign NameStore Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareIn NameLoad NameLoad body Assign NameStore NameLoad orelse If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Str body Assign NameStore Str orelse Assign NameStore Num AugAssignAdd NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad If BoolOpAnd CompareGt Call NameLoad NameLoad Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Return NameLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Num Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Num NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Num If CompareLt Call NameLoad NameLoad Num body Return Num If Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad body AugAssignAdd NameStore Num If CompareNotEq SubscriptLoad NameLoad Index NameLoad Str body If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice NameLoad If CompareGt NameLoad Str body Return Num orelse Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq NameLoad Str body Return Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad If CompareEq NameLoad Num body Return Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad Return BinOpAdd NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Slice NameLoad If CompareGtE AttributeLoad NameLoad attr Num body Return Num AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call NameLoad NameLoad If CompareLt NameLoad Num body Return Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If BoolOpOr UnaryOpNot Call AttributeLoad NameLoad attr NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num If CompareGt NameLoad Str body Return Num Assign AttributeStore NameLoad attr Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Slice Num AugAssignSub NameStore Num AugAssignAdd NameStore Num If CompareGt NameLoad Num body If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If BoolOpOr UnaryOpNot Call AttributeLoad NameLoad attr NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num If CompareGt NameLoad Str body Return Num If BoolOpAnd CompareGt NameLoad Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Return Num Assign AttributeStore NameLoad attr Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num Num Assign NameStore SubscriptLoad NameLoad Slice Num AugAssignSub NameStore Num AugAssignAdd NameStore Num If BoolOpAnd CompareGt NameLoad Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Return Num orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Call NameLoad NameLoad If CompareLt NameLoad Num body Return Num orelse If CompareEq SubscriptLoad NameLoad Index NameLoad Str body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr If BoolOpAnd CompareNotEq NameLoad Str CompareNotEq NameLoad Str body Return Num AugAssignAdd NameStore Num If CompareEq NameLoad NameLoad body Return Num If CompareEq SubscriptLoad NameLoad Index NameLoad Str body AugAssignAdd NameStore Num If CompareEq NameLoad NameLoad body Return Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr If CompareNotEq NameLoad Str body Return Num AugAssignAdd NameStore Num If BoolOpOr CompareEq NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad orelse Return Num decorator_list decorator_list If CompareEq NameLoad Str body Import alias Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Print NameLoad Str Call AttributeLoad Str attr NameLoad Str NameLoad Print Str
N/A N/A 
recognize English time references in text and normalize to 00:00:00zzz form
 N/A ellyChar N/A simpleTransform N/A Zn N/A est edt cst cdt mst mdt pst pdt gmt utc N/A Lm 5 N/A Ln 11 TimeTransform N/A N/A simpleTransform SimpleTransform N/A N/A 
    to extract time as entity

    attributes:
        _hr   - hour   - int
        _m    - minute - chars
        _s    - second - chars
        _xm   - 'a' or 'p' for 'ante' or 'post' meridian
        _tz   - default time zone - chars

        _rwl  - rewritten length
     __init__ N/A N/A self N/A N/A N/A 
        initialization

        arguments:
            self
         N/A N/A N/A N/A super TimeTransform self __init__ N/A N/A self _tz N/A setZone N/A N/A self zone N/A N/A N/A 
        change default time zone

        arguments:
            self  -
            zone  - 3-char time zone
         N/A N/A N/A N/A type zone str N/A N/A len zone 3 N/A N/A N/A self _tz zone N/A rewrite N/A N/A self ts N/A N/A N/A 
        check for date at current text position and rewrite if found

        arguments:
            self  -
            ts    - text stream as list of chars

        returns:
            True on any rewriting, False otherwise
         N/A lts N/A len ts N/A N/A lts Lm N/A N/A False N/A tz N/A self _tz N/A N/A self _xm N/A N/A self _m 00 N/A N/A self _s 00 N/A c N/A ts N/A 0 N/A N/A N/A N/A ellyChar isDigit c N/A N/A False N/A k N/A N/A self _matchN ts N/A N/A k 0 N/A N/A False N/A k N/A N/A self _findAMorPM N/A ts N/A k N/A N/A N/A N/A self _xm p N/A N/A self _hr 12 N/A N/A N/A self _hr 12 N/A N/A N/A N/A N/A self _xm a N/A N/A self _hr 12 N/A N/A N/A self _hr 0 N/A t N/A ts N/A k N/A dk 0 N/A ns 0 N/A N/A N/A len t 0 N/A N/A N/A N/A t N/A 0 N/A N/A dk 1 N/A ns 1 N/A dk N/A N/A self get N/A t N/A dk N/A ss N/A self string N/A N/A ss Zn N/A N/A tz ss N/A N/A N/A N/A ns 0 N/A ss z N/A N/A tz gmt N/A N/A dk 0 N/A k dk N/A t N/A t N/A dk N/A N/A N/A N/A len t 0 N/A N/A ellyChar isLetterOrDigit N/A t N/A 0 N/A N/A False N/A _ N/A range k N/A N/A N/A N/A ts pop 0 N/A r N/A N/A N/A N/A N/A N/A N/A N/A str N/A self _hr zfill 2 : N/A self _m : N/A self _s tz N/A rr N/A r N/A -1 N/A c rr N/A N/A N/A N/A ts insert 0 c N/A N/A self _rwl N/A len r N/A True N/A length N/A N/A self N/A N/A N/A 
        get length of rewritten date

        arguments:
            self

        returns:
            char count
         N/A N/A self _rwl N/A _matchN N/A N/A self ts N/A N/A N/A 
        apply logic for numeric only time recognition

        arguments:
            self  -
            ts    - text stream as list of chars

        returns:
            total number of chars matched
         N/A N/A self _m 00 N/A N/A self _s 00 N/A k 1 N/A N/A N/A len ts 3 N/A N/A 0 N/A N/A N/A ellyChar isDigit N/A ts N/A k N/A N/A k 1 N/A N/A N/A ts N/A k : N/A N/A N/A k 2 N/A N/A h N/A N/A join N/A ts N/A k N/A N/A h 12 N/A N/A 0 N/A N/A h N/A ts N/A 0 N/A N/A h 0 N/A N/A 0 N/A m N/A N/A self _findAMorPM N/A ts N/A k N/A N/A m 0 N/A N/A 0 N/A N/A self _hr N/A int h N/A N/A k m N/A N/A self _hr N/A int N/A N/A join N/A ts N/A k N/A N/A N/A self _hr 24 N/A N/A 0 N/A k 1 N/A t N/A ts N/A k N/A lt N/A len t N/A N/A lt 2 N/A N/A 0 N/A c N/A t N/A 0 N/A d N/A t N/A 1 N/A N/A N/A N/A N/A ellyChar isDigit c N/A N/A N/A ellyChar isDigit d N/A N/A 0 N/A N/A c 5 N/A N/A 0 N/A N/A self _m N/A N/A join N/A t N/A 2 N/A t N/A t N/A 2 N/A lt 2 N/A k 2 N/A N/A lt 2 N/A N/A N/A N/A t N/A 0 : N/A N/A c N/A t N/A 1 N/A d N/A t N/A 2 N/A N/A N/A N/A N/A ellyChar isDigit c N/A N/A N/A ellyChar isDigit d N/A N/A 0 N/A N/A c 5 N/A N/A 0 N/A N/A N/A lt 3 N/A N/A ellyChar isDigit N/A t N/A 3 N/A N/A 0 N/A N/A self _s N/A N/A join N/A t N/A 1 3 N/A t N/A t N/A 3 N/A lt 3 N/A k 3 N/A N/A N/A lt 0 N/A N/A ellyChar isDigit N/A t N/A 0 N/A N/A 0 N/A N/A k N/A _findAMorPM N/A N/A self ts N/A N/A N/A 
        look for AM or PM in time expression

        arguments:
            self  -
            ts    - char list

        returns:
            length of string match on success, 0 otherwise
         N/A k 0 N/A lt N/A len ts N/A N/A lt 2 N/A N/A 0 N/A N/A N/A N/A ts N/A k N/A N/A k 1 N/A x N/A N/A N/A ts N/A k lower N/A N/A N/A x a N/A x p N/A N/A 0 N/A k 1 N/A N/A lt k N/A N/A 0 N/A N/A N/A ts N/A k . N/A N/A k 1 N/A N/A lt k N/A N/A 0 N/A y N/A N/A N/A ts N/A k lower N/A N/A y m N/A N/A 0 N/A k 1 N/A N/A N/A lt k N/A N/A N/A ellyChar isLetterOrDigit N/A ts N/A k N/A N/A N/A self _xm x N/A k N/A N/A 0 N/A N/A N/A N/A __name__ __main__ N/A N/A sys N/A tdat N/A 4pm est 4:33 PM 4:33:01 P.M 4:33pm 4:33am PDT 11:17pm 22:22:22z 24:24:24z 12:15 AM 3:45pm xxxx 11:66:00am N/A N/A N/A len N/A sys argv 1 N/A N/A N/A N/A N/A sys argv pop 0 N/A tme N/A sys argv N/A N/A N/A N/A tdat append N/A N/A tme decode utf8 N/A te N/A TimeTransform N/A xt tdat N/A N/A tst N/A list xt N/A stat N/A N/A te rewrite tst N/A xt >> N/A N/A join tst = stat N/A