kylewm / redwind Goto Github PK
View Code? Open in Web Editor NEWFlask-based personal website #IndieWeb #OwnYourData
License: Other
Flask-based personal website #IndieWeb #OwnYourData
License: Other
Same as install.py in #49, run.py is still using "from redwind import app" and needs to be changed.
Probably want to apply the same rules we apply to linkifying urls.
See: https://dubiousdod.org/indie/2014/11/in-order-to-figure-out-redwind-s-models-and-sqlalchemy
cc: @thedod
Attempted to fix in #68, but using brevity was suggested instead.
For example, http://lancey.space would not be parsed as a link
Uploading an image with a post and saving that post as a draft inserts the markdown into the content, but does not include the image in the draft. Publishing the draft does not include the image either.
Instead of deleting the old one and adding a new one.
Not sure if intended, but putting a hashtag at the start of a note parses it as a header in markdown rather than a tag and removes the hash sign in the post and when it's syndicated to Twitter (and other silos).
Auto select syndication targets based on the reply-to/like-of/etc. URL. If it's an original post, check its u-syndication URLs
install.py for redwind was never updated when you started using application factories and doesn't work anymore (can't import app or db from redwind).
thanks for the heads up @Lancey6!
If you repost a note without a Twitter syndication link and share it to Twitter, the post's raw HTML is tweeted. Additionally, any images will not be included in the tweet.
For example, this post: http://lancey.space/2015/08/repost-of-kyle-mahan-literally-united-is-pleased
Repost of this post: https://kylewm.com/2015/08/literally-united-is-pleased-to-offer-me-to-play-games
The original post does not have a Twitter syndication link (but does have an instagram synd link). Attempting to share the post on Twitter gets this as the preview:
Kyle Mahan: <p>Literally, United is pleased to offer me to play games on my phone</p>
<a… https://kylewm.com/2015/08/literally-united-is-pleased-to-offer-me-to-play-games
@aaronpk got an opaque error (500) when trying to micropub authenticate on kylewm.com.
2014-06-28 21:55:10,987 - redwind - WARNING - could not get access token <Response [500]>: <html><head><title>Slim Application Error</title><sty
le>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}
strong{display:inline-block;width:65px;}</style></head><body><h1>Slim Application Error</h1><p>The application could not run because of the foll
owing error:</p><h2>Details</h2><div><strong>Type:</strong> ErrorException</div><div><strong>Code:</strong> 8</div><div><strong>Message:</strong
> Undefined index: state</div><div><strong>File:</strong> /web/sites/tokens.indieauth.com/controllers/controller.php</div><div><strong>Line:</st
rong> 43</div><h2>Trace</h2><pre><div>#0 /web/sites/tokens.indieauth.com/controllers/controller.php(43): Slim\Slim::handleErrors(8, 'Undefined i
ndex...', '/web/sites/toke...', 43, Array)
Unpublishing a post, i.e. resaving it as a draft, is (oddly) more destructive than just deleting it because it overwrites the permalink path with the drafts/hash path. And re-publishing it will update the day/time to right now and update the permalink accordingly, so that it's very difficult to ever get it back to its original permalink.
This is probably the desired behavior if you accidentally clicked "Publish" 5 minutes ago, and want a little more time to edit. But if you Unpublish an older post, it could be pretty bad and I'm not totally sure how to fix it. Perhaps draft_path
should be a separate DB field.
e.g. @thedod's avatar's transparent background gets uglified when resized by PIL
currently does not recognize (h/t @Nickname). Check for colons, commas, semicolons, etc. too.
this way a page's contents will stay constant
probably need a picture and/or attribution next to each "activity"
just fyi, the rel-alternate links in your atom feed are empty, e.g.:
<entry>
<updated>2014-03-07T09:31:00Z</updated>
<published>2014-03-07T09:31:00Z</published>
<link href="" rel="alternate" type="text/html"/>
...
that means when you "open" a post in a feed reader, it tries to open the feed itself.
just a heads up. thanks for publishing the feed, btw!
Different text if the post:
The one wrinkle is that plugins depend on this button text (hacky yes I know) to determine whether to fire some behaviors. twitter.py checks that action = 'Publish + Tweet'
to decide it should automatically tweet.
I'd guess there is a way in HTML to set the action and displayed button text to different values (e.g. value="publish_and_tweet", display="Republish & Tweet"), and only the display text would change in different contexts.
Suggested by @thedod in https://github.com/thedod/redwind/wiki
State-sensitive GUI: create/edit GUI always shows publish publish+tweet publish quietly save draft regardless of whether item was already published (should say update update and republish) or a draft (no indication when I view a draft that users can't see it), etc.
Most modern silos support photo posts with multiple pictures, but Redwind barely does. While the infrastructure is in place, you can't upload more than 1 picture to a post at a time, and our current silo plugins do not support POSSEing with more than 1 picture on a post.
Additionally, any contexts pulled from a silo post that has more than 1 picture only appears to retrieve the first picture in the post.
Just pulled the new queue, and maybe I did something wrong, but the jobs don't get executed.
Took time to notice, but I got about 50 of them with a False complete.
Specifically, this page: https://gigaom.com/2015/08/24/hypertext-50/
The og tags are there but they're not being read.
as in, we need some.
The fix of #12 only addresses some of the incidents of "not what I wanted to tweet" (I keep having those).
Here's what I suggest (I can write it if you agree in principle):
publish+tweet
to simply open the tweet form (filled with "best guess") and let the user review/edit it in order to minimize shame 😉.prevent me from looking like I am talking to myself tweeting things like "Thanks!" to no one
looks like maybe not: https://kylewm.com/2015/11/sf-homebrew-website-club-1
low priority, obviously!
e.g.,
https://brid-gy.appspot.com/rsvp/facebook/12802152/1565113317092307/10101508925782433
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bridgy Response</title>
<style type="text/css">
.u-uid { display: none; }
</style>
</head>
<article class="h-entry">
<span class="u-uid">tag:facebook.com,2013:1565113317092307_rsvp_10101508925782433</span>
<div class="p-name"><a class="u-url" href="https://www.facebook.com/1565113317092307#10101508925782433">invited</a></div>
<div class="">
<div class="h-card p-invitee">
<div class="p-name"><a class="u-url" href="https://www.facebook.com/10101508925782433">Tantek Çelik</a></div>
<img class="u-photo" src="https://graph.facebook.com/v2.2/10101508925782433/picture?type=large" alt="" />
</div>
</div>
<a class="u-in-reply-to" href="https://indiewebcamp.com/events/2015-03-25-homebrew-website-club"></a>
<a class="u-in-reply-to" href="https://kylewm.com/2015/03/homebrew-website-club-2015-march-25"></a>
</article>
</html>
ref: http://indiewebcamp.com/irc/2014-12-26#t1419642978954
https://indiewebcamp.com/reply-context#CRUD
Thanks @tantek for pointing this out!
Looks like the maps module is hard coded to use kylewm.com to render its maps. While this works fine for early testing and adoption, we should consider moving away from it.
return imageproxy.construct_url(
'http://static-maps.kylewm.com/img.php?'
+ urllib.parse.urlencode(args))
When a Red Wind post receives a webmention of from an indie like, Red Wind should de-duplicate it with any likes of the silo copy of that Red Wind post, and vice versa, always preferring the indie like, and showing it as one like, not two.
E.g. real world example of a Red Wind post with an indie like:
There should be enough information there to de-dup that into displaying a single like on the Red Wind post.
Contexts don't get the same treatment as the content of a post, meaning that @-names and links aren't parsed.
For example, @TwitterUser!
would not be parsed as a Twitter handle. Not sure if this works for all punctuation, but it looks like a regex error.
Attempting to share this page causes an error on my Redwind instance. This might be related to something I'm doing but it's worth looking into anyway.
Here's my log:
[Wed Sep 30 15:36:44.005258 2015] [wsgi:error] [pid 10901:tid 139663761188608] 2015-09-30 15:36:43,974 - redwind - ERROR - Exception on /share_on_twitter [GET]
[Wed Sep 30 15:36:44.005289 2015] [wsgi:error] [pid 10901:tid 139663761188608] Traceback (most recent call last):
[Wed Sep 30 15:36:44.005296 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask/app.py", line 1817, in wsgi_app
[Wed Sep 30 15:36:44.005302 2015] [wsgi:error] [pid 10901:tid 139663761188608] response = self.full_dispatch_request()
[Wed Sep 30 15:36:44.005307 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask/app.py", line 1477, in full_dispatch_request
[Wed Sep 30 15:36:44.005313 2015] [wsgi:error] [pid 10901:tid 139663761188608] rv = self.handle_user_exception(e)
[Wed Sep 30 15:36:44.005318 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask/app.py", line 1381, in handle_user_exception
[Wed Sep 30 15:36:44.005324 2015] [wsgi:error] [pid 10901:tid 139663761188608] reraise(exc_type, exc_value, tb)
[Wed Sep 30 15:36:44.005329 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask/_compat.py", line 33, in reraise
[Wed Sep 30 15:36:44.005334 2015] [wsgi:error] [pid 10901:tid 139663761188608] raise value
[Wed Sep 30 15:36:44.005339 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask/app.py", line 1475, in full_dispatch_request
[Wed Sep 30 15:36:44.005345 2015] [wsgi:error] [pid 10901:tid 139663761188608] rv = self.dispatch_request()
[Wed Sep 30 15:36:44.005350 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask/app.py", line 1461, in dispatch_request
[Wed Sep 30 15:36:44.005355 2015] [wsgi:error] [pid 10901:tid 139663761188608] return self.view_functions[rule.endpoint](**req.view_args)
[Wed Sep 30 15:36:44.005360 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/flask_login.py", line 758, in decorated_view
[Wed Sep 30 15:36:44.005365 2015] [wsgi:error] [pid 10901:tid 139663761188608] return func(*args, **kwargs)
[Wed Sep 30 15:36:44.005370 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/webapps/redwind/htdocs/redwind/plugins/twitter.py", line 196, in share_on_twitter
[Wed Sep 30 15:36:44.005375 2015] [wsgi:error] [pid 10901:tid 139663761188608] preview, _ = guess_raw_share_tweet_content(post)
[Wed Sep 30 15:36:44.005381 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/webapps/redwind/htdocs/redwind/plugins/twitter.py", line 477, in guess_raw_share_tweet_content
[Wed Sep 30 15:36:44.005386 2015] [wsgi:error] [pid 10901:tid 139663761188608] imgs = list(collect_images(context))
[Wed Sep 30 15:36:44.005391 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/webapps/redwind/htdocs/redwind/plugins/twitter.py", line 116, in collect_images
[Wed Sep 30 15:36:44.005396 2015] [wsgi:error] [pid 10901:tid 139663761188608] soup = BeautifulSoup(html)
[Wed Sep 30 15:36:44.005408 2015] [wsgi:error] [pid 10901:tid 139663761188608] File "/home/lancey/lib/python3.4/bs4/__init__.py", line 162, in __init__
[Wed Sep 30 15:36:44.005413 2015] [wsgi:error] [pid 10901:tid 139663761188608] elif len(markup) <= 256:
[Wed Sep 30 15:36:44.005420 2015] [wsgi:error] [pid 10901:tid 139663761188608] TypeError: object of type 'NoneType' has no len()
[Wed Sep 30 15:36:44.005432 2015] [wsgi:error] [pid 10901:tid 139663761188608]
This should be a simple one line fix.
Consider: you write half of an article, save as a draft, write a bunch of notes, finish the draft and publish. Unfortunately right now, the published date would still be stuck at the original save date, and it would be buried under all the notes.
What I'd really like is for drafts to have no published date, and hang out off to the side somewhere (or in a private feed). That is to say, drafts would never show in the primary stream at all, even when logged in.
Right now maps.py calls out to static-maps.kylewm.com to generate a map image, and then saves it to /static/. This is really a special case of the work that imageproxy does, it would make sense to just run the call to static-maps through imageproxy instead.
When you edit an article with quotation marks (") in the title, the quotation mark and anything afterward is cut off. Saving the post replaces the title with the truncated version. The post title appears fine on the site itself and on the drafts page.
For example, This is "my" article
will be changed to This is
sending webmentions when a post is deleted should be easy
sending them when a link is removed/changed would require a little work to grab the set of links before and after the edit.
temporarily store the status of background jobs (publish to twitter etc.) and make it accessible somewhere on the permalink page (for logged in users only, of course)
I think there is some kind of race condition in the flask_themes2 library, where very occasionally its dictionary won't be filled in by the time the view is trying to render.
2015-06-03 05:35:51,362 - redwind - ERROR - Exception on /tags/hypocrisy [GET]
Traceback (most recent call last):
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./redwind/views.py", line 246, in posts_by_tag
return render_posts(title, posts, older)
File "./redwind/views.py", line 156, in render_posts
atom_title=atom_title, events=events)
File "./redwind/util.py", line 432, in render_themed
return render_theme_template(get_theme(ident), template, **context)
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask_themes2/__init__.py", line 147, in get_theme
return ctx.app.theme_manager.themes[ident]
KeyError: 'oldskool'
See log
When a post ends in a link (e.g. to YouTube), it would be nice to set the "link" field so that we get an inline preview of the content on FB.
@thedod is still seeing (many) duplicate tags created with the same name (same capitalization and everything).
I would have expected https://github.com/kylewm/redwind/blob/master/redwind/views.py#L888 to properly reuse an existing tag if possible
There's an overlap between pages of posts, where the last posts on one page also appear as the first posts on the next page. This doesn't happen all the time, and the number of posts that overlap between pages varies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.