Silent Submission of Google Forms

If you tuned in about half an hour ago, you’d have seen how we’re triggering channel creation in Slack based on a custom post type getting published. One of the other tricks we wanted to happen as a result of that was the creation of a Google Folder. There are a variety of ways to play this but some of the easier ones would require some options we have blocked on our VCU accounts. I could have gone around that via a personal account and then subsequent sharing but it seemed like it’d be more fun to do it this way. I knew I could trigger script events based on form submissions and that I could use the data in the form as variables as well. I also knew I could fill out form variables via URL parameters. What I didn’t know was whether I could submit a Google Form without actually hitting submit. Turns out you can. Take your normal form URL. https://docs.google.com/a/vcu.edu/forms/d/e/1FAIpQLScK2wgma6Oicv_ZY9i-6tg_w9RfEKKkgiAFJDw15jJnmr5ofQ/viewform?entry.1431785794 You can get one of the pre-filled URL patterns like so . . . Which gives you a URL like this. You can see my pre-filled response ‘fish tank’ at the end of the url. https://docs.google.com/forms/d/e/1FAIpQLScK2wgma6Oicv_ZY9i-6tg_w9RfEKKkgiAFJDw15jJnmr5ofQ/viewform?usp=pp_url&entry.1431785794=fish+tank Now to make it auto submit ‘fish tank’ you have to change one piece and add an element at the […]

List Public Slack Channels via API

Image from page 249 of “The development of the chick; an introduction to embryology” (1919) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons) I ended up doing this while pursuing some of the API integration stuff for our projects page. It doesn’t list the private pages and might be useful to someone. This was the byproduct of looking for a way to look up the ID for a particular channel which ended up looking like this.

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 […]

Re-Scraping Instagram

Back when Instagram’s API rules didn’t completely suck, I wrote a few posts on scraping it so that some of our faculty could use those data in their research. Then all their rules changed and everything broke. That’s their prerogative but it’s also my option to complain about it. But because I posted about it, I got a comment from raiym1 who let me know he wrote a PHP scraper that avoided the API limitations. I’ve now got that up and running and set up a simple GET so that the URL determines the tagged content that is returned. The PHP for that page is below and allows you to replace the API URL in the old Google Scripts with a new url like http://bionicteaching.com/creations/ig/scrape.php?tag=fish You can then make your own custom displays based on that. I made a quick custom page template for the artfulness WP theme (currently showing filler data from the exciting ‘fish’ tag). This example has the tag hardcoded in but could easily use a custom field to pass the value. 1 On this post. And apparently this theme doesn’t support direct links to comments. About time I wrote my own theme . . .

Grabbing JSON

flickr photo shared by Library Company of Philadelphia with no copyright restriction (Flickr Commons) What I wanted to do was grab data from the WordPress API and use that to provision chunks of my new portfolio site. The portfolio is hosted on GitHub and GitHub is HTTPS. At the moment my bionicteaching site is not HTTPS.1 That causes problems as secure and insecure are not friends. I wanted a quick and easy solution so I could continue until I do the HTTPS switch. The following is how I wandered towards a solution. A number of the things worked but don’t quite work for what I wanted. So they’re worth remembering/documenting for later and it’s kind of fun to see a mix of javascript, php, url manipulation, Google API, and the WordPress V2 API all in one little bit of wandering. My first thought was to grab the JSON via a Google Script and store it in Google Drive. I can do that but can’t seem to make it available for use the way I want. I tried messing with various URL parameters but it wasn’t flowing and I only started there because I thought it would be easy. I did eventually get the file accessible in DropBox (the only other place I could think of immediately for https file storage) […]

Many Paths in Programming

