Compare commits
12 commits
Author | SHA1 | Date | |
---|---|---|---|
62ccaefb27 | |||
![]() |
0d16b1ef88 | ||
![]() |
6d89600ec1 | ||
![]() |
32b1505498 | ||
![]() |
bfc1aa2e75 | ||
![]() |
9e60633973 | ||
![]() |
56927d4224 | ||
![]() |
2e53fd9527 | ||
![]() |
28c1ab5058 | ||
![]() |
dcf195d2c1 | ||
![]() |
9de0892cfc | ||
![]() |
e05e33f14b |
12 changed files with 48 additions and 20 deletions
|
@ -5,7 +5,7 @@ window.loadIndieConfig = (function () {
|
||||||
// Indie-Config Loading script
|
// Indie-Config Loading script
|
||||||
// by Pelle Wessman, voxpelli.com
|
// by Pelle Wessman, voxpelli.com
|
||||||
// MIT-licensed
|
// MIT-licensed
|
||||||
// http://indiewebcamp.com/indie-config
|
// https://indieweb.org/indie-config
|
||||||
|
|
||||||
var config, configFrame, configTimeout,
|
var config, configFrame, configTimeout,
|
||||||
callbacks = [],
|
callbacks = [],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
asyncio-redis==0.14.2
|
asyncio-redis==0.14.2
|
||||||
beautifulsoup4==4.4.1
|
beautifulsoup4==4.6.0
|
||||||
bleach==1.4.3
|
bleach==2.0.0
|
||||||
blinker==1.4
|
blinker==1.4
|
||||||
certifi==2015.04.28 # rq.filter: <=2015.04.28
|
certifi==2015.04.28 # rq.filter: <=2015.04.28
|
||||||
cffi==1.6.0
|
cffi==1.6.0
|
||||||
|
@ -12,7 +12,7 @@ Flask-DebugToolbar==0.10.0
|
||||||
Flask-Login==0.3.2
|
Flask-Login==0.3.2
|
||||||
Flask-Micropub==0.2.6
|
Flask-Micropub==0.2.6
|
||||||
Flask-SQLAlchemy==2.1
|
Flask-SQLAlchemy==2.1
|
||||||
html5lib==0.9999999
|
html5lib==0.999999999
|
||||||
idna==2.1
|
idna==2.1
|
||||||
itsdangerous==0.24
|
itsdangerous==0.24
|
||||||
Jinja2==2.8
|
Jinja2==2.8
|
||||||
|
@ -31,7 +31,8 @@ rq==0.5.6
|
||||||
sgmllib3k==1.0.0
|
sgmllib3k==1.0.0
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
SQLAlchemy==1.0.13
|
SQLAlchemy==1.0.13
|
||||||
uWSGI==2.0.12 # rq.filter: <=2.0.12
|
uWSGI==2.0.15
|
||||||
websockets==3.1
|
websockets==3.1
|
||||||
Werkzeug==0.11.9
|
Werkzeug==0.11.9
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
|
raven==6.1.0
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,5 +7,5 @@ setup(name='Woodwind',
|
||||||
description='Stream-style indieweb reader',
|
description='Stream-style indieweb reader',
|
||||||
author='Kyle Mahan',
|
author='Kyle Mahan',
|
||||||
author_email='kyle@kylewm.com',
|
author_email='kyle@kylewm.com',
|
||||||
url='https://indiewebcamp.com/Woodwind',
|
url='https://indieweb.org/Woodwind',
|
||||||
packages=['woodwind'])
|
packages=['woodwind'])
|
||||||
|
|
9
vacuum.sql
Normal file
9
vacuum.sql
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
DELETE FROM entry
|
||||||
|
USING (
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY feed_id ORDER BY retrieved DESC) AS row
|
||||||
|
FROM entry
|
||||||
|
) AS numbered
|
||||||
|
WHERE entry.id = numbered.id
|
||||||
|
AND (row > 2000 OR retrieved < CURRENT_DATE - INTERVAL '365 days');
|
|
@ -1,3 +1,4 @@
|
||||||
|
from raven.contrib.flask import Sentry
|
||||||
from woodwind import extensions
|
from woodwind import extensions
|
||||||
from woodwind.api import api
|
from woodwind.api import api
|
||||||
from woodwind.push import push
|
from woodwind.push import push
|
||||||
|
@ -20,6 +21,8 @@ Message:
|
||||||
%(message)s
|
%(message)s
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
sentry = Sentry()
|
||||||
|
|
||||||
|
|
||||||
def create_app(config_path='../woodwind.cfg'):
|
def create_app(config_path='../woodwind.cfg'):
|
||||||
app = flask.Flask('woodwind')
|
app = flask.Flask('woodwind')
|
||||||
|
@ -38,6 +41,8 @@ def configure_logging(app):
|
||||||
|
|
||||||
app.logger.setLevel(logging.DEBUG)
|
app.logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
sentry.init_app(app, dsn=app.config.get('SENTRY_DSN'), logging=True, level=logging.WARNING)
|
||||||
|
|
||||||
handler = logging.StreamHandler(sys.stdout)
|
handler = logging.StreamHandler(sys.stdout)
|
||||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||||
handler.setFormatter(formatter)
|
handler.setFormatter(formatter)
|
||||||
|
|
|
@ -5,7 +5,7 @@ window.loadIndieConfig = (function () {
|
||||||
// Indie-Config Loading script
|
// Indie-Config Loading script
|
||||||
// by Pelle Wessman, voxpelli.com
|
// by Pelle Wessman, voxpelli.com
|
||||||
// MIT-licensed
|
// MIT-licensed
|
||||||
// http://indiewebcamp.com/indie-config
|
// https://indieweb.org/indie-config
|
||||||
|
|
||||||
var config, configFrame, configTimeout,
|
var config, configFrame, configTimeout,
|
||||||
callbacks = [],
|
callbacks = [],
|
||||||
|
|
|
@ -397,14 +397,21 @@ def process_xml_feed_for_new_entries(feed, content, backfill, now):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if 'updated_parsed' in p_entry and p_entry.updated_parsed:
|
if 'updated_parsed' in p_entry and p_entry.updated_parsed:
|
||||||
updated = datetime.datetime.fromtimestamp(
|
try:
|
||||||
time.mktime(p_entry.updated_parsed))
|
updated = datetime.datetime.fromtimestamp(
|
||||||
|
time.mktime(p_entry.updated_parsed))
|
||||||
|
except:
|
||||||
|
current_app.logger.debug('mktime failed with updated timestamp: %v', p_entry.updated_parsed)
|
||||||
else:
|
else:
|
||||||
updated = None
|
updated = None
|
||||||
|
|
||||||
if 'published_parsed' in p_entry and p_entry.published_parsed:
|
if 'published_parsed' in p_entry and p_entry.published_parsed:
|
||||||
published = datetime.datetime.fromtimestamp(
|
try:
|
||||||
time.mktime(p_entry.published_parsed))
|
published = datetime.datetime.fromtimestamp(
|
||||||
|
time.mktime(p_entry.published_parsed))
|
||||||
|
except:
|
||||||
|
current_app.logger.debug('mktime failed with published timestamp: %v', p_entry.published_parsed)
|
||||||
|
published = updated
|
||||||
else:
|
else:
|
||||||
published = updated
|
published = updated
|
||||||
|
|
||||||
|
@ -526,6 +533,13 @@ def hentry_to_entry(hentry, feed, backfill, now):
|
||||||
author_photo = author.get('photo')
|
author_photo = author.get('photo')
|
||||||
author_url = author.get('url')
|
author_url = author.get('url')
|
||||||
|
|
||||||
|
if author_name and len(author_name) > Entry.author_name.property.columns[0].type.length:
|
||||||
|
author_name = None
|
||||||
|
if author_photo and len(author_photo) > Entry.author_photo.property.columns[0].type.length:
|
||||||
|
author_photo = None
|
||||||
|
if author_url and len(author_url) > Entry.author_url.property.columns[0].type.length:
|
||||||
|
author_url = None
|
||||||
|
|
||||||
entry = Entry(
|
entry = Entry(
|
||||||
uid=uid,
|
uid=uid,
|
||||||
retrieved=retrieved,
|
retrieved=retrieved,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css', version='2016-03-08') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css', version='2016-03-08') }}"/>
|
||||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/>
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/>
|
||||||
|
|
||||||
<link rel="manifest" href="/manifest.json"/>
|
<link rel="manifest" href="/manifest.json"/>
|
||||||
|
|
||||||
<script src="/node_modules/jquery/dist/jquery.js"></script>
|
<script src="/node_modules/jquery/dist/jquery.js"></script>
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
<input type="hidden" name="next" placeholder="{{ request.path }}" />
|
<input type="hidden" name="next" placeholder="{{ request.path }}" />
|
||||||
<button style="text-align: right;" type="submit">Login</button>
|
<button style="text-align: right;" type="submit">Login</button>
|
||||||
</form>
|
</form>
|
||||||
Your Woodwind account is tied to your personal domain name. Check out IndieWebCamp's <a href="http://indiewebcamp.com/Getting_Started" target="_blank">Getting Started</a> page for details.
|
Your Woodwind account is tied to your personal domain name. Check out the IndieWeb's <a href="https://indieweb.org/Getting_Started" target="_blank">Getting Started</a> page for details.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock login %}
|
{% endblock login %}
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
{% block foot %}{% endblock %}
|
{% block foot %}{% endblock %}
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
Woodwind is <a href="https://github.com/kylewm/woodwind">on GitHub</a>. Have any problems? File an issue or come chat in <code>#indiewebcamp</code> on Freenode IRC.
|
Woodwind is <a href="https://github.com/kylewm/woodwind">on GitHub</a>. Have any problems? File an issue or come chat in <code>#indieweb</code> on Freenode IRC.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
<p>
|
<p>
|
||||||
<input type="radio" id="reply-method-micropub" name="reply-method" value="micropub" {% if reply_method == 'micropub' %}checked{% endif %}/>
|
<input type="radio" id="reply-method-micropub" name="reply-method" value="micropub" {% if reply_method == 'micropub' %}checked{% endif %}/>
|
||||||
<label for="reply-method-micropub">Micropub.</label>
|
<label for="reply-method-micropub">Micropub.</label>
|
||||||
Each post will have Like, Repost, and Reply buttons that will post content to your site directly via micropub. See <a href="https://indiewebcamp.com/Micropub">Micropub</a> for details.
|
Each post will have Like, Repost, and Reply buttons that will post content to your site directly via micropub. See <a href="https://indieweb.org/Micropub">Micropub</a> for details.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="radio" id="reply-method-indie-config" name="reply-method" value="indie-config" {% if reply_method == 'indie-config' %}checked{% endif %}/>
|
<input type="radio" id="reply-method-indie-config" name="reply-method" value="indie-config" {% if reply_method == 'indie-config' %}checked{% endif %}/>
|
||||||
<label for="reply-method-indie-config">Indie-config.</label>
|
<label for="reply-method-indie-config">Indie-config.</label>
|
||||||
Clicking an indie-action link will invoke your <code>web+action</code> handler if registered. See <a href="https://indiewebcamp.com/indie-config">indie-config</a> for details.
|
Clicking an indie-action link will invoke your <code>web+action</code> handler if registered. See <a href="https://indieweb.org/indie-config">indie-config</a> for details.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="radio" id="reply-method-action-urls" name="reply-method" value="action-urls" {% if reply_method == 'action-urls' %}checked{% endif %}/>
|
<input type="radio" id="reply-method-action-urls" name="reply-method" value="action-urls" {% if reply_method == 'action-urls' %}checked{% endif %}/>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- reply via indie-config -->
|
<!-- reply via indie-config -->
|
||||||
<h2>Indie-Config</h2>
|
<h2>Indie-Config</h2>
|
||||||
<p>
|
<p>
|
||||||
Clicking an indie-action link will invoke your <code>web+action</code> handler if registered. See <a href="https://indiewebcamp.com/indie-config">indie-config</a> for details.
|
Clicking an indie-action link will invoke your <code>web+action</code> handler if registered. See <a href="https://indieweb.org/indie-config">indie-config</a> for details.
|
||||||
</p>
|
</p>
|
||||||
{% set selectedActions = settings.get('indie-config-actions', []) %}
|
{% set selectedActions = settings.get('indie-config-actions', []) %}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- reply via micropub -->
|
<!-- reply via micropub -->
|
||||||
<h2>Micropub</h2>
|
<h2>Micropub</h2>
|
||||||
<p>
|
<p>
|
||||||
Each post will have Like, Repost, and Reply buttons that will post content to your site directly via micropub. See <a href="https://indiewebcamp.com/Micropub">Micropub</a> for details.
|
Each post will have Like, Repost, and Reply buttons that will post content to your site directly via micropub. See <a href="https://indieweb.org/Micropub">Micropub</a> for details.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Configure micropub credentials.
|
Configure micropub credentials.
|
||||||
|
|
|
@ -381,8 +381,7 @@ def update_micropub_syndicate_to():
|
||||||
flask_login.current_user.set_setting('syndicate-to', syndicate_tos)
|
flask_login.current_user.set_setting('syndicate-to', syndicate_tos)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
flask.flash('Could not parse syndicate-to response: {}'.format(e)
|
flask.flash('Could not parse syndicate-to response: {}'.format(e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@views.route('/deauthorize')
|
@views.route('/deauthorize')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue