<s> from __future__ import unicode_literals <EOL> from optparse import make_option <EOL> from django . core . management . base import NoArgsCommand <EOL> from docutil . commands_util import recocommand <EOL> from docutil . str_util import smart_decode <EOL> from channel . actions import toc_download_entries <EOL> class Command ( NoArgsCommand ) : <EOL> option_list = NoArgsCommand . option_list + ( <EOL> make_option ( '<STR_LIT>' , action = '<STR_LIT:store>' , dest = '<STR_LIT>' , <EOL> default = '<STR_LIT>' , help = '<STR_LIT>' ) , <EOL> make_option ( '<STR_LIT>' , action = '<STR_LIT:store>' , dest = '<STR_LIT>' , <EOL> default = '<STR_LIT>' , help = '<STR_LIT>' ) , <EOL> make_option ( '<STR_LIT>' , action = '<STR_LIT:store>' , type = "<STR_LIT:int>" , dest = '<STR_LIT:start>' , <EOL> default = - <NUM_LIT:1> , help = '<STR_LIT>' ) , <EOL> make_option ( '<STR_LIT>' , action = '<STR_LIT:store>' , type = "<STR_LIT:int>" , dest = '<STR_LIT:end>' , <EOL> default = - <NUM_LIT:1> , help = '<STR_LIT>' ) , <EOL> make_option ( '<STR_LIT>' , action = '<STR_LIT:store_true>' , dest = '<STR_LIT>' , <EOL> default = False , <EOL> help = '<STR_LIT>' ) , <EOL> ) <EOL> help = "<STR_LIT>" <EOL> @ recocommand <EOL> def handle_noargs ( self , ** options ) : <EOL> pname = smart_decode ( options . get ( '<STR_LIT>' ) ) <EOL> cname = smart_decode ( options . get ( '<STR_LIT>' ) ) <EOL> start = options . get ( '<STR_LIT:start>' ) <EOL> end = options . get ( '<STR_LIT:end>' ) <EOL> if start == - <NUM_LIT:1> : <EOL> start = None <EOL> if end == - <NUM_LIT:1> : <EOL> end = None <EOL> force = options . get ( '<STR_LIT>' ) <EOL> toc_download_entries ( pname , cname , start , end , force ) </s>
