TrackDiagrams
- class pyrcs.line_data.TrackDiagrams(data_dir=None, update=False, verbose=True)[source]
A class for collecting data of British railway track diagrams.
- Parameters:
data_dir (str or None) – name of data directory, defaults to
None
update (bool) – whether to do an update check (for the package data), defaults to
False
verbose (bool or int) – whether to print relevant information in console, defaults to
True
- Variables:
catalogue (dict) – catalogue of the data
last_updated_date (str) – last updated date
data_dir (str) – path to the data directory
current_data_dir (str) – path to the current data directory
Examples:
>>> from pyrcs.line_data import TrackDiagrams # from pyrcs import TrackDiagrams >>> td = TrackDiagrams() >>> td.NAME 'Railway track diagrams' >>> td.URL 'http://www.railwaycodes.org.uk/line/diagrams0.shtm'
Attributes
Key of the dict-type data
Key of the data of the last updated date
Name of the data
URL of the main web page of the data
Methods
collect_catalogue
([confirmation_required, ...])Collect catalogue of sample railway track diagrams from source web page.
fetch_catalogue
([update, dump_dir, verbose])Fetch the catalogue of railway track diagrams.