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?
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
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.
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]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.
[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.
[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.
[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.
[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.
[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
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, ...
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.