def write_urls_index(app, exc):
 inventory = os.path.join(app.builder.outdir, 'objects.inv')
 objects = sphinx.ext.intersphinx.fetch_inventory(app, DOCS_URL, inventory)
 with open(os.path.join(app.builder.outdir, 'shorturls.json'), 'w') as f:
  json.dump(objects, f)

def write_urls_index ( app , exc ) : inventory = os . path . join ( app . builder . outdir , 'objects.inv' ) objects = sphinx . ext . intersphinx . fetch_inventory ( app , DOCS_URL , inventory ) with open ( os . path . join ( app . builder . outdir , 'shorturls.json' ) , 'w' ) as f : json . dump ( objects , f )
generate a json file to serve as an index for short-url lookups .