flickr photo shared by San Diego Air & Space Museum Archives with no copyright restriction (Flickr Commons) Minor Thoughts on Computational Thinking Probably obvious stuff but I’m trying to jot things down for my own reference. The first thing one ought to know about computational thinking/programming is that there are many correct paths (although some are better1 than others). This is true for just about anything but I think people think technology will be much more . . . binary. Searching for cleaner paths can be kind of fun. Computational thinking is powered by vocabulary. Vocabulary, like in language, is closely tied to concepts (maybe analogies). Having never heard of the range function, it didn’t occur to me that it existed . . . let alone that I should use it. To make it work properly I need grammar but just knowing the word exists and means something starts to change things for me. It brings to mind setting up programming challenges much more like Dan Meyer’s 3 Act math lessons . . . with the scenario really begging for the addition of a particular concept but letting students struggle with it rather than providing it ahead of time. A Path This is a little bit of real-life progression which demonstrates how one thing can be done in a variety […]

Grabbing Flickr Photos

flickr photo shared by goosmurf under a Creative Commons ( BY ) license This one will be improving considerably in the near future but given I’ve just been talking to many interesting people about APIs, reclaiming various things, and Indie-Ed Tech1 I figured I’d get it out early and that’d force me to follow up. Nothing like ugly betas to drive development. It’s also a chance to test my new blog to Twitter system as I disentangle myself from IFTTT. Nothing kills momentum like not doing something . . . So this script currently works on public photos. You’ll need a file named imgs and a file named data.json. This thing should chew through all your photos and download the original size image to the folder. It’ll also make a giant json folder with the image title, any lat/long coordinates, tags (not machine entered though), and the photo date. I will warn you that I’ve only run it on 100 photos so far. I’ll give the full thing a shot once I get things setup to put it on S3. 1 Count down to book . . .

20

Grabbing FaceBook Comments – More Primitive Programming

Functional is a kind way to describe this . . . but it’s hard to argue with computers doing tedious work that was previously done by hand. The goal here was to automate the collection of the comments on 300 or so posts from the CDC’s Facebook page so they could be analyzed. Ebola is in the mix which leads to some comments that may very well rival YouTube comments in terms of causing me sadness. We did end up with around 34,000 comments which would have been hand copied in the past. So some karma balance was achieved. wTake all this with a grain or two of salt. It works but may very well be illegal in some states or do things in a way that would make real programmers weep. Consider my programming skills to be like a man trying to swat flies with a broomstick- lots of furious action, panting, cursing, and every so often I will kill a fly and celebrate wildly.1 The Facebook This was my first experience trying to do anything with Facebook. The hardest part here for me was just getting the stupid access token needed to get at the JSON feeds. I eventually found the secretly named Facebook Login Example. Part of my issue was that I thought I could skip the […]

Flickr Group Widget – Round 1

flickr photo shared by Little Orange Crow under a Creative Commons ( BY-NC ) license The goal here was simply to take the Flickr API knowledge I’d gained earlier and apply it within a WordPress widget. In doing so, I learned a few things. The primary one being that I often harm myself by being fairly good at making stuff work rather than understanding what I’m doing. That’s what I did here. The Flickr API thing was pretty legitimate. I knew what I was doing there but I pretty much crammed it into a widget plugin template without really understanding the whole thing. That led to more confusion around print

results of Flickr api group request

Flickr API Basics – Pulling a Group Feed

Someone at work mentioned that the Flickr WordPress widget didn’t work with group photos. We use this group as part of our (sort of just getting started) Friday photo walks. Since I’m trying to learn stuff I figured I’d play a bit with the Flickr API and see how that worked. After getting an API key, my first stop was at URLs. I thought that’d mean endpoints like on Instagram but it was the URL structures for photos. Useful and needed but not what I thought it’d be. I then saw in the right hand sidebar groups and browse. That turned out to be a list of groups. I ended up finding what I wanted at groups.pools get photos. I planned to get the information in json if I could given I’d just spent some time figuring out how that worked so I went back to the main index thinking the json response format would show me how to ask for json data given the variables I’d seen as options in groups.pools.getphotos. It didn’t. This section shows the structure of the json response. Which makes sense it just wasn’t what I was looking for. I found what I was looking for under request.formats which makes sense. This shows the URL structure. https://api.flickr.com/services/rest/?method=flickr.test.echo&name=value is the basic URL. Method is the thing […]