Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/decause/hflossk
Browse files Browse the repository at this point in the history
  • Loading branch information
faokryn committed Nov 20, 2014
2 parents f35fb59 + fb33ba3 commit f3822a0
Show file tree
Hide file tree
Showing 18 changed files with 3,617 additions and 41 deletions.
46 changes: 18 additions & 28 deletions hflossk/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
from datetime import datetime

# flask dependencies
from flask import Flask
from flask import jsonify
from flask import Flask, jsonify
from flask.ext.mako import MakoTemplates, render_template
from werkzeug.exceptions import NotFound

Expand All @@ -41,15 +40,15 @@ def inject_yaml():
config = inject_yaml()
COURSE_START = datetime.combine(config['course']['start'], datetime.min.time())
COURSE_END = datetime.combine(config['course']['end'], datetime.max.time())
YAML_LOCATION = os.path.abspath(os.path.join("scripts", "people"))


def gravatar(email):
"""
Get a gravatar for an email address.
I wish I could use libravatar here, but honestly, the students
will be better off using gravatar at this point (due to github
integration :/)
Attempts to use Libravatar by default, but due to Github
integration with Gravatar will fall back onto Gravatar
"""

Expand All @@ -60,7 +59,7 @@ def gravatar(email):
return libravatarURL + slug + "?d=" + gravatarURL + slug


@app.route('/', defaults=dict(page='home'))
@app.route('/', defaults={'page': 'home'})
@app.route('/<page>')
def simple_page(page):
"""
Expand Down Expand Up @@ -104,25 +103,19 @@ def blog_posts(username):

student_data = None

fname = username

for dirpath, dirnames, files in os.walk("scripts/people/"):
for dirpath, dirnames, files in os.walk(YAML_LOCATION):
for fname in files:
if str(username + '.yaml').lower() in fname.lower():
with open(dirpath + '/' + fname) as students:
contents = yaml.load(students)
student_data = contents
if (username + '.yaml').lower() == fname.lower():
with open(os.path.join(dirpath, fname)) as student_file:
student_data = yaml.load(student_file)

num_posts = 0
if 'feed' in student_data:
print("Checking %s's blog feed." % username)
num_posts = count_posts(student_data['feed'], COURSE_START)
return jsonify(number=count_posts(student_data['feed'], COURSE_START))
else:
print("No feed listed for %s!" % username)
raise NotFound()

return jsonify(number=num_posts)


@app.route('/blogs/<year>/<term>/<username>')
@app.route('/participants/<year>/<term>/<username>')
Expand All @@ -132,17 +125,14 @@ def participant_page(year, term, username):
Render a page that shows some stats about the selected participant
"""

participant_data = {}
yaml_dir = 'scripts/people/'
participant_yaml = yaml_dir + year + '/' + term + '/' + username + '.yaml'
with open(participant_yaml) as participant_data:
participant_data = yaml.load(participant_data)

return render_template(
'participant.mak', name='make',
participant_data=participant_data,
gravatar=gravatar
)
person_yaml = os.path.abspath(os.path.join(YAML_LOCATION,
year, term, username + '.yaml'))
with open(person_yaml) as participant_file:
return render_template(
'participant.mak', name='make',
participant_data=yaml.load(participant_file),
gravatar=gravatar
)


@app.route('/oer')
Expand Down
3,310 changes: 3,310 additions & 0 deletions hflossk/static/books/stateoftheCC-2014.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hflossk/static/books/stateoftheCC.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion hflossk/templates/blogs.mak
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<!--<% keys = ['quiz1', 'litreview1', 'bugfix', 'commarchpreso', 'commarchreport', 'teamprop1', 'teamprop2', 'litreview2', 'quiz2'] %>-->
<% if 'hw' not in student: student['hw'] = [] %>
% if student['isActive']:
<% keys = ['quiz1', 'litreview1', 'bugfix', 'teamprop1', 'meetup1', 'commarchreport', 'commarchpreso'] %>
<% keys = ['quiz1', 'litreview1', 'bugfix', 'teamprop1', 'meetup1', 'commarchreport', 'commarchpreso', 'meetup2', 'curriculum', 'smoketest', 'vidreview1', 'vidreview2', 'teamprop2',] %>
% for key in keys:
% if key in student['hw']:
<li><a target="_blank" href="${student['hw'][key] | h}">${key}</a></li>
Expand Down
240 changes: 240 additions & 0 deletions scripts/hfoss-fall-2014-attend.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
###### Attendance for 2014-09-09 ######
anjelz was not in class.
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!


###### Attendance for 2014-09-11 ######
anjelz was not in class.
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was not in class.
snapschott was present!
citruspi was not in class.
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-09-18 ######
anjelz was not in class.
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-09-23 ######
anjelz was not in class.
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was not in class.
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-09-30 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-10-09 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was not in class.
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-10-16 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was not in class.
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was not in class.

###### Attendance for 2014-10-23 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was not in class.
dtendr was present!
snapschott was not in class.
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-10-28 ######
anjelz was not in class.
clumsycat was present!
CactaurMan36 was not in class.
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was not in class.

###### Attendance for 2014-10-30 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was not in class.
citruspi was not in class.
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-11-07 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!

