Skip to content

Commit

Permalink
fixed i think
Browse files Browse the repository at this point in the history
  • Loading branch information
mindovermiles262 committed Jul 25, 2020
1 parent e897e85 commit 139ca82
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 38 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org" do
gem 'sinatra'
gem 'nokogiri'
gem 'i18n'
gem 'rest-client'
gem 'omniauth-spotify'
gem 'rake', '~> 12.1'
end
Expand Down
77 changes: 43 additions & 34 deletions Gemfile.lock
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,65 +1,74 @@
GEM
remote: https://rubygems.org/
specs:
backports (3.15.0)
concurrent-ruby (1.1.5)
faraday (0.15.4)
concurrent-ruby (1.1.6)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
hashie (3.6.0)
i18n (1.6.0)
hashie (4.1.0)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jwt (2.2.1)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mini_portile2 (2.4.0)
multi_json (1.13.1)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mustermann (1.0.3)
nokogiri (1.10.4)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
netrc (0.11.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
oauth2 (1.4.4)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (1.9.0)
hashie (>= 3.4.6, < 3.7.0)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
omniauth-oauth2 (1.6.0)
oauth2 (~> 1.1)
omniauth (~> 1.9)
omniauth-spotify (0.0.13)
omniauth-oauth2 (~> 1.1)
rack (2.0.7)
rack-protection (2.0.5)
rack (2.2.3)
rack-protection (2.0.8.1)
rack
rake (12.3.2)
sinatra (2.0.5)
rake (12.3.3)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
ruby2_keywords (0.0.2)
sinatra (2.0.8.1)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.5)
rack-protection (= 2.0.8.1)
tilt (~> 2.0)
sinatra-contrib (2.0.5)
backports (>= 2.8.2)
multi_json
mustermann (~> 1.0)
rack-protection (= 2.0.5)
sinatra (= 2.0.5)
tilt (>= 1.3, < 3)
sinatra-reloader (1.0)
sinatra-contrib
tilt (2.0.9)
tilt (2.0.10)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)

PLATFORMS
ruby

DEPENDENCIES
i18n
nokogiri
omniauth-spotify
rake (~> 12.1)
sinatra
sinatra-reloader (~> 1.0)
i18n!
nokogiri!
omniauth-spotify!
rake (~> 12.1)!
rest-client!
sinatra!

BUNDLED WITH
1.17.2
2.0.2
2 changes: 2 additions & 0 deletions data/KCRW-SOTD.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Peter CottonTale: ‘Pray For Real’ (Clean)

Margaret Chavez: ‘Into An Atmosphere’
Sarah Walk: ‘Unravel’
Lianne La Havas: ‘Paper Thin’
Expand Down
1 change: 1 addition & 0 deletions data/KEXP-SOTD.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Eggshells - Un
The Jayhawks - This Forgotten
Delvon Lamarr Organ Trio - Inner City
IDLES - Gr
Expand Down
3 changes: 3 additions & 0 deletions data/TheCurrentSOTD.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Reiki - Power


Psychedelic Furs - Come All Ye Faithful
Nation of Language - On Division St.
The Suffers - Take Me To The Good Times
Expand Down
3 changes: 2 additions & 1 deletion lib/kcrw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def get_kcrw

today = (sprintf '%02d', Date.today.day) + " " + Date::MONTHNAMES[Date.today.month][0..2].to_s + " " + Date.today.year.to_s
# today = "29 Sep 2016"
# today = "24 Jul 2020"

page = Nokogiri::XML(open("http://feeds.kcrw.com/podcast/show/tu"))
dates = page.xpath('//pubDate') # search for pubDate
Expand All @@ -18,4 +19,4 @@ def get_kcrw
end
end
return nil
end
end
5 changes: 3 additions & 2 deletions lib/kexp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ def get_kexp
require 'date'

today = (sprintf '%02d', Date.today.day) + " " + Date::MONTHNAMES[Date.today.month][0..2].to_s + " " + Date.today.year.to_s
#today = "01 Sep 2017"
# today = "01 Sep 2017"
# today = "24 Jul 2020"

# get SOTD XML
page = Nokogiri::XML(open("http://feeds.kexp.org/kexp/songoftheday"))
Expand All @@ -19,4 +20,4 @@ def get_kexp
end
end
return nil
end
end
3 changes: 2 additions & 1 deletion lib/the-current.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def get_the_current

today = Date::MONTHNAMES[Date.today.month] + " " + Date.today.day.to_s + ", " + Date.today.year.to_s # => "March 10, 2017"
#today = "August 30, 2017"
# today = "July 24, 2020"

# get SOTD page HTML
page = Nokogiri::HTML(open('http://www.thecurrent.org/collection/song-of-the-day'))
Expand All @@ -19,4 +20,4 @@ def get_the_current
end
end
return nil
end
end
2 changes: 2 additions & 0 deletions main.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env ruby

require_relative './lib/cli-refresh-token'
require_relative './lib/add-new-songs'

Expand Down

0 comments on commit 139ca82

Please sign in to comment.