Weekly Post Generator

Image from page 191 of “Hardware merchandising August-October 1912” (1912) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons) Given there’s been some recent interest in using WordPress as destination for content created on other services, I thought it might be helpful to see how I set up my weekly Pinboard posts. I did this a year or two ago so it’s sloppy but I think it’ll show some stuff that matters — mainly loading up the array variables for wp_insert_post. This is a super-simple example that inserts one post based on the content at the curl URL and is run weekly via a cron job. Looking at it now, I am full of shame as it didn’t need an external page etc. etc. but in the interest of actually writing the post and being transparent on how you don’t have to be competent to get stuff done I present it anyway. You can do similar things via javascript and you can loop it against a json feed with multiple elements. It gets a little confusing in my head when I start to think how you’d deal with syncing changes long-term. For instance, if you have a post that was created via this API cycle and it gets updated a month later how would you […]

WP API Feed Reader POC

Image from page 96 of “St. Nicholas [serial]” (1873) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons) I’ve talked to a number of people a number of times about seeing faculty using Feed WordPress to syndicate content to a motherblog when they’d really be better served by using a feed reader like Feedly.1 Feed WordPress is great and very useful but if you don’t want to archive the content or take advantage of some of the more advanced options (auto-categorizing, auto-tagging, doing stuff with author pages etc.) then it usually is a bit more hassle than it’s worth. I thought it’d be pretty easy to build a little custom page to display a series feeds from sites in one place. It took me a bit to get it straight but it wasn’t too bad. This example loads 10 sites fairly quickly. I’m currently just showing the source site’s URL and the 5 most recent posts with titles and dates. It’d be easy enough to add other stuff – excerpt, full post content, featured image etc. It’d also be pretty easy to pass the URLs to the page from a Google Spreadsheet which I’ll probably do in the near future. See the Pen wp json api multi fetch by Tom (@twwoodward) on CodePen. 1 Obligatory […]

Rethinking Our Project Page (and other stuff)

Image from page 211 of “Bulletin” (1961-1962) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons) I’ve been lucky enough to hire two awesome people who have started over the last month or so.1 We’re also going to get a new supervisor on July 3rd. That’s led me to have a bit of breathing room and a reason to start re-thinking some things. One of those things is how we combine documenting our work. Can we document what we do in a way that will create more people interested in doing these things? Can we do a much better job bringing active faculty to the forefront? Can we serve the end of the year report needs regarding various data elements? Can we gather data we might reflect on regarding our own processes? How do we knit all this stuff together from various services without a lot of extra work? The Old I’ve done this more than a few times. The latest incarnation at VCU was the examples page (pictured above). It is semi-decent but was done in haste. It tries to affiliate tools and instructional concepts with examples. Conceptually, it’s pretty close to TPACK in that way. It has done a marginal job thus far. It houses examples and people can browse them. It doesn’t […]

Non-Standard Shapes- Another Odd WP JSON Display

It’s better to see this in the full page view but it grabs a WP JSON feed and makes up non-standard polygon shapes based on the posts using the featured image as the background. Try reloading the page and the shapes will change. If you hover over them they’ll behave in very odd ways as well. That’s all easier to see on the full page view. It’s a strange proof of concept but one I’ll be putting to work for an odd art site in the future. I’ll tame it a bit as I’ve made a number of completely odd decisions just to see what would happen. It could be I’ll end up using data from the posts to influence the shapes more intentionally. That opens up a whole world of strange dataviz possibilities. That is one of the things I love about doing this kind of WordPress interaction. It’s light enough that I’ll run down a path like this and just try it out. I probably wouldn’t have bothered if it required a full child-theme or page template. It’s a low threshold with a high ceiling and now I have another example of something people don’t think WordPress could do for my NMC presentation next week. See the Pen socially engaged artists – jquery by Tom (@twwoodward) on CodePen.

iPad Robot Redemption

I freely admit to having mocked iPad robots on more than one occasion. My experience with them has largely been awkward encounters at conferences where they felt more like curiosities1 than anything with real purpose or impact.2 But . . . we recently ended up in a scenario where a student in Molly’s Artfulness class was going to be unable to attend class for a lengthy period of time. She was considering dropping the class. The next class was a dance-focused class run by Jill Ware where movement and being in the space was particularly important. All this came out in an informal conversation with Molly. As a semi-joke, I said now was the time to use the iPad robot . . . and not only did we do it but it ended up working really well. You can see some of the interactions playing out below. I think it was a fundamentally different experience than merely watching. In this particular scenario I think that the iPad robot really made a remarkable difference in terms of interaction on the part of the student driving and the students interacting with the robot/student.3 It also looks like a fundamentally different experience for both the driver of the iPad robot and the students in the class. It’d be a fun thing on which […]

