<s> import io <EOL> import os <EOL> import json <EOL> from logya . core import Logya <EOL> from logya . encoder import JSONEncoder <EOL> logya = Logya ( ) <EOL> logya . init_env ( ) <EOL> logya . build_index ( ) <EOL> site_index = { } <EOL> for url , doc in logya . docs . items ( ) : <EOL> del doc [ '<STR_LIT:body>' ] <EOL> site_index [ url ] = doc <EOL> index_file = os . path . join ( logya . dir_static , '<STR_LIT>' ) <EOL> with io . open ( index_file , '<STR_LIT:w>' , encoding = '<STR_LIT:utf-8>' ) as f : <EOL> json . dump ( site_index , f , cls = JSONEncoder ) </s>
