summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lifestream.pl10
-rw-r--r--lifestream.tt39
-rw-r--r--lifestream.yaml45
3 files changed, 44 insertions, 50 deletions
diff --git a/lifestream.pl b/lifestream.pl
index 891e945..9423cc5 100644
--- a/lifestream.pl
+++ b/lifestream.pl
@@ -7,10 +7,10 @@ use YAML::Syck;
use URI;
use Template;
-my $feeds = LoadFile( shift );
+my $config = LoadFile( shift );
my $hash_entries;
-foreach ( @$feeds ) {
+foreach ( @{$config->{actions}} ) {
my $feed = XML::Feed->parse( URI->new( $_->{ url } ) );
for my $e ( $feed->entries ) {
my $date = $e->issued->strftime( '%Y.%m.%d' );
@@ -29,6 +29,12 @@ my @dates = keys %$hash_entries;
my @sorted_dates = sort { $a cmp $b } @dates;
my $hash_templates;
+for my $type ( 'profiles', 'actions' ) {
+ foreach my $profile ( @{ $config->{ $type } } ) {
+ push @{ $hash_templates->{ profiles } }, $profile;
+ }
+}
+
foreach my $date ( reverse @sorted_dates ) {
my @actions = sort { $b->{ date } cmp $a->{ date } }
@{ $hash_entries->{ $date } };
diff --git a/lifestream.tt b/lifestream.tt
index b405336..68fc4f6 100644
--- a/lifestream.tt
+++ b/lifestream.tt
@@ -23,8 +23,9 @@
<div class="userpic"><img src="images/me.jpg" alt="franck" /></div>
<div class="profile-header-content"><h1 id="page-title">franck cuny</h1></div>
<a href="http://lumberjaph.net">lumberjpah.net</a><br />
- franck [at] lumberjaph [dot] net
- </p>
+ mail: franck [at] lumberjaph [dot] net<br />
+ <a href="http://lumberjaph.net/blog/">blog</a><br />
+ <a href="http://lumberjaph.net/code/">code</a><br />
</div>
<div class="actions">
[% USE Dumper %]
@@ -64,39 +65,19 @@
<div class="widget-content">
<ul class="action-stream-list">
-
- <li class="service-icon icon-service-delicious">
- <a href="http://delicious.com/krynsky/" rel="me">Delicious Profile</a>
+ [% FOREACH profile IN profiles %]
+ <li class="service-icon icon-service-[% profile.source %]">
+ <a href="[% profile.source_url %]" rel="me">[% profile.caption %] Profile</a>
+
+ </li>
+ [% END %]
- </li>
-
<li class="service-icon icon-service-flickr">
- <a href="http://flickr.com/photos/krynsky/" rel="me">Flickr Profile</a>
+ <a href="http://flickr.com/photos/franck/" rel="me">Flickr Profile</a>
</li>
- <li class="service-icon icon-service-googlereader">
- <a href="http://www.google.com/reader/shared/01549324099173237561" rel="me">Google Reader Profile</a>
-
- </li>
-
- <li class="service-icon icon-service-lastfm">
- <a href="http://www.last.fm/user/krynsky/" rel="me">Last.fm Profile</a>
-
- </li>
-
-
- <li class="service-icon icon-service-identica">
- <a href="http://identi.ca/franck" rel="me">Identica Profile</a>
-
- </li>
-
-
- <li class="service-icon icon-service-myblog">
- <a href="http://lumberjaph.net/blog/" rel="me">my blog</a>
-
- </li>
</ul>
diff --git a/lifestream.yaml b/lifestream.yaml
index 89ef30d..be66801 100644
--- a/lifestream.yaml
+++ b/lifestream.yaml
@@ -1,19 +1,26 @@
--
- source: delicious
- url: http://feeds.delicious.com/v2/rss/franck?count=20
- source_url: http://delicious.com/franck
--
- source: identica
- url: http://identi.ca/api/statuses/user_timeline/franck.atom
- source_url: http://identi.ca/franck
--
- source: googlereader
- url: http://www.google.com/reader/public/atom/user%2F17077268849154926648%2Fstate%2Fcom.google%2Fbroadcast
--
- source: myblog
- url: http://lumberjaph.net/blog/index.php/feed/
- source_url: http://lumberjaph.net/blog/
-#-
- #source: lastfm
- #url: http://ws.audioscrobbler.com/1.0/user/franckcuny/recenttracks.rss
- #source_url: http://www.last.fm/user/franckcuny
+actions:
+ -
+ source: delicious
+ url: http://feeds.delicious.com/v2/rss/franck?count=20
+ source_url: http://delicious.com/franck
+ caption: Delicious
+ -
+ source: identica
+ url: http://identi.ca/api/statuses/user_timeline/franck.atom
+ source_url: http://identi.ca/franck
+ caption: Identi.ca
+ -
+ source: googlereader
+ url: http://www.google.com/reader/public/atom/user%2F17077268849154926648%2Fstate%2Fcom.google%2Fbroadcast
+ source_url: https://www.google.com/reader/shared/17077268849154926648
+ caption: Google Reader
+ -
+ source: myblog
+ url: http://lumberjaph.net/blog/index.php/feed/
+ source_url: http://lumberjaph.net/blog/
+ caption: My Blog
+profiles:
+ -
+ source: lastfm
+ url: http://www.last.fm/user/franckcuny/
+ caption: Last.fm