WP Rest API Tips

Cowboy Jason Stanley performing a riding trick at the Round-Up, Pendleton, Oregon flickr photo by UW Digital Collections shared with no copyright restriction (Flickr Commons) I’ve been doing quite a bit more with the WordPress Rest API lately. There’s plenty of documentation and tutorials out there but most of it still feels a bit scattered to me so I’m going to stick a few of the basics here and add a few things that have come up repeatedly that aren’t quite as basic. There’s an attempt here to move upwards in complexity with the examples but to keep them as clean as possible. This will deal entirely with getting the data. I haven’t done much with using the API to write or modify data. Get the Info There are many ways to get data depending on your library of choice or if you’re using vanilla JS. I’ve played with fetch and Axios on the lighter side and jQuery, Vue, and Angular (v1) on the heavier/more involved side of things. I’ll use jQuery in this version because it’s fairly popular but here’s a Vue example. The example below does a basic jQuery ajax call for the JSON associated with blog information. See the Pen simple jquery get of WP JSON for the site by Tom (@twwoodward) on CodePen. The URL Structure/Accessing […]

timeline of last 50 posts

WP JSON to Timeline JS

As part of some thoughts on building out a series of reflective views for student portfolio blogs, I thought seeing your WordPress posts in the TimelineJS view might be a useful way to look back over your progress. I intend to wrap this into a custom spreadsheet template and/or a plugin1 but figured I’d sketch out how it works so far in case anyone was interested. The WP Rest API makes it pretty easy to write the data via Google Script. I just want to cut out chunks of the data and put it in the right fields. The following script does that and writes it to a page named “wp.” 1 Or maybe just a page where you throw in a blog URL and get a bunch of alternate view/data options.

Historical Will Annotation Continued: A WP API Experiment

The Judah Will Project (now with new URL!) has continued to grow as Ryan has been putting in serious work on the research and writing side of things. I have no choice but to step up my game and it’s been an interesting learning experience as it’s the first time I’ve tried anything sophisticated with WP providing the writing/data side of things while presenting that information somewhere else entirely. Headless? So here’s a recap of changes since the last update. More Obvious I talked to Jim about the project a few days ago. It became clear to me that it wasn’t obvious that the names in the will transcription were clickable prior to actually clicking on one. I fixed that with a simple dashed underline. This was one of those times where I was trying to keep the visual elements minimal but ended up going too far. I also threw in a modal popup for initial directions to make things more obvious. I just used this simple modal jquery plugin. It immediately drove me crazy by popping up all the time. So I looked around and found a solution to set cookies which I’d never done before. I also used a modal for the ever-growing family tree. When you have 12 kids in a generation, things get pretty wide. Permanent […]

Simple Interview Formatting Using Pseudo Elements

I had a quick question today about formatting an interview. That led to some quick experimentation in Code Pen and some simple uses of pseudo class selectors.1 When I first looked at the transcript I started to assign a class to each paragraph. That would work but was tedious. Given we were switching speakers at every paragraph I could be clever/lazy. nth-of-type will let me select odd and even elements. You can also be far fancier (every 5th etc.) but even/odd was all I needed. Given how pleasant that was, I figured I’d try a few more. This CSS lets me grab the first letter (and the colon) of the paragraphs and make them a bit like a drop cap.2 I wondered if I could use the selectors in combination to alternately style the first letters drop caps. Turns out you can. Anyway a fun 10 minutes or so that might be of interest to other wanderers out there. See the Pen demo for clare – fancy version by Tom (@twwoodward) on CodePen. 1 Disregard my neapolitan-ice-cream-inspired color scheme. 2 I had to look up the word for ‘big letters in medieval manuscripts’ and didn’t actually read/follow the tips for drop caps at the URL linked here . . .

Audio Annotation POC Using WaveSurfer.JS

See the Pen wave surfer – waveform by Tom (@twwoodward) on CodePen. I needed to make a quick proof of concept for the annotation of audio on the web. In this case, it’s meant to provide a visual and auditory way to play through interview segments that represent different categories of responses. I found WaveSurfer.js this morning and just a bit later I had a functional example. I find the ability to highlight track elements visually and access specific segments to be a pretty powerful combination. If we stacked several tracks vertically the visuals would quickly point out content variation in terms of timing and total composition. You could get more and more complex from there. Playing with it gave me all sorts of ideas (including possibly using it as part of of the upcoming Reclaim Your Dance Party // API + Audio = (beats, visuals, internet, participate) session at Domains 17 with Grant and Brian). It’s also looking like I’ll be able to work more with our music department to think through online course on music so possibilities like this will be very useful. This kind of thing would be pretty easy to turn into a plugin . . .