diff options
Diffstat (limited to 'devfiles')
35 files changed, 283 insertions, 32 deletions
diff --git a/devfiles/scripts/bootstrap-cassandra.sh b/devfiles/scripts/bootstrap-cassandra.sh index 220bd03..e0813a0 100755 --- a/devfiles/scripts/bootstrap-cassandra.sh +++ b/devfiles/scripts/bootstrap-cassandra.sh @@ -6,7 +6,7 @@  ##  export TOOLS=`awk -F= '/jesterpm\.buildtools\.root/ { print $2 }' $HOME/.jesterpm-build-tools.properties` -export DEVFILES=$(dirname $0) +export DEVFILES=$(dirname $0)/..  $TOOLS/scripts/setup-cassandra.sh diff --git a/devfiles/scripts/bootstrap-strings.sh b/devfiles/scripts/bootstrap-strings.sh index 9552dcb..4e5eaf9 100755 --- a/devfiles/scripts/bootstrap-strings.sh +++ b/devfiles/scripts/bootstrap-strings.sh @@ -2,12 +2,17 @@  ##  ## This script clears the strings ColumnFamily and then rebuilds it. +## If given a file name, it will put the commands into the file and not run it.  ##  export TOOLS=`awk -F= '/jesterpm\.buildtools\.root/ { print $2 }' $HOME/.jesterpm-build-tools.properties` -export DEVFILES=$(dirname $0) +export DEVFILES=$(dirname $0)/.. -TEMPFILE=`mktemp` +SAVEFILE="$1" +TEMPFILE="$SAVEFILE" +if [ -z "$SAVEFILE" ]; then +    TEMPFILE=`mktemp` +fi  cat > $TEMPFILE << EOF  use GROW; @@ -21,12 +26,14 @@ create column family strings  EOF  # Fill with questions -./compile-questions.sh >> $TEMPFILE +$DEVFILES/scripts/compile-questions.sh >> $TEMPFILE  # Fill with videos -./compile-videos.sh >> $TEMPFILE +$DEVFILES/scripts/compile-videos.sh >> $TEMPFILE  # GO! -cassandra-cli < $TEMPFILE -rm $TEMPFILE +if [ -z "$SAVEFILE" ]; then +    cassandra-cli < $TEMPFILE +    rm $TEMPFILE +fi diff --git a/devfiles/scripts/videos-from-csv.py b/devfiles/scripts/videos-from-csv.py new file mode 100755 index 0000000..6adc8d7 --- /dev/null +++ b/devfiles/scripts/videos-from-csv.py @@ -0,0 +1,55 @@ +#!/usr/bin/python + +import sys,os,errno +import csv +import string +from string import Template + +BASE_URL="http://foursquaregrow.s3-website-us-east-1.amazonaws.com/" + +def mkjson(chapter, number, title, length, videos): +    vtemplate = Template("""{ +    "id": "$id", +    "number": "$number", +    "title": "$title", +    "length": $length, +    "urls": [""") + +    urltemplate = Template("""{"src":"$src", "type":"$type"},""") + +    directory = string.lower("videos/" + chapter) +    try: +        os.makedirs(directory) +    except OSError as exc: +        if exc.errno == errno.EEXIST and os.path.isdir(directory): +            pass +        else: +            raise +    filename = string.lower(directory + "/" + chapter + "-" + number + ".json") +    with open(filename, 'w') as outfile: +        outfile.write(vtemplate.substitute(dict(id=string.lower(chapter+"-"+number), +            chapter=chapter, number=number, title=title, length=length))) + +        for type,src in videos.iteritems(): +            outfile.write(urltemplate.substitute(dict(type=type, src=BASE_URL + src))) + +        outfile.seek(-1, 2) +        outfile.write("]\n}") + +# This script reads lines from the given csv file and creates json files for +# each video in the videos/ directory. + +filename = sys.argv[1]; +with open(filename, 'rb') as csvfile: +    reader = csv.reader(csvfile) +    for row in reader: +        chapter = row[0] +        number = row[1] +        title = row[2] +        length = row[3] +        h264 = row[4] + +        videos = { "video/mp4": h264 } + +        mkjson(chapter, number, title, length, videos) + diff --git a/devfiles/videos/believer/believer-1.json b/devfiles/videos/believer/believer-1.json index 07169ab..2ff00ea 100644 --- a/devfiles/videos/believer/believer-1.json +++ b/devfiles/videos/believer/believer-1.json @@ -1,7 +1,7 @@  {      "id": "believer-1", -    "number": 1, -    "title": "Star Trek Voyager: Caretaker", -    "length": 6000, -    "urls": [{"type": "video/x-msvideo", "src": "http://localhost/~jesterpm/videos/Star%20Trek/Voyager/Season%201/Star%20Trek%20Voyager%20-%20101-102%20-%20Caretaker.avi"}] -} +    "number": "1", +    "title": "Intro", +    "length": 460, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 1 - Intro.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-10.json b/devfiles/videos/believer/believer-10.json new file mode 100644 index 0000000..5f59a06 --- /dev/null +++ b/devfiles/videos/believer/believer-10.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-10", +    "number": "10", +    "title": "Resurrection", +    "length": 529, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 10 – Resurrection.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-2.json b/devfiles/videos/believer/believer-2.json new file mode 100644 index 0000000..c00d5ad --- /dev/null +++ b/devfiles/videos/believer/believer-2.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-2", +    "number": "2", +    "title": "The Bible", +    "length": 386, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 2 - The Bible.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-3.json b/devfiles/videos/believer/believer-3.json new file mode 100644 index 0000000..2e90f26 --- /dev/null +++ b/devfiles/videos/believer/believer-3.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-3", +    "number": "3", +    "title": "The Trinity", +    "length": 364, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 3 - The Trinity.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-4.json b/devfiles/videos/believer/believer-4.json new file mode 100644 index 0000000..3df0451 --- /dev/null +++ b/devfiles/videos/believer/believer-4.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-4", +    "number": "4", +    "title": "Created Beings", +    "length": 360, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 4 - Created Beings.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-5.json b/devfiles/videos/believer/believer-5.json new file mode 100644 index 0000000..bd27bd1 --- /dev/null +++ b/devfiles/videos/believer/believer-5.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-5", +    "number": "5", +    "title": "God Becomes Man", +    "length": 797, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 5 - God Becomes Man.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-6.json b/devfiles/videos/believer/believer-6.json new file mode 100644 index 0000000..97b6c58 --- /dev/null +++ b/devfiles/videos/believer/believer-6.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-6", +    "number": "6", +    "title": "The Church Part 1", +    "length": 405, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 6 - The Church Part 1.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-7.json b/devfiles/videos/believer/believer-7.json new file mode 100644 index 0000000..94efa38 --- /dev/null +++ b/devfiles/videos/believer/believer-7.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-7", +    "number": "7", +    "title": "The Church Part 2", +    "length": 573, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 7 - The Church Part 2.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-8.json b/devfiles/videos/believer/believer-8.json new file mode 100644 index 0000000..def3e24 --- /dev/null +++ b/devfiles/videos/believer/believer-8.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-8", +    "number": "8", +    "title": "The Spirit", +    "length": 513, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 8 The Spirit.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-9.json b/devfiles/videos/believer/believer-9.json new file mode 100644 index 0000000..2e80303 --- /dev/null +++ b/devfiles/videos/believer/believer-9.json @@ -0,0 +1,7 @@ +{ +    "id": "believer-9", +    "number": "9", +    "title": "Second Coming", +    "length": 478, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Believer Video 9 - Second Coming.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-1.json b/devfiles/videos/disciple/disciple-1.json index e5f9d75..95cb3ab 100644 --- a/devfiles/videos/disciple/disciple-1.json +++ b/devfiles/videos/disciple/disciple-1.json @@ -1,7 +1,7 @@  {      "id": "disciple-1", -    "number": 1, -    "title": "Star Trek Voyager: Caretaker", -    "length": 6000, -    "urls": [{"type": "video/x-msvideo", "src": "http://localhost/~jesterpm/videos/Star%20Trek/Voyager/Season%201/Star%20Trek%20Voyager%20-%20101-102%20-%20Caretaker.avi"}] -} +    "number": "1", +    "title": "Intro", +    "length": 344, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Discipleship Video 1 - Intro.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-10.json b/devfiles/videos/disciple/disciple-10.json new file mode 100644 index 0000000..0469589 --- /dev/null +++ b/devfiles/videos/disciple/disciple-10.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-10", +    "number": "10", +    "title": "Conclusion", +    "length": 405, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 10 - Conclusion.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-2.json b/devfiles/videos/disciple/disciple-2.json new file mode 100644 index 0000000..39bcc4b --- /dev/null +++ b/devfiles/videos/disciple/disciple-2.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-2", +    "number": "2", +    "title": "Life Of A Disciple", +    "length": 551, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 2 - Life Of A Disciple.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-3.json b/devfiles/videos/disciple/disciple-3.json new file mode 100644 index 0000000..cee4ed7 --- /dev/null +++ b/devfiles/videos/disciple/disciple-3.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-3", +    "number": "3", +    "title": "The Word", +    "length": 438, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 3 - The Word.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-4.json b/devfiles/videos/disciple/disciple-4.json new file mode 100644 index 0000000..a70f8c0 --- /dev/null +++ b/devfiles/videos/disciple/disciple-4.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-4", +    "number": "4", +    "title": "Prayer", +    "length": 682, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 4 - Prayer.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-5.json b/devfiles/videos/disciple/disciple-5.json new file mode 100644 index 0000000..bbbf077 --- /dev/null +++ b/devfiles/videos/disciple/disciple-5.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-5", +    "number": "5", +    "title": "Fasting", +    "length": 511, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 5 - Fasting.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-6.json b/devfiles/videos/disciple/disciple-6.json new file mode 100644 index 0000000..6bad1cc --- /dev/null +++ b/devfiles/videos/disciple/disciple-6.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-6", +    "number": "6", +    "title": "Worship", +    "length": 701, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 6 - Worship.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-7.json b/devfiles/videos/disciple/disciple-7.json new file mode 100644 index 0000000..48e0869 --- /dev/null +++ b/devfiles/videos/disciple/disciple-7.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-7", +    "number": "7", +    "title": "Solitude", +    "length": 470, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 7 - Solitude.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-8.json b/devfiles/videos/disciple/disciple-8.json new file mode 100644 index 0000000..520beb0 --- /dev/null +++ b/devfiles/videos/disciple/disciple-8.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-8", +    "number": "8", +    "title": "Stewardship", +    "length": 163, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 8 - Stewardship.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-9.json b/devfiles/videos/disciple/disciple-9.json new file mode 100644 index 0000000..5859332 --- /dev/null +++ b/devfiles/videos/disciple/disciple-9.json @@ -0,0 +1,7 @@ +{ +    "id": "disciple-9", +    "number": "9", +    "title": "Evangelism", +    "length": 490, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Disciple Video 9 – Evangelism.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-1.json b/devfiles/videos/seeker/seeker-1.json index dc5216e..a5ef4a4 100644 --- a/devfiles/videos/seeker/seeker-1.json +++ b/devfiles/videos/seeker/seeker-1.json @@ -1,7 +1,7 @@  {      "id": "seeker-1", -    "number": 1, -    "title": "The Basics", -    "length": 330, -    "urls": [{"src":"seeker-the-basics.mp4", "type":"video/mp4"}, {"src":"seeker-the-basics.webm", "type":"video/webm"}] -} +    "number": "1", +    "title": "Introduction Final", +    "length": 395, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Video 1 - Introduction Final.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-2.json b/devfiles/videos/seeker/seeker-2.json index 22d9b51..22aaf85 100644 --- a/devfiles/videos/seeker/seeker-2.json +++ b/devfiles/videos/seeker/seeker-2.json @@ -1,7 +1,7 @@  {      "id": "seeker-2", -    "number": 2, -    "title": "Star Trek Voyager: Caretaker", -    "length": 6000, -    "urls": [{"type": "video/x-msvideo", "src": "http://localhost/~jesterpm/videos/Star%20Trek/Voyager/Season%201/Star%20Trek%20Voyager%20-%20101-102%20-%20Caretaker.avi"}] -} +    "number": "2", +    "title": "Our Condition", +    "length": 612, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Video 2 - Our Condition.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-3.json b/devfiles/videos/seeker/seeker-3.json new file mode 100644 index 0000000..b9d3f16 --- /dev/null +++ b/devfiles/videos/seeker/seeker-3.json @@ -0,0 +1,7 @@ +{ +    "id": "seeker-3", +    "number": "3", +    "title": "God Searches", +    "length": 399, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Video 3 - God Searches.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-4.json b/devfiles/videos/seeker/seeker-4.json new file mode 100644 index 0000000..096c5ee --- /dev/null +++ b/devfiles/videos/seeker/seeker-4.json @@ -0,0 +1,7 @@ +{ +    "id": "seeker-4", +    "number": "4", +    "title": "The Cross", +    "length": 289, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Video 4 - The Cross.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-5.json b/devfiles/videos/seeker/seeker-5.json new file mode 100644 index 0000000..b690e18 --- /dev/null +++ b/devfiles/videos/seeker/seeker-5.json @@ -0,0 +1,7 @@ +{ +    "id": "seeker-5", +    "number": "5", +    "title": "Our Response", +    "length": 469, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Video 5 - Our Response.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-1.json b/devfiles/videos/teacher/teacher-1.json index 68f9741..bf74d61 100644 --- a/devfiles/videos/teacher/teacher-1.json +++ b/devfiles/videos/teacher/teacher-1.json @@ -1,7 +1,7 @@  {      "id": "teacher-1", -    "number": 1, -    "title": "Star Trek Voyager: Caretaker", -    "length": 6000, -    "urls": [{"type": "video/x-msvideo", "src": "http://localhost/~jesterpm/videos/Star%20Trek/Voyager/Season%201/Star%20Trek%20Voyager%20-%20101-102%20-%20Caretaker.avi"}] -} +    "number": "1", +    "title": "Intro", +    "length": 182, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 1 - Intro.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-2.json b/devfiles/videos/teacher/teacher-2.json new file mode 100644 index 0000000..7e91108 --- /dev/null +++ b/devfiles/videos/teacher/teacher-2.json @@ -0,0 +1,7 @@ +{ +    "id": "teacher-2", +    "number": "2", +    "title": "Biblical Expectations Final", +    "length": 481, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 2 - Biblical Expectations Final.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-3.json b/devfiles/videos/teacher/teacher-3.json new file mode 100644 index 0000000..064481e --- /dev/null +++ b/devfiles/videos/teacher/teacher-3.json @@ -0,0 +1,7 @@ +{ +    "id": "teacher-3", +    "number": "3", +    "title": "Foursquare Expectations", +    "length": 342, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 3 - Foursquare Expectations.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-4.json b/devfiles/videos/teacher/teacher-4.json new file mode 100644 index 0000000..61ac120 --- /dev/null +++ b/devfiles/videos/teacher/teacher-4.json @@ -0,0 +1,7 @@ +{ +    "id": "teacher-4", +    "number": "4", +    "title": "Conforming to Doctrine", +    "length": 355, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 4 - Conforming to Doctrine.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-5.json b/devfiles/videos/teacher/teacher-5.json new file mode 100644 index 0000000..987776f --- /dev/null +++ b/devfiles/videos/teacher/teacher-5.json @@ -0,0 +1,7 @@ +{ +    "id": "teacher-5", +    "number": "5", +    "title": "Adhering to Mission & Values", +    "length": 222, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 5 -Adhering to Mission & Values.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-6.json b/devfiles/videos/teacher/teacher-6.json new file mode 100644 index 0000000..1520b98 --- /dev/null +++ b/devfiles/videos/teacher/teacher-6.json @@ -0,0 +1,7 @@ +{ +    "id": "teacher-6", +    "number": "6", +    "title": "Being a Disciple & Developing Others", +    "length": 722, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 6 - Being a Disciple & Developing Others.mov", "type":"video/mp4"}] +}
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-7.json b/devfiles/videos/teacher/teacher-7.json new file mode 100644 index 0000000..3885371 --- /dev/null +++ b/devfiles/videos/teacher/teacher-7.json @@ -0,0 +1,7 @@ +{ +    "id": "teacher-7", +    "number": "7", +    "title": "Prerequisites", +    "length": 535, +    "urls": [{"src":"http://foursquaregrow.s3-website-us-east-1.amazonaws.com/Teacher Video 7 - Prerequisites.mov", "type":"video/mp4"}] +}
\ No newline at end of file  | 
