KartikPrabhu, [asuh], [tantek], [Michael_Beckwit, [fluffy] and snarfed joined the channel
#[fluffy]oops a while ago I started writing a tool for quickly generating reblogs/replies/etc. for Publ and Jekyll and other Markdown-based publishing engines and then I ended up forgetting to actually write the CLI for it and releasing it
#[fluffy]although right now it depends on pandoc and that can be annoying as a dependency. Does anyone know of any Python library for converting HTML to Markdown without shelling out to pandoc?
#GWGWhen pfefferle wrote the original code, and I took off on it subsequently, we kept to the way WordPress did Pingbacks. A webmention is not a pingback, so I'm looking to distance myself from that mindset by looking at non-WordPress webmention code
#ZegnatCool. Note that it has a slightly further evolved branch from one of the IWCs. If you really want to get in deep
#GWGI'm looking at all these things in the spec that are underimplemented
#GWGVery few people seem to take the advice about per-media rules.
#Loqi[Zegnat] php-linkextractor: Class for finding all resources an HTML document links to.
#ZegnatSo when the webmention comes from an HTML document, I can check if it really links to me, rather than doing a pure text search
#GWGMostly because of the attempt to unify the bifurcated nature the implementation.
#ZegnatI promise no good performance on that code, it was very much experimental. And I think jkphl wrote a hard-fork of that code himself, as mine was PHP7+ only
#ZegnatBut I totally understand the problem. Sometimes it is hard to compartmentalise the different parts of software you want to work on.
#ZegnatSo you end up working on everything simultaneously.
#GWGWell, imagine someone worked very hard to separate two things so they worked independently and now you are trying to not just copy the files so they are loaded together, but make them work as one thing.
#GWGSo, removing the duplicate code and the workarounds to have one seamless whole.
iasai joined the channel
#GWGSo, I am trying to figure out a new low-level implementation of the duplicate code.
#GWGWhich takes longer, but sets up something better in the future. And since the two plugin solution still works, there is no rush on merging them specifically.
#ZegnatCan you start from scratch quicker? If you want to rethink the low-level stuff anyway? Or is that not a good solution for WordPress things?
#GWGWell, I am starting parts from scratch by removing parts of the code to their own functions
#GWGSo, the code does a head request to check whether the URL is valid and of an approved content type to avoid being tricked into downloading a video file or something large. That can be a separate thing.
#GWGAs I go, I am adding in proactive parsing instead of parsing as an afterthought
#ZegnatNote that the HEAD request can not guarantee you the size or file type if you are talking about an actively mallicious source. It is trivial to report different things on HEAD and GET requests.
#ZegnatBut in general still a very good sanity check to have. The extra request on your end is probably cheap, and will catch people putting in random URLs.
#Loqi[rmccue] Requests: Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.
#Zegnat“takes away all your worries” ... hmm ... I have a lot of worries though
#ZegnatThanks GWG! Will have a look there later :D
#ZegnatOh interesting, it doesn’t seem to cancel the download if the file is too big, rather it just stops writing those bytes to memory. So that makes it sound like it will drain bandwidth and time.
#ZegnatYou can actually cancel the request, but then curl errors out. It is overall just a big weird on how to handle protection against huge files, and I do not have a perfect answer *shrug* Interesting seeing how they did it though.
#ZegnatI am not sure private webmentions are worth work. I much prefer working on something like AutoAuth. The webmention itself shouldn’t be responsible for marking something as private.
#GWGWordPress has the idea of password protected posts as well
#GWGBut I wonder if I should change the behavior of private posts on WordPress to return a 401
#GWGI added it to see Also, but not sure if I should edit the spec
#sknebelre 401, I just made a issue on AutoAuth to incorporate that - many sites do 404 to not leak any information at all
#sknebele.g. a github repo you don't have access to returns 404
#sknebelso it probably makes sense for AutoAuth clients to handle that, even if there's additional cost of logging in and discovering there's nothing there
iasai joined the channel
#GWGI considered changing mine. I don't see the point of private posts where you don't know there's a page
#sknebelwell, the idea generally is that you get told that there is something, or can discover it from feeds etc
#GWGAnd password protected is not something I care about. Though the question is about which to change to my desired behavior
#GWGAlso, you can have a page with protected elements
#Zegnat“Is there WWW-Authorize? Yes: there may be a different response code if you send authorize header along, so try that.” Initially feels like it makes sense. Though it is sad that you need to ignore the meaning of HTTP status codes :(
#GWGI have a lot of hardening things I need to do with IndieAuth to make it work better with this
#GWGRight now, if you get an Indieauth token, you get carte blanche access to everything unless the endpoint you are accessing stops you. I need to move scopes somehow further up the chain
#sknebelreally need to come up with something that gets people to try AutoAuth, for now everyone says it's cool but the consuming code is missing
#GWGsknebel, you could try to talk me into something
sebsel joined the channel
#GWGI jump around from project to project, like a honeybee pollinating flowers
#GWGSo, I will take on a bigger project and stop to do fixes to smaller projects
#ZegnatGWG, you have given me more work. I was looking at some recent bugs on rmccue/Requests to see how stable it is, and think I now may be forced to make a PR already.
#LoqiIt looks like we don't have a page for "markdown dialect" yet. Would you like to create it? (Or just say "markdown dialect is ____", a sentence describing the term)
#GWGsebsel, if you change your mind, I have a bed for rent
#sebselhm, too long ago, but there are some on that page
#[tantek]sebsel, yes, > at start of line is a good blockquote equivalent for email, usenet, etc. however looks odd outside that context. I'm wondering can we make it even easier to read, in broader plain text contexts, e.g. POSSE tweet
#[tantek]current thinking: start post content with “...quote here...” — URL optional@-name
#[tantek]actually put optional @-name BEFORE URL for more chance of POSSEing it in-reply-to a tweet of the article itself
#sebselyea, you have this ``` thing, which creates a code-block in Github flavoured markdown. That one can take an optional word to denote the language, e.g. ```php
#[tantek]the triple-backtick thing is totally made up and violates Markdown principle 1
#sebselbut I guess something like >>> [name] would be way to parser-y, not realy user friendly
#[tantek]exactly, I'm strongly rejecting any not user friendly use of punctuation in plain text
#[tantek]this is why I'm considering naming my alternative / replacement for Markdown "Markdont"
#sebselas a user of markdown, I don't really care. I am now used to markdown and read `this` as a piece of code now. I use it in all my e-mails to co-workers
#[tantek]I care because the whole point of communication is authoring for reading, not yourself
#sebselI see the single backtics as just another kind of quotes. And these are just used for code. My assumption would be that most people who understand the code, would understand my use of markdown
#@t“changes in … blood were potent but ‘transient,’ …. So activities would have to be repeated to provide any continuing [#cancer] protection, and it remains unclear how intense or prolonged that exercise ideally would need to be” — @nytimes ...
https://tantek.com/t50E1 (twitter.com/_/status/1122551773695074310)
#[tantek]also my first use of a [inserted] hashtag
#@t“changes in … blood were potent but ‘transient,’ …. So activities would have to be repeated to provide any continuing [#cancer] protection, and it remains unclear how intense or prolonged that exercise ideally would need to be” — @nytimes ...
https://tantek.com/t50E1 (twitter.com/_/status/1122551773695074310)
#Loqi[Tantek Çelik] “changes in … blood were potent but ‘transient,’ …. So activities would have to be repeated to provide any continuing [#cancer] protection, and it remains unclear how intense or prolonged that exercise ideally would need to be” — @nytim...
#sebselI believe it's also possible to add four spaces for blocks of code, but sometimes they are rendered as blockquotes... no standards and stuff
#sebselif you do that <code> $x = 1; </code> is way shorter!
#[tantek]yet something like /* PHP */ or /* CSS */ also conveys the language
#sebselyes, but not all languages have an inline comment like that
#sknebelthe CommonMark syntax also only works for multiline sections
#sebselplease correct me if I'm wrong, but I think Ruby and Elixir only use # to comment, which takes the rest of the line as comment
[fluffy] joined the channel
#[fluffy][sknebel] pandoc has more options than html2txt but unfortunately they’re all pretty awful, I’m finding. At least with regards to `<ul>` and so on.
#[fluffy]for inline code you can use backticks i.e. ``` `$x = 1;` ``` (unfortunately Slack’s not-quite-Markdown has no way of properly handling backticks in its own inline backtick thing, really annoying!)
#[fluffy]in the various Markdown implementations I’ve used, backticks translate directly to <code> while fences translate into <pre><code> and if there’s a language specified that gets further sent through pygments or whatever.
#sknebel(re pandoc vs html2txt: yeah, lists seem to be a major source of problems. commonmark and the original markdown slighty differ there, so it's problematic. had some issues with bridgy publish because of that: html2txt does gruber-style, github uses an extended CommonMark)
#[fluffy]but I haven’t seen anything that tries to syntax highlight for inline.
#ZegnatMany thoughts, haha. But currently I am feeling like token and auth endpoints really win from being connected. And as Microsub endpoint you need to be able to always trust the token endpoint. So they may as well be all within the same system for such a usecase.
#ZegnatRephrase that question to: “is it worth for Microsub and Micropub to support external auth and token endpoints?” And then find someone who actually needs that ability at all and ask them why they need it.
#ZegnatBut that applies to all the requests, so isn’t specifically a reason to have only the auth endpoints externally.
#GWGMaybe this needs a blog post added to\ Indienews
#sknebelwhat are the 3 versions, out of interest? internal endpoints, external endpoints, ...?
#LoqiIt looks like we don't have a page for "3 versions, out of interest" yet. Would you like to create it? (Or just say "3 versions, out of interest is ____", a sentence describing the term)
#GWGThere is a file in Indieauth, Micropub, and Microsub called ___-authorize.php
#GWGIt contains the code that takes a token and logs you into the site
#GWGIf you have the IndieAuth plugin, it doesn't load the similar file in the other two plugins
#GWGThe Microsub one is just a copy of the Micropub one.
#GWGThe one in IndieAuth verifies tokens directly, the other two using an external verification process.
#sknebelthat doesn't seem too bad, but is complexity, yes
#sknebelthe header thing could(TM) be relevant to people using external services, e.g. Aperture?
#sknebelalso, what was the upgrade path like when you added the internal endpoint? do people that had indieauth.com configured before still use that if they never changed it?
#GWGBut now, if you install IndieAuth the plugin, you use the internal endpoint, otherwise the external
#ZegnatAfter a little more thinking, I think I personally like the option of having external endpoints available. But I honestly have a hard time thinking of why anyone who is not a power-user, or otherwise (freakishly) invested in plaing with their IndieAuth endpoints, needs that option. Feels like something a WP plugin developer should be able to safely drop.
#ZegnatLooks good GWG. And agreed on your observations re web sign-in.
#ZegnatFirst step to making things easier might be to remove that from the IndieAuth plugin.
#GWGZegnat: Other than Indielogin, there isn't much prior art on the web signin protocol
#GWGIt's unclear about whether that means I need to implement basic rel me auth
#ZegnatTrue. I guess it would just be "Login with IndieAuth" then? If you want to login with GitHub or another identity provider, it would make sense to pick dedicated plugins for that anyway
#sknebeljust to clarify, there's two scenarios for using another site: one would be only replacing the sign in into wordpress with indieauth - the wordpress site authenticates you using indieauth, but provides its own endpoints to the client. the second is using the endpoints from the other site entirely, disabling the internal ones. (and technically, you could have a hybrid where auth endpoint is one and token endpoint another...)
#sknebelagreed with Zegnats last line about other identity providers
#GWGI could move the external IndieAuth stuff into a new web sign-in plugin.
KartikPrabhu joined the channel
#ZegnatLot of mixed cases, sknebel. I am just trying to think about which ones are actually worth supporting by GWG. Some freeform combination could exist, but people using them maybe should just code-dive themselves
#GWGThe biggest roadblock is the fact that people have trouble with the headers
#sknebelZegnat: I wanted to clarify because of "The only use case presented for allowing an external site was…what if I want to sign into Site A with the credentials of Site B?" - and to me there's two different things in that realm
#ZegnatTrue GWG. But those users can't host micropub or microsub themselves either. So they just need a plugin that can add Link headers / meta elements (like the Aperture plugin)