|
|
@ -21,9 +21,12 @@ def list_headlines(articles):
|
|
|
|
|
|
|
|
|
|
|
|
def retrieve_article(page):
|
|
|
|
def retrieve_article(page):
|
|
|
|
text = []
|
|
|
|
text = []
|
|
|
|
with open(loc + page) as f:
|
|
|
|
string = ""
|
|
|
|
text = f.readlines()
|
|
|
|
with open(loc + str(page)) as f:
|
|
|
|
return text
|
|
|
|
text = f.readlines()
|
|
|
|
|
|
|
|
for line in text:
|
|
|
|
|
|
|
|
string += line
|
|
|
|
|
|
|
|
return string
|
|
|
|
|
|
|
|
|
|
|
|
def list_snippets(articles):
|
|
|
|
def list_snippets(articles):
|
|
|
|
limit = 4
|
|
|
|
limit = 4
|
|
|
@ -136,14 +139,12 @@ def diary(page):
|
|
|
|
|
|
|
|
|
|
|
|
@route('/diary/entries/<page:int>')
|
|
|
|
@route('/diary/entries/<page:int>')
|
|
|
|
def entry(page):
|
|
|
|
def entry(page):
|
|
|
|
info = {'css': 'box', 'title': 'blessfrey - credits', 'year': datetime.datetime.now()}
|
|
|
|
"""diary entry"""
|
|
|
|
|
|
|
|
info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'entry': retrieve_article(page), 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page}
|
|
|
|
abs_app_dir_path = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
abs_app_dir_path = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
abs_views_path = os.path.join(abs_app_dir_path, 'views')
|
|
|
|
abs_views_path = os.path.join(abs_app_dir_path, 'views')
|
|
|
|
TEMPLATE_PATH.insert(0, abs_views_path )
|
|
|
|
TEMPLATE_PATH.insert(0, abs_views_path )
|
|
|
|
return template(os.path.join(abs_views_path,'contact.tpl'), info)
|
|
|
|
return template(os.path.join(abs_views_path,'feature.tpl'), info)
|
|
|
|
# """diary entry"""
|
|
|
|
|
|
|
|
# info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'entry': retrieve_article(page), 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page}
|
|
|
|
|
|
|
|
# return template('feature.tpl', info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@route('/box')
|
|
|
|
@route('/box')
|
|
|
|
def box():
|
|
|
|
def box():
|
|
|
|