Module Expr Str Import alias Import alias ImportFrom alias alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias Assign NameStore Call NameLoad Str ListLoad Str Str Str Assign NameStore Call NameLoad Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore BinOpMult Call NameLoad SubscriptLoad NameLoad Index Str BinOpMult Num Num If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str keyword Str orelse Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Call NameLoad NameLoad If CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Call AttributeLoad Str attr NameLoad keyword Num keyword NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Num SubscriptLoad NameLoad Index Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Break Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword NameLoad keyword Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Num If CompareIn Str NameLoad body Return Call NameLoad NameLoad Num Call NameLoad Return Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str decorator_list Call NameLoad keyword Num FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword NameLoad keyword ListLoad Str Str Return ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str comprehension NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str decorator_list Call NameLoad keyword Num FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Return CompareGt Call NameLoad GeneratorExp Num comprehension NameStore NameLoad CompareLtE NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad For NameStore NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareLt AttributeLoad NameLoad attr NameLoad body Continue If BoolOpAnd NameLoad CompareGt AttributeLoad NameLoad attr NameLoad body Continue Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body For NameStore AttributeLoad NameLoad attr body If BoolOpAnd CompareLtE BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr BinOpAdd Str Str Assign NameStore BoolOpOr NameLoad NameLoad If BoolOpAnd CompareIsNot AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareGt AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad body Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Num Call NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr BinOpMult BinOpMult BinOpMult Num Num Num Num If BoolOpAnd NameLoad CompareIn AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str orelse If BoolOpAnd NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str orelse If BoolOpAnd NameLoad CompareGtE AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr Str If CompareEq Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Yield TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Expr Yield TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad NameLoad NameLoad If NameLoad body If BoolOpAnd NameLoad CompareIn Str NameLoad body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse If BoolOpAnd NameLoad CompareIn Str NameLoad body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse If BoolOpAnd NameLoad CompareIn Str NameLoad body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse If BoolOpAnd NameLoad CompareIn Str NameLoad body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list If CompareEq NameLoad Str body TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str
N/A N/A 
Gathers the reverted status for a set of revisions and
prints a TSV to stdout of the format:

<rev_id>\t<reverted>\t<reason>

Usage:
    extract_damaging -h | --help
    extract_damaging <dump-file>... [--host=<url>]
                                    [--start=<date>]
                                    [--end=<date>]
                                    [--trusted-groups=<groups>]
                                    [--trusted-edits=<num>]
                                    [--revert-radius=<revs>]
                                    [--revert-window=<hrs>]
                                    [--reverted-only]
                                    [--check-blocked]
                                    [--verbose]
                                    [--rev-reverteds=<path>]

