From ecb2b8ed7a89710d1333d2e03f7b0b4bc9e3e379 Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Mon, 15 Feb 2016 10:07:34 -0800 Subject: [PATCH] support u-photo outside of the e-content --- deploy.sh | 2 +- requirements.txt | 29 +++++++++++++++++++---------- woodwind/tasks.py | 2 +- woodwind/templates/_entry.jinja2 | 12 ++++++++++-- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/deploy.sh b/deploy.sh index 6afb0be..668e576 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,7 +2,7 @@ REMOTE_USER=kmahan HOST=orin.kylewm.com -REMOTE_PATH=/srv/www/kylewm.com/woodwind +REMOTE_PATH=/srv/www/woodwind.xyz/woodwind ssh $REMOTE_USER@$HOST bash -c "' diff --git a/requirements.txt b/requirements.txt index 10fe0b1..d8ef943 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,28 +1,37 @@ +asyncio-redis==0.14.2 +beautifulsoup4==4.4.1 +bleach==1.4.2 +blinker==1.4 +certifi==2015.11.20.1 +cffi==1.5.0 +click==6.2 +cryptography==1.2.1 +feedparser==5.2.1 Flask==0.10.1 Flask-DebugToolbar==0.10.0 Flask-Login==0.3.2 Flask-Micropub==0.2.5 Flask-SQLAlchemy==2.1 +html5lib==0.9999999 +idna==2.0 +itsdangerous==0.24 Jinja2==2.8 MarkupSafe==0.23 -SQLAlchemy==1.0.11 -Werkzeug==0.11.3 -asyncio-redis==0.14.2 -beautifulsoup4==4.4.1 -bleach==1.4.2 -feedparser==5.2.1 -html5lib==0.9999999 mf2py==1.0.2 -mf2util==0.2.11 -ndg-httpsclient==0.4.0 +mf2util==0.2.12 psycopg2==2.6.1 -pyOpenSSL==0.15.1 pyasn1==0.1.9 +pycparser==2.14 +pyOpenSSL==0.15.1 pyquerystring==1.0.2 pytz==2015.7 redis==2.10.5 requests==2.9.1 rq==0.5.6 +sgmllib3k==1.0.0 six==1.10.0 +SQLAlchemy==1.0.11 uWSGI==2.0.12 websockets==3.0 +Werkzeug==0.11.3 +wheel==0.24.0 diff --git a/woodwind/tasks.py b/woodwind/tasks.py index f8ef6c4..1602745 100644 --- a/woodwind/tasks.py +++ b/woodwind/tasks.py @@ -506,7 +506,7 @@ def hentry_to_entry(hentry, feed, backfill, now): if 'url' in value]) # simple properties, just transfer them over wholesale - for prop in ('syndication', 'location'): + for prop in ('syndication', 'location', 'photo'): value = hentry.get(prop) if value: entry.set_property(prop, value) diff --git a/woodwind/templates/_entry.jinja2 b/woodwind/templates/_entry.jinja2 index d4ff5b8..62a2c9f 100644 --- a/woodwind/templates/_entry.jinja2 +++ b/woodwind/templates/_entry.jinja2 @@ -45,6 +45,14 @@ {% if entry.title %}

{{ entry.title }}

{% endif %} + + {% set photo = entry.get_property('photo') %} + {% if photo and (not entry.content or ' + + + {% endif %} + {% if entry.content %}
{{ entry.content_cleaned | proxy_all | add_preview }} @@ -59,7 +67,7 @@ @ {% if 'url' in location %}{{ location.name }}{% else %}{{ location.name }}{% endif %}
{% endif %} - + - {% if entry.get_property('syndication') %} + {% if entry.get_property('syndication') %} | {% for synd in entry.get_property('syndication') %} {{ synd | domain_for_url}}{% endfor %} {% endif %}