TrackDiagrams¶
-
class
trk_diagr.
TrackDiagrams
(data_dir=None, verbose=True)¶ A class for collecting British railway track diagrams.
- Parameters
data_dir (str or None) – name of data directory, defaults to
None
verbose (bool or int) – whether to print relevant information in console, defaults to
True
- Variables
Name (str) – name of the data
Key (str) – key of the dict-type data
HomeURL (str) – URL of the main homepage
SourceURL (str) – URL of the data web page
LUDKey (str) – key of the last updated date
LUD (str) – last updated date
DataDir (str) – path to the data directory
CurrentDataDir (str) – path to the current data directory
Example:
>>> from pyrcs.line_data import TrackDiagrams >>> td = TrackDiagrams() >>> print(td.Name) Railway track diagrams (some samples) >>> print(td.SourceURL) http://www.railwaycodes.org.uk/track/diagrams0.shtm
Methods
Collect catalogue of sample railway track diagrams from source web page.
fetch_sample_catalogue
([update, pickle_it, …])Fetch catalogue of sample railway track diagrams from local backup.
get_track_diagrams_items
([update, verbose])Get catalogue of track diagrams.