cleverdevil / indiepaper Goto Github PK
View Code? Open in Web Editor NEWA "read later" service for the IndieWeb using Micropub
License: MIT License
A "read later" service for the IndieWeb using Micropub
License: MIT License
Add the ability to submit a list of categories when submitting a link to Indiepaper via the API. The categories will be added as category
properties in the MF2 JSON category
property. This will drive enhancements to the macOS app, bookmarklet, and iOS Workflow/Shortcut.
(Originally published at: https://cleverdevil.io/2018/add-support-for-categorizing-submitted-links)
If the page has mf2, that is likely to be much better data than what Mercury finds. Indiepaper should first check if it finds an article via mf2, and if it doesn't, then can use Mercury to extract what it can.
The IndieAuth prompt will look better if it can show the application name and icon. This is just a matter of adding a bit of Microformats to your application's home page. https://indieweb.org/h-x-app
I've tried both the default and a custom-created bookmarklet (using my own access token and endpoint). Neither work. Clicking on the button does nothing. No alerts, no errors.
I have several other bookmarklets tied to my WordPress site which work just fine and open various posting windoes. IndiePaper doesn't seem to be doing anything.
So I found an issue with the fact that we now parse mf2 before using mercury. Some pages have very minimal mf2. Enough mf2 to break things.
This article: https://www.swiftbysundell.com/posts/subclass-free-view-controllers-in-swift
Has so little mf2 that when I try to use IndiePaper it grabs the mf2 but it breaks because it doesn't have enough to make an actual post. You'll probably want a set of require mf2 attributes that if they aren't met, you'll still use the mercury fallback.
When using the bookmarklet there is no confirmation that anything happened the way there is with Instapaper which says "Saved" when run. Something like that would be much appreciated!
I successfully logged in using IndieAuth off of my site, but I am simply taken back to the login page without any indication as to whether or not the login was successful, and no errors. The url indicates success, but nothing else. Here is where I end up
If using i.e. https://indiepaper.io/indieauth/?me=jvt.me, we get the following response back
HTTP/2 500
content-type: application/json
content-length: 2522
date: Wed, 18 Mar 2020 20:43:28 GMT
x-amzn-requestid: 7714f99a-cbfd-40fd-95cc-7c66938d1e96
x-amz-apigw-id: JmotqG_yIAMFRDQ=
x-amzn-trace-id: Root=1-5e7287f0-f510fdc0bc98d77480797090;Sampled=0
x-cache: Error from cloudfront
via: 1.1 3059f113464f0880a3b72a834c64f65f.cloudfront.net (CloudFront)
x-amz-cf-pop: MAN50-C3
x-amz-cf-id: MFwQar4YnAr7X1ZUMSsHiL7M8L4oOiql8GlNoOB0nwKacvtakI73fQ==
"{'message': 'An uncaught exception happened while servicing this request. You can investigate this with the `zappa tail` command.', 'traceback': ['Traceback (most recent call last):\\n', ' File \"/var/task/handler.py\", line 505, in handler\\n response = Response.from_app(self.wsgi_app, environ)\\n', ' File \"/var/task/werkzeug/wrappers.py\", line 939, in from_app\\n return cls(*_run_wsgi_app(app, environ, buffered))\\n', ' File \"/var/task/werkzeug/test.py\", line 923, in run_wsgi_app\\n app_rv = app(environ, start_response)\\n', ' File \"/var/task/zappa/middleware.py\", line 70, in __call__\\n response = self.application(environ, encode_response)\\n', ' File \"/var/task/beaker/middleware.py\", line 156, in __call__\\n return self.wrap_app(environ, session_start_response)\\n', ' File \"/var/task/pecan/middleware/recursive.py\", line 56, in __call__\\n return self.application(environ, start_response)\\n', ' File \"/var/task/pecan/core.py\", line 840, in __call__\\n return super(Pecan, self).__call__(environ, start_response)\\n', ' File \"/var/task/pecan/core.py\", line 683, in __call__\\n self.invoke_controller(controller, args, kwargs, state)\\n', ' File \"/var/task/pecan/core.py\", line 574, in invoke_controller\\n result = controller(*args, **kwargs)\\n', ' File \"/var/task/indiepaper/controllers/indieauth.py\", line 26, in index\\n indieauth.request_authorization(me, session[\\'state\\'])\\n', ' File \"/var/task/indiepaper/indieauth.py\", line 34, in request_authorization\\n endpoints = discover_endpoints(me)\\n', ' File \"/var/task/indiepaper/indieauth.py\", line 10, in discover_endpoints\\n response = requests.get(me)\\n', ' File \"/var/task/requests/api.py\", line 72, in get\\n return request(\\'get\\', url, params=params, **kwargs)\\n', ' File \"/var/task/requests/api.py\", line 58, in request\\n return session.request(method=method, url=url, **kwargs)\\n', ' File \"/var/task/requests/sessions.py\", line 498, in request\\n prep = self.prepare_request(req)\\n', ' File \"/var/task/requests/sessions.py\", line 441, in prepare_request\\n hooks=merge_hooks(request.hooks, self.hooks),\\n', ' File \"/var/task/requests/models.py\", line 309, in prepare\\n self.prepare_url(url, params)\\n', ' File \"/var/task/requests/models.py\", line 383, in prepare_url\\n raise MissingSchema(error)\\n', \"requests.exceptions.MissingSchema: Invalid URL 'jvt.me': No schema supplied. Perhaps you meant http://jvt.me?\\n\"]}"
Ideally the response would be slightly friendlier, maybe returning Invalid URL 'jvt.me': No schema supplied. Perhaps you meant http://jvt.me?
?
Is there an API (or a way) to remove articles from Indiepaper?
According to the documentation, mp-destination is a header. The spec says it would be a property.
I get an error in Chrome "Failed to load https://indiepaper.io/: Response for preflight is invalid (redirect)"
It seems the redirect doesn't work right with the OPTIONS request.
The developer documentation doesn't mention you ask for the "save" scope.
Also, would link to https://indieweb.org/scope#Scopes_supported_by_IndieWeb_clients as that isn't a documented scope for Micropub, only for Microsub.
When saving a Twitter link to Indiepaper, check to see if its a thread, and if it is, unroll that thread before saving the content.
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.