Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mail still doesn't work, but the feed is starting to come together.

  • Loading branch information...
commit 081a13509db7210e56073947e627832f5f54151b 1 parent 3807b5b
@chadoh authored
Showing with 18 additions and 0 deletions.
  1. +2 −0  .gitignore
  2. +1 −0  TODO
  3. +11 −0 controls.rb
  4. +4 −0 views/thoughts.haml
View
2  .gitignore
@@ -0,0 +1,2 @@
+# Ignore gedit's temporary files
+*~
View
1  TODO
@@ -1,6 +1,7 @@
make contact form functional (configure mail function (pony? ssmtp?))
Use blogger data api to reproduce blogger content natively
+ successfully pulling feed, now narrow it and make it pretty
Look into Heroku
View
11 controls.rb
@@ -3,6 +3,8 @@
require 'haml'
require 'sass'
require 'pony'
+require 'crack'
+require 'open-uri'
set :sass, { :style => :compact }
set :haml, { :ugly => true }
@@ -34,6 +36,15 @@ def current_tab_if(route)
haml :language_assistance
end
+#loads in blogger feed
+get "/thoughts" do
+ url = "http://www.blogger.com/feeds/9096209599953091034/posts/default"
+ xml = open(url).read
+ @feed = Crack::XML.parse(xml)
+
+ haml :thoughts
+end
+
get "/:page/?" do
begin
haml params[:page].to_sym
View
4 views/thoughts.haml
@@ -5,3 +5,7 @@
Doesn't seem very complicated, I agree. But! I need scripts on _this_ page that the other pages on the site don't have. These need to go in the <head>. But I insist that I shall only have one layout. And I don't want to clutter it up with logic.
At this point I'm thinking the best way to do this would be with helper functions? I'll create separate branches for each approach.
+
+%hr
+
+%p Test to check if the feed was gotten properly: #{@feed['feed']['title']}
Please sign in to comment.
Something went wrong with that request. Please try again.