get_site_map¶
-
pyrcs.utils.
get_site_map
(update=False, confirmation_required=True, verbose=False)¶ Fetch the site map from the package data.
- Parameters
update (bool) – whether to do an update check (for the package data), defaults to
False
confirmation_required (bool) – whether to confirm before proceeding, defaults to
True
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
dictionary of site map data
- Return type
dict or None
Examples:
>>> from pyrcs.utils import get_site_map >>> site_map_dat = get_site_map() >>> type(site_map_dat) collections.OrderedDict >>> list(site_map_dat.keys()) ['Home', 'Line data', 'Other assets', '"Legal/financial" lists', 'Miscellaneous'] >>> site_map_dat['Home'] http://www.railwaycodes.org.uk/index.shtml >>> # site_map_dat = get_site_map(update=True, verbose=2) >>> # To collect the site map? [No]|Yes: yes >>> # Updating the package data ... Done. >>> # Updating "site-map.pickle" at "pyrcs\dat" ... Done.