Options:
    -h --help                   Prints out this documentation.
    <dump-file>                 Path to dump file.
    --host=<url>                The host URL of the MediaWiki install where an
                                API can be found.
    --start=<timestamp>         Start time.
    --end=<timestamp>           End time.
    --reverted-only             Only mark reverted edits as potentially
                                damaging
    --revert-radius=<revs>      The maximum amount of revisions that a
                                reverting edit can revert [default: 15]
    --revert-window=<hrs>       The maximum amount of time to wait for a
                                revision to be reverted [default: 48]
    --trusted-groups=<groups>   User groups that should be considered trusted.
                                Split by ",".
    --trusted-edits=<num>       Minimum number of edits to be considered
                                trusted.
    --check-blocked             Check if users are blocked.
    --verbose                   Prints dots and stuff to stderr
    --rev-reverteds=<path>      The location to write output to.
                                [default: <stdout>]
 N/A logging N/A sys collections deque namedtuple functools lru_cache N/A docopt N/A mwapi N/A mwreverts N/A mwtypes N/A mwxml mwtypes Timestamp N/A mysqltsv N/A Revision N/A namedtuple Revision N/A id status reason N/A User N/A namedtuple User N/A id editcount groups N/A logger N/A N/A logging getLogger __name__ main N/A N/A argv N/A None N/A N/A args N/A N/A docopt docopt __doc__ argv argv N/A N/A N/A logging basicConfig level N/A logging INFO format %(asctime)s %(levelname)s:%(name)s -- %(message)s N/A revert_radius N/A int N/A args N/A --revert-radius N/A revert_window N/A N/A int N/A args N/A --revert-window N/A 60 60 N/A N/A args N/A --host N/A N/A session N/A N/A mwapi Session N/A args N/A --host user_agent ORES revert labeling utility N/A N/A session None N/A dumps N/A args N/A <dump-file> N/A verbose N/A args N/A --verbose N/A start N/A args N/A --start N/A start N/A N/A start N/A Timestamp start N/A end N/A args N/A --end N/A end N/A N/A end N/A Timestamp end N/A reverted_only N/A args N/A --reverted-only N/A trusted_groups N/A args N/A --trusted-groups N/A trusted_groups N/A N/A trusted_groups N/A N/A trusted_groups split , N/A trusted_users N/A load_user_group_members trusted_groups session N/A N/A trusted_users None N/A trusted_edits N/A args N/A --trusted-edits N/A trusted_edits N/A N/A trusted_edits N/A int trusted_edits N/A N/A N/A args N/A --rev-reverteds <stdout> N/A N/A rev_reverteds N/A N/A mysqltsv Writer N/A sys stdout N/A N/A rev_reverteds N/A N/A mysqltsv Writer N/A open N/A args N/A --rev-reverteds w N/A check_blocked N/A args N/A --check-blocked N/A N/A run dumps session start end revert_radius revert_window reverted_only trusted_users trusted_edits rev_reverteds check_blocked verbose verbose N/A load_user_group_members N/A N/A groups session N/A N/A N/A users N/A N/A aufrom None N/A True N/A N/A res N/A N/A session get action query list allusers auprop groups augroup N/A N/A | join groups aulimit 500 aufrom aufrom N/A user_list N/A N/A res N/A query N/A allusers N/A user user_list N/A N/A N/A N/A users append N/A User N/A user N/A userid 0 N/A user N/A groups N/A N/A N/A N/A res get continue N/A N/A N/A aufrom N/A N/A res N/A continue N/A aufrom N/A users N/A load_user_info N/A N/A user_name session N/A N/A N/A N/A N/A logger debug N/A N/A Getting info for {0} format user_name N/A res N/A N/A session get action query list users ususers user_name usprop groups|editcount N/A user_data N/A N/A N/A res N/A query N/A users N/A 0 N/A N/A missing user_data N/A N/A N/A User user_name 0 N/A set N/A N/A User N/A user_data N/A userid N/A user_data N/A editcount N/A set N/A user_data N/A groups N/A N/A lru_cache maxsize 20000 user_blocks N/A N/A user_text session N/A N/A N/A 
    Returns a list of blocks for a single user
     N/A N/A N/A logger debug N/A N/A Getting blocks for {0} format user_text N/A doc N/A N/A session get action query list blocks bkusers user_text bkprop N/A id timestamp N/A N/A N/A N/A mwtypes Timestamp N/A b N/A timestamp N/A b N/A N/A doc N/A query N/A blocks N/A N/A lru_cache maxsize 20000 user_recently_blocked N/A N/A user_text session before N/A N/A N/A blocks N/A user_blocks user_text session N/A N/A N/A sum N/A 1 N/A b blocks N/A b before 0 N/A run N/A N/A paths session start end revert_radius revert_window reverted_only trusted_users trusted_edits rev_reverteds check_blocked verbose N/A False N/A process_dump N/A N/A dump path N/A N/A N/A page dump N/A N/A detector N/A N/A mwreverts Detector radius revert_radius N/A window N/A deque maxlen revert_radius N/A revision page N/A N/A N/A revision maybe_damaging None N/A N/A revision reason None N/A revert N/A N/A detector process N/A revision sha1 revision N/A N/A start N/A N/A revision timestamp start N/A N/A N/A N/A end N/A N/A revision timestamp end N/A N/A N/A N/A N/A window append revision N/A N/A revert None N/A N/A reverted N/A revert reverteds N/A N/A N/A N/A N/A N/A revision timestamp N/A reverted timestamp revert_window N/A N/A reverted user None N/A N/A revision user None N/A N/A N/A reverted user text N/A N/A revision user text N/A N/A reverted maybe_damaging False N/A N/A N/A reverted maybe_damaging True N/A N/A reverted reason Reverted by someone else N/A N/A N/A N/A revert reverted_to maybe_damaging N/A N/A N/A N/A revert reverted_to user text N/A N/A revision user text N/A N/A N/A N/A revert reverted_to maybe_damaging False N/A N/A N/A revert reverted_to reason N/A Reverted back by  someone else N/A load_user_data N/A trusted_edits check_blocked N/A N/A N/A N/A N/A revision user id None N/A N/A N/A revision user id 0 load_user_data N/A N/A info N/A load_user_info N/A N/A revision user text session N/A N/A info N/A User N/A N/A revision user id 0 N/A set N/A two_days_later N/A N/A revision timestamp N/A N/A N/A 60 60 24 2 N/A N/A trusted_users N/A N/A info id trusted_users N/A N/A N/A revision maybe_damaging False N/A N/A revision reason In trusted group N/A N/A N/A check_blocked N/A user_recently_blocked N/A N/A revision user text session two_days_later N/A N/A N/A revision maybe_damaging True N/A N/A revision reason User was blocked from editing N/A N/A N/A trusted_edits N/A N/A info editcount trusted_edits N/A N/A N/A revision maybe_damaging False N/A N/A revision reason Enough edits to be trusted N/A N/A N/A revision reason Unknown N/A N/A N/A len window revert_radius N/A N/A old_revision N/A N/A window popleft N/A N/A N/A N/A old_revision id N/A old_revision maybe_damaging N/A old_revision reason N/A old_revision window N/A N/A N/A N/A N/A old_revision id N/A old_revision maybe_damaging N/A old_revision reason N/A N/A N/A rev_id maybe_damaging reason N/A N/A mwxml map process_dump paths N/A N/A N/A N/A rev_reverteds write N/A rev_id N/A bool maybe_damaging reason N/A maybe_damaging N/A N/A N/A reason N/A Reverted reason N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write r N/A N/A N/A N/A sys stderr flush N/A N/A N/A reason N/A blocked reason N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write b N/A N/A N/A N/A sys stderr flush N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write . N/A N/A N/A N/A sys stderr flush N/A N/A N/A reason N/A edits reason N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write e N/A N/A N/A N/A sys stderr flush N/A N/A N/A reason N/A Unknown reason N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write . N/A N/A N/A N/A sys stderr flush N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write g N/A N/A N/A N/A sys stderr flush N/A verbose N/A N/A N/A N/A N/A sys stderr write N/A N/A N/A __name__ __main__ N/A N/A N/A N/A N/A main N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A N/A sys stderr write 
^C Caught.  Exiting...