Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
jo
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmo committed Oct 21, 2012
1 parent 957dd1b commit bc45c6d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 23 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion app/assets/javascripts/player.js
Expand Up @@ -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") +
Expand Down
60 changes: 44 additions & 16 deletions app/assets/stylesheets/screen.css.sass
Expand Up @@ -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
Expand All @@ -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
Expand Down
21 changes: 15 additions & 6 deletions 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"}
Expand All @@ -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
Expand All @@ -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";
}
Expand All @@ -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.