diff --git a/soccer-leagues.el b/soccer-leagues.el index fe075e1..bfe7dc7 100644 --- a/soccer-leagues.el +++ b/soccer-leagues.el @@ -79,8 +79,24 @@ :group 'soccer :link '(url-link :tag "Homepage" "https://github.com/md-arif-shaikh/soccer")) -(defvar soccer-leagues--leagues-alist) -(setq soccer-leagues--leagues-alist (soccer-leagues--get-competition-names-and-urls)) +;;; The functions to fetch league and urls is not working anymore. Hardcoding some of these. +;;;(setq soccer-leagues--leagues-alist (soccer-leagues--get-competition-names-and-urls)) +(defcustom soccer-leagues-leagues-alist '(("Premier League" . "https://www.theguardian.com/football/premierleague") + ("La Liga" . "https://www.theguardian.com/football/laligafootball") + ("Serie A" . "https://www.theguardian.com/football/serieafootball") + ("Bundeshliga" . "https://www.theguardian.com/football/bundesligafootball") + ("Ligue 1" . "https://www.theguardian.com/football/ligue1football") + ("Champions League" . "https://www.theguardian.com/football/championsleague") + ("FA Cup" . "https://www.theguardian.com/football/fa-cup") + ("Carabao Cup" . "https://www.theguardian.com/football/carabao-cup") + ("Championship" . "https://www.theguardian.com/football/championship") + ("Europa League" . "https://www.theguardian.com/football/uefa-europa-league") + ("Conference League" . "https://www.theguardian.com/football/europa-conference-league") + ("MLS" . "https://www.theguardian.com/football/mls") + ("Women's Super League" . "https://www.theguardian.com/football/womens-super-league")) + "Alist of league and urls." + :type '(alist :value-type (group integer)) + :group 'soccer) (provide 'soccer-leagues) diff --git a/soccer.el b/soccer.el index 6c6498d..684e87b 100644 --- a/soccer.el +++ b/soccer.el @@ -136,8 +136,8 @@ :group 'soccer-face) (defun soccer--get-league-names () - "Extract league names from `soccer-leagues--leagues-alist'." - (mapcar 'car soccer-leagues--leagues-alist)) + "Extract league names from `soccer-leagues-leagues-alist'." + (mapcar 'car soccer-leagues-leagues-alist)) (defun soccer--get-league-url (league) "Get url of a LEAGUE." @@ -513,7 +513,7 @@ (defun soccer--all-clubs () "Get all club names." (delete-dups (-flatten (cl-loop for leagues in (soccer--league-names) - collect (mapcar 'car (cdr (assoc leagues soccer-leagues--leagues-alist))))))) + collect (mapcar 'car (cdr (assoc leagues soccer-leagues-leagues-alist))))))) (defun soccer-scorecard (date home away) "Get the socrecard for a match between HOME and AWAY on a DATE. Enter DATE in YYYY-MM-DD format if entering it manually. If the input is from `org-read-date' calendar popup then it is in YYYY-MM-DD format by default."