<s> '''<STR_LIT>''' <EOL> import json <EOL> import os <EOL> import sphinx . ext . intersphinx <EOL> DOCS_URL = '<STR_LIT>' <EOL> def write_urls_index ( app , exc ) : <EOL> '''<STR_LIT>''' <EOL> inventory = os . path . join ( app . builder . outdir , '<STR_LIT>' ) <EOL> objects = sphinx . ext . intersphinx . fetch_inventory ( app , DOCS_URL , inventory ) <EOL> with open ( os . path . join ( app . builder . outdir , '<STR_LIT>' ) , '<STR_LIT:wb>' ) as f : <EOL> json . dump ( objects , f ) <EOL> def setup ( app ) : <EOL> app . connect ( '<STR_LIT>' , write_urls_index ) </s>
