<s> from __future__ import unicode_literals <EOL> from doc . syncer . generic_syncer import GenericSyncer , SingleURLSyncer <EOL> from docutil . url_util import get_sanitized_url <EOL> import os <EOL> class JavadocSyncer ( SingleURLSyncer ) : <EOL> def _should_avoid ( self , link ) : <EOL> should_avoid = super ( JavadocSyncer , self ) . _should_avoid ( link ) <EOL> return should_avoid or link . endswith ( '<STR_LIT>' ) or link . endswith ( '<STR_LIT>' ) or link . endswith ( '<STR_LIT>' ) or link . endswith ( '<STR_LIT>' ) or link . find ( '<STR_LIT>' ) > - <NUM_LIT:1> or link . endswith ( '<STR_LIT>' ) or link . endswith ( '<STR_LIT>' ) or link . find ( '<STR_LIT>' ) > - <NUM_LIT:1> or link . endswith ( '<STR_LIT>' ) or link . find ( '<STR_LIT:?>' ) > - <NUM_LIT:1> <EOL> class JavaJavadocSyncer ( JavadocSyncer ) : <EOL> def _should_avoid ( self , link ) : <EOL> should_avoid = super ( JavaJavadocSyncer , self ) . _should_avoid ( link ) <EOL> return should_avoid or ( link . find ( '<STR_LIT>' ) > - <NUM_LIT:1> and <EOL> link . find ( '<STR_LIT>' ) < <NUM_LIT:0> ) <EOL> class HtmlUnitSyncer ( GenericSyncer ) : <EOL> def __init__ ( self , input_url , output_url ) : <EOL> input_url = get_sanitized_url ( input_url ) <EOL> output_url = get_sanitized_url ( output_url ) <EOL> scope = [ ] <EOL> base = os . path . split ( input_url ) [ <NUM_LIT:0> ] <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> super ( HtmlUnitSyncer , self ) . __init__ ( <EOL> input_urls = input_url , <EOL> output_url = output_url , <EOL> scope = scope ) <EOL> class CommonsMathSyncer ( GenericSyncer ) : <EOL> def __init__ ( self , input_url , output_url ) : <EOL> input_url = get_sanitized_url ( input_url ) <EOL> output_url = get_sanitized_url ( output_url ) <EOL> scope = [ ] <EOL> base = os . path . split ( input_url ) [ <NUM_LIT:0> ] <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> scope . append ( base + '<STR_LIT>' ) <EOL> super ( HtmlUnitSyncer , self ) . __init__ ( <EOL> input_urls = input_url , <EOL> output_url = output_url , <EOL> scope = scope ) <EOL> class XStreamSyncer ( GenericSyncer ) : <EOL> def __init__ ( self , input_url , output_url ) : <EOL> input_url = get_sanitized_url ( input_url ) <EOL> output_url = get_sanitized_url ( output_url ) <EOL> if input_url . endswith ( '<STR_LIT:/>' ) : <EOL> scope_url = input_url <EOL> else : <EOL> ( scope_url , _ ) = os . path . split ( input_url ) <EOL> scope_url += '<STR_LIT:/>' <EOL> scope = [ scope_url ] <EOL> input_urls = [ input_url ] <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> input_urls . append ( scope_url + '<STR_LIT>' ) <EOL> GenericSyncer . logger . debug ( '<STR_LIT>' . format ( scope_url ) ) <EOL> super ( XStreamSyncer , self ) . __init__ ( <EOL> input_urls = input_urls , <EOL> output_url = output_url , <EOL> scope = scope ) <EOL> def _should_avoid ( self , link ) : <EOL> should_avoid = super ( XStreamSyncer , self ) . _should_avoid ( link ) <EOL> if not should_avoid : <EOL> should_avoid = link . find ( '<STR_LIT>' ) > - <NUM_LIT:1> <EOL> return should_avoid </s>
