Tracker module
- class Tracker.State
Bases:
objectThe State class that holds all state data. Holds alert settings and the item list.- deleteAlert(alert)
Delete an alert.
- Parameters
alert – given the alert name which we want to delete
- Returns
- deleteEmail()
Clear the email address.
- getStatus(item, url)
Get the item status for specific item.
- Parameters
item – given item name
url – given item url
- Returns
the item status for given item
- read_state(s)
Read in a state from file.
- Parameters
filename – given filename we want to read in
s – is the sate we want add state data to
- save_state(s)
Save the state to the file.
@param filename: the filename we want to save the state to @param s: is the state instance which stores the state data
- updateAlert(alert)
Update the alert with given alert, add the new aler to the alert list.
- Parameters
alert – given alert
- updateEmail(email)
Update the email with given email.
- Parameters
email – the given email
- updateItem(iturl)
Update the item list with given item dict.
- Parameters
iturl – the given item dict,contains the item name, url, status and previous status
- updateSetting(setting)
Update the setting with given setting.
- Parameters
setting – the given setting
- updateStatus(item, url, status)
Update the item status.
- Parameters
item – given item name
url – given item url
status – new item status