###### Attendance for 2014-11-11 ######
anjelz was present!
clumsycat was present!
CactaurMan36 was present!
KangaReuben was present!
susan was present!
dtendr was present!
snapschott was present!
citruspi was present!
dozendonuts was present!
Faokryn was present!
Lynxfive was present!
xingnx was present!
AnnStan was present!
Honeybunch was present!
MrNex was present!
tcon was present!
dropofwill was present!
Kocsen was present!
2 changes: 2 additions & 0 deletions scripts/people/2014/fall/CactaurMan36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ hw:
curriculum: http://cactaurman36-foss.blogspot.com/2014/10/curriculum-analysis.html
teamprop2: http://cactaurman36-foss.blogspot.com/2014/10/team-proposal-for-xo-project.html
vidreview1: http://cactaurman36-foss.blogspot.com/2014/10/video-review-rip-remix-manifesto.html
smoketest: http://cactaurman36-foss.blogspot.com/2014/10/smoketest-for-xo-laptop.html
vidreview2: http://cactaurman36-foss.blogspot.com/2014/10/video-review-simple-made-easy.html
2 changes: 2 additions & 0 deletions scripts/people/2014/fall/Honeybunch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ hw:
meetup1: http://honeybunchfoss.blogspot.com/2014/10/super-late-roc-py.html
meetup2: http://honeybunchfoss.blogspot.com/2014/10/meetup-2-roc-py.html
vidreview1: http://honeybunchfoss.blogspot.com/2014/10/rip-remix-manifest-vidlit-review.html
smoketest: http://honeybunchfoss.blogspot.com/2014/10/xo-smoke-test.html
vidreview2: http://honeybunchfoss.blogspot.com/2014/10/who-rich-hickey-what-simple-made-easy.html
4 changes: 3 additions & 1 deletion scripts/people/2014/fall/Lynxfive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ hw:
meetup2: http://lynxfive.blogspot.com/2014/10/hudl-presentation.html
curriculum: http://lynxfive.blogspot.com/2014/10/4th-grade-math-curricula-for-ny-and-ma.html
teamprop2: http://lynxfive.blogspot.com/2014/10/xo-team-proposal.html
vidreview1: http://lynxfive.blogspot.com/2014/10/rip-remix-manifesto.html
vidreview1: http://lynxfive.blogspot.com/2014/10/rip-remix-manifesto.html
smoketest: http://lynxfive.blogspot.com/2014/10/xo-smoke-test.html
vidreview2: http://lynxfive.blogspot.com/2014/10/simple-made-easy-vidreview.html
2 changes: 2 additions & 0 deletions scripts/people/2014/fall/MrNex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ hw:
commarchpreso: https://docs.google.com/presentation/d/1ITde9mhXxQ5-e_xwCRvTBWqmZd-Du2RKeqO8r3iWcoQ/edit?usp=sharing
teamprop2: http://nexleveldevelopment.wordpress.com/2014/10/15/team-proposal-2/
vidreview1: http://nexleveldevelopment.wordpress.com/2014/10/19/rip-a-remix-manifesto/
smoketest: http://nexleveldevelopment.wordpress.com/2014/10/27/smoke-test/
vidreview2: http://nexleveldevelopment.wordpress.com/2014/10/29/simple-made-easy-a-review-and-reflection/
19 changes: 13 additions & 6 deletions scripts/people/2014/fall/annstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ irc: AnnStan
name: Jennifer Stanton
rit_dce: jas2715
hw:
litreview1: http://ann-stan.blogspot.com/2014/09/lit-review-what-is-open-source.html
quiz1: http://ann-stan.blogspot.com/2014/09/this-is-quiz-1.html
bugfix: http://ann-stan.blogspot.com/2014/09/bugfix-assignment.html
meetup1: http://ann-stan.blogspot.com/2014/09/irl-rocpy-meeting-916.html
teamprop1: http://ann-stan.blogspot.com/2014/09/team-proposal.html

litreview1: http://ann-stan.blogspot.com/2014/09/lit-review-what-is-open-source.html
quiz1: http://ann-stan.blogspot.com/2014/09/this-is-quiz-1.html
bugfix: http://ann-stan.blogspot.com/2014/09/bugfix-assignment.html
meetup1: http://ann-stan.blogspot.com/2014/09/irl-rocpy-meeting-916.html
teamprop1: http://ann-stan.blogspot.com/2014/09/team-proposal.html
commarchreport: http://ann-stan.blogspot.com/2014/09/community-architecture.html
commarchpreso: https://docs.google.com/presentation/d/1yYUtLupf6jJ1GfbAhk1-S4IdGj1yk4TcSQwbmNNswRI/edit?usp=sharing
hackathon1: http://ann-stan.blogspot.com/2014/09/girl-develop-it-launch-party.html
curriculum: http://ann-stan.blogspot.com/2014/10/4th-grade-math-curriculum.html
teamprop2: http://ann-stan.blogspot.com/2014/10/team-proposal-final-project.html
vidreview1: http://ann-stan.blogspot.com/2014/10/vid-review-rip-remix-manifesto.html
smoketest: http://ann-stan.blogspot.com/2014/10/smoke-test.html
vidreview2: http://ann-stan.blogspot.com/2014/10/vid-review-2-simple-made-easy.html
Loading

0 comments on commit f3822a0

Please sign in to comment.