Permalink
Browse files

jo

  • Loading branch information...
1 parent 957dd1b commit bc45c6d211595b8400dd785f1c61b4a73e9ba477 @Cosmo committed Oct 21, 2012
Showing with 60 additions and 23 deletions.
  1. BIN .DS_Store
  2. +1 −1 app/assets/javascripts/player.js
  3. +44 −16 app/assets/stylesheets/screen.css.sass
  4. +15 −6 getreminder.sh
View
BIN .DS_Store
Binary file not shown.
View
2 app/assets/javascripts/player.js
@@ -34,7 +34,7 @@
$('<div class="comment-entry" id="comment_'+comment_id +'">'+
'<span class="image"><img src="https://graph.facebook.com/' +
$(element).attr("data-uid") +
- '/picture/" style="float:left; margin-right:5px;" /></span><span class"bubble"><span class="name">'+
+ '/picture/" style="float:left; margin-right:5px;" /></span><span class="bubble"><span class="name">'+
$(element).attr("data-name")+
'</span><span class="message">' +
$(element).attr("data-text") +
View
60 app/assets/stylesheets/screen.css.sass
@@ -196,22 +196,23 @@ body.ui
#comment-entries
float: left
- width: 324px
- margin-top: 20px
+ width: 364px
+ margin-top: 10px
+ margin-right: 20px
.comment-entry
float: left
- width: 100%
margin-left: 20px
margin-bottom: 10px
- background: red
+ width: 344px
.image
width: 50px
height: 50px
background: #fff
float: left
@include box-shadow(rgba(0,0,0,.8) 0 2px 8px)
+ margin-right: 10px
img
width: 46px
@@ -220,52 +221,79 @@ body.ui
margin: 2px 16px 2px 2px
.bubble
- @include background-image(linear-gradient(#f6f6f6, #c8c8c8))
- width: 20px
+ width: 264px
float: left
- background: yellow
+ background: #333
+ color: #fff
+ padding: 10px
+ position: relative
.name
- color: #fff
float: left
- margin: 8px 0 0 12px
+ color: $orange
+ width: 244px
.message
- color: #222
float: left
- margin: 0 0 0 12px
+ width: 244px
+
+ .bubble::after
+ content: ""
+ display: block
+ width: 0
+ height: 0
+ position: absolute
+ left: -6px
+ top: 0
+ border-top: 8px solid transparent
+ border-bottom: 8px solid transparent
+ border-right: 6px solid #333
+ margin: 17px 0
#members
float: left
width: 160px
- background: #222
+ background: #333
padding: 10px 20px
- margin-top: 4px
+ margin-top: 10px
p
color: #fff
margin-bottom: 10px
li
float: left
- margin-bottom: 10px
+ margin-bottom: 0
+ width: 160px
+ height: 70px
+ position: relative
.time
+ color: $orange
+ position: absolute
+ top: 24px
+ left: 62px
.name
+ color: #fff
+ position: absolute
+ top: 6px
+ left: 62px
.profile
width: 50px
height: 50px
background: #fff
- float: left
+ position: absolute
+ top: 10px
+ left: 0px
@include box-shadow(rgba(0,0,0,.8) 0 2px 8px)
img
width: 46px
height: 46px
- float: left
margin: 2px
+ float: left
#column_left
width: 220px
View
21 getreminder.sh
@@ -1,7 +1,6 @@
#!/bin/sh
#usage BID email flag_set_reminder flag_set_rebroadcast flag_one_day_before flag_on_day flag_two_hours_before flag_arteplus7
set -e
-set -x
BID=${1:?"need bid as first param"}
EMAIL=${2:?"need urlencoded email adress as second param"}
@@ -13,7 +12,7 @@ FLAG_TWOHOURS=${7:-false}
FLAG_ARTE7P=${8:-true}
BASEURL='http://www.arte.tv'
-URL_PATHS="$(curl --silent "http://www.arte.tv/de/program/244,broadcastingNum=${BID},day=2,week=43,year=2012,CmPart=com.arte-tv.www.html" | grep 'var uri_re.*_revoir_' | sed 's:^.* = "\([^"]*\)";.*$:\1:')" || true
+URL_PATHS="$(curl --max-time 60 --silent "http://www.arte.tv/de/program/244,broadcastingNum=${BID},day=2,week=43,year=2012,CmPart=com.arte-tv.www.html" | grep 'var uri_re.*_revoir_' | sed 's:^.* = "\([^"]*\)";.*$:\1:')" || true
for path in $URL_PATHS; do
@@ -26,6 +25,10 @@ for path in $URL_PATHS; do
esac
done
+echo "reminder url: $URL_REMINDER" > /dev/stderr
+echo "rebroadcast url: $URL_REBROADCAST" > /dev/stderr
+
+
have_reminder() {
test -n "$URL_REMINDER";
}
@@ -41,17 +44,23 @@ set_reminder() {
local on_day="${3:-true}"
local two_hours_before="${4:-true}"
local arteplus7="${5:-true}"
- have_reminder && curl --silent -d 'method=get' -d "email=$email" -d "time1=$one_day_ahead" -d "time2=$on_day" -d "time3=$two_hours_before" -d "artePlus7=$arteplus7" -d 'process=false' "${BASEURL}${URL_REMINDER}" > /dev/null 2>&1
+ have_reminder && curl --max-time 30 --silent -d 'method=get' -d "email=$email" -d "time1=$one_day_ahead" -d "time2=$on_day" -d "time3=$two_hours_before" -d "artePlus7=$arteplus7" -d 'process=false' "${BASEURL}${URL_REMINDER}" > /dev/null 2>&1
+ RET=$?;
+ echo "curl reminder: $RET" > /dev/stderr
+ return $RET
}
set_rebroadcast() {
local email="${1:-test%40domain}"
- have_rebroadcast && curl --silent -d 'method=get' -d "email=$email" -d 'process=false' "${BASEURL}${URL_REBROADCAST}" > /dev/null 2>&1
+ have_rebroadcast && curl --max-time 30 --silent -d 'method=get' -d "email=$email" -d 'process=false' "${BASEURL}${URL_REBROADCAST}" > /dev/null 2>&1 ;
+ RET=$?;
+ echo "curl rebroadcast: $RET" > /dev/stderr
+ return $RET
}
#set -x
-test "true" = "${FLAG_REMINDER}" && { set_reminder "${EMAIL}" "${FLAG_ONEDAYBEFORE}" "${FLAG_ONDAY}" "${FLAG_TWOHOURS}" "${FLAG_ARTE7P}" && echo "reminder set" || echo "ERROR reminder"; }
+test "true" = "${FLAG_REMINDER}" && { set_reminder "${EMAIL}" "${FLAG_ONEDAYBEFORE}" "${FLAG_ONDAY}" "${FLAG_TWOHOURS}" "${FLAG_ARTE7P}" && echo "SUCCESS reminder" || echo "ERROR reminder"; }
-test "true" = "${FLAG_REBROADCAST}" && { set_rebroadcast "${EMAIL}" && echo "rebroadcast set" || echo "ERROR rebroadcast" ; }
+test "true" = "${FLAG_REBROADCAST}" && { set_rebroadcast "${EMAIL}" && echo "SUCCESS rebroadcast" || echo "ERROR rebroadcast" ; }
#set +x

0 comments on commit bc45c6d

Please sign in to comment.