utils
Provide a number of helper functions.
Validate inputs
Check whether the Railway Codes website is connectable. |
|
|
Check if a string-type variable can express a float-type value. |
|
Get a valid initial letter as an input. |
|
Get a valid page name. |
|
Create a new parameter that indicates whether to print relevant information in console (used only if it is necessary to re-collect data when trying to fetch the data). |
|
Create a new parameter that indicates whether to print relevant information in console (used only when trying to fetch all data of a cluster). |
Print messages
|
Create a confirmation message (for data collection). |
|
Print a message about the status of collecting data. |
|
Print a message about unsuccessful attempts to establish a connection to the Internet. |
Format an error message. |
|
|
Print a message about unsuccessful attempts to establish a connection to the Internet (for an instance of a class). |
|
Print a message about the status of collecting data (only when the data collection process fails). |
Save and retrieve pre-packed data
|
Specify an initial data directory for (an instance of) a class for a data cluster. |
|
Make a pathname for saving data as a file of a certain format. |
|
Create a dictionary for rectifying location names. |
|
Save the collected data as a file, depending on the given parameters. |
|
Fetch/load desired data from a backup file, depending on the given parameters. |