singpolyma, snarfed, friedcell, KevinMarks, loicm, tantek, jmelesky and jeremycherfas joined the channel
#jeremycherfasLooking for help extracting data from webmentions received. Different sources seem to supply vastly different amounts of information. What’s the best approach to extracting the bits I need, when they seem to occupy different key:value pairs in the file?
#KartikPrabhujeremycherfas: are you using microformats?
#KartikPrabhuthen the data should not be in different "key:value" pairs
#jeremycherfasI am receiving the files as arrays, and there are some microformat properties I recognise in there, such as h-card and h-entry.
#KartikPrabhujeremycherfas: then you should use the h-entry and h-card and parse their properties
#jeremycherfasI thought I was dsoing that :( but I think my understanding of parse is non-standard.
#KartikPrabhuby parse I simply mean use the "key:value" stuff that is inside the h-entry properties
#myfreewebfiles? arrays? webmention gives you a source URL, which you fetch and get HTML code, which you feed to a microformats2 parser that gives you JSON with key-values pairs
#KartikPrabhumyfreeweb: mf2 parsers can give you "arrays" depending on the language of the parser
#KartikPrabhumf2py does give you python dicitonaries
#jeremycherfasThat’s what I thought I was doing, but the value for that is correct for one person’s webmentions is different from the other’s.
#myfreewebah php "arrays" are also dictionaries right
#jeremycherfasMyfreeweb: that’s somewhat beyond my skill level. My site runs on Grav, and a plugin writes a datafile with the contents of a webmention. That file varies greatly in complexity depending on its source.
#jeremycherfasThanks kartikprabhu. I can. easier to do in Slack than in IRC. Is that OK?
#myfreewebnote that the h-card is sometimes in the author property of the h-entry, sometimes just out there, etc. there is an algorithm for determining the actual author: https://indieweb.org/authorship
#[jeremycherfas]Exactly! That’s the sort of thing that I find baffling. I wonder whether maybe I need to use json_decode() on my data file.
#myfreewebno the spaces are just weirdness coming from somewhere
#myfreewebthere's also "application / rss + xml" "apple - touch - icon - precomposed" and "in -reply - to"
nitot joined the channel
#[jeremycherfas]I added the spaces to help me visualise the nesting.
#[jeremycherfas]Sorry; not those spaces, the indenting, I added.
#sknebelthe grav webmention uses php-mf2 at least, so the parsing should be good
tantek joined the channel
#sknebeland apart from the weirdness with the rels it seems fine as well
#[jeremycherfas]Obviously I don’t fully understand what I am doing, but a value that gets the name in one case does not get it in the other, and vice versa.
#[jeremycherfas]A big problem is that I do not seem able to access values directly. I have to get them as properties. So in one case `config.plugins.webmention.data.0.source_mf2.items.0.properties.author.0.value` shows me the correct author name, and in the other `config.plugins.webmention.data.0.source_mf2.items.1.1.properties.name` shows me the correct author name.
#[jeremycherfas]Now trying to discover whether there is a better way. There must be!
#ben_thatmustbemeitems.0.properties.author.0.value would be the correct way to access something like that
#ben_thatmustbemeitems.1.1 ... not quite sure what you would get there
hs0ucy, [shaners] and [tamaracks] joined the channel
#[tamaracks]Thanks for looking into this, jeremycherfas. ? I have been looking again at whether Grav will suit my site. Initially, I worried about performance one I added historical posts, but then I realized I should try and see how caching affects that. I haven’t gotten as far as webmentions yet, but I’ll welcome any progress you make when I do.
snarfed and KartikPrabhu joined the channel
#[jeremycherfas]You’re welcome. I made the decision to move to Grav precisely because it is blindingly fast when all goes well, and stretches me understanding how it works. But I am by no means a developer. So in some respects it is too complex, probably. But now that I have it, I want to make it work for me.
#[tamaracks]Yeah. I put my blog on Wordpress for now, so I could play with all the Indieweb stuff to see how it works. Wordpress is simple on the surface, but I usually get a headache when I start trying to look at plugin or theme code if it doesn’t already do what I want.
#[jeremycherfas]I moved from WP, first to Octopress and then to Grav, and the headaches are very different.
#[tamaracks]Yep. I was thinking about Hugo, but I am not sure I want to go to a static site generator yet, because that complicates some of the interactive aspects of indieweb.
#[jeremycherfas]True, although lots of indiewebbers seem to have cracked those problems, whereas very few are using Grav.
#[tamaracks]Yes, but I haven’t found any of their implementations (yet, anyway) that I thought I could do myself. It always seems to involve ruby or node.js.
#ZegnatOctopress had some default plugins too, I believe?
#voxpelliI do Micropub, Webmentions and Websub on my Jekyll site
#[jeremycherfas]I don’t recall Octopress having any plugins. But I abandoned it a couple of years ago.
#myfreewebhttp://octopress.org seems the latest edition is more of a jekyll management tool with a ton of stuff
#[tamaracks]@voxpelli I saw your micropub to github project. It looks pretty cool, but I have trouble grasping node.js. It might be beyond my capabilities at the moment, particularly to change the output format for something other than Jekyll.
#LoqiHomebrew Website Club is a bi-weekly meetup of people passionate about or interested in creating, improving, building, designing their own website, in the same structure as the classic Homebrew Computer Club meetings https://indieweb.org/hwc
#gRegorLoveI don't see Toronto listed, just your interest in Edmonton
#Kongalooshyeah, I was hoping someone in the IRC might know of something that dosen't have a wiki
#LoqiGWG: mpfefferle left you a message 1 day, 12 hours ago: what do you think if we split the SL code into several classes for specific problems, so that we can keep the methods smaller and simpler? for example an author-handler, and entry-handler, ...
#miklbnot really. Was feeling in a rut, work load was low, so took a few days away from the code editor. Hope to get things fire up tonight.
#GWGI understand. I feel the need to recharge mentally sometimes.
#miklbI need to break down the theme work into a process, instead of a bunch of unorganized to-dos. Feel like it was keeping me from methodically building it.
#GWGI'm still working on Semantic Linkbacks. pfefferle had some feedback, so I need to redo what I did.
#miklbI may take it live on my site as soon it is minimally viable to see where the pain points are and force/speed up the work
#miklbI've tried to keep up on that discussion, but do not really have anything to add
#GWGHow many examples of an h-cite nested inside a in-reply-to have people seen?