Here is the TEDIOUS process to follow to convert an old Quiz Question Bank to a new Quiz Item Bank in Canvas:

  1. Create a Quiz and name it TempQuiz
  2. Select Classic Quiz
  3. Click the Questions tab
  4. Click the Find Questions button
  5. Select the Question Bank
  6. Click Select All
  7. Click Add Questions
  8. Click Save
  9. Go back to the Quizzes page
  10. Click the Kabob icon next to TempQuiz
  11. Click Migrate
  12. Click TempQuiz
  13. Click Item Banks
  14. Click +Bank
  15. Name the Item Bank
  16. Repeat for EVERY QUESTION. If you have 20 questions in the bank, repeat these next steps 20 times!
    1. Click the first question
    2. Click Item Banking
    3. Click Add to Bank
    4. Select the destination bank
    5. Click Add
    6. Click the Trash icon to remove question


This post consists of notes to myself, so that I can remember the commands to create a Node.js Twitterbot hosted on Heroku.

  1. Create a Github repo and clone it locally

  2. Create a .gitignore with .env and node_modules/
    .env
    .DS_Store
    node_modules/
    
  3. Use npm to generate the initial project.
    npm init
    

    npm asks questions and builds a package.json file.

  4. Install some packages
    npm install dotenv
    npm install twit
    npm install express
    
  5. Create .env_sample with this
    CONSUMER_KEY = ...
    CONSUMER_SECRET = ...
    ACCESS_KEY = ...
    ACCESS_SECRET = ...
    
  6. Create index.js with this starter code
    const express = require('express');
    const app = express();
    require('dotenv').config();
    const Twit = require('twit');
    // const T = new Twit({
    //   consumer_key:         process.env.CONSUMER_KEY,
    //   consumer_secret:      process.env.CONSUMER_SECRET,
    //   access_token:         process.env.ACCESS_KEY,
    //   access_token_secret:  process.env.ACCESS_SECRET,
    //   timeout_ms:           60*1000,  // optional HTTP request timeout to apply to all requests.
    //   strictSSL:            true,     // optional - requires SSL certificates to be valid.
    // });
        
    // yr code here
        
    app.listen(
      process.env.PORT || 3000,
      ()=>console.log("bot running")
    );
    
  7. Write your code in index.js

  8. Use app.listen to log local, console-based tests. Run the tests with the command
    node index.js
    
  9. Create .env and add the API keys, then run live tests that post to Twitter.
    CONSUMER_KEY = ...
    CONSUMER_SECRET = ...
    ACCESS_KEY = ...
    ACCESS_SECRET = ...
    
  10. Commit and push to Github. Create a public branch for Github and publish it
    git checkout -b Github_Public
    git push -u origin Github_Public
    
  11. Go to the website for the Github repo, click Settings > Branches, and change Github_Public to be the default branch

  12. Commit/push the Github_Public branch. Switch to the master/main branch.

  13. Add a file named Procfile that contains the following
    worker: node index.js
    
  14. Check that .gitignore is empty. Go to Heroku’s website. New > Create New App.
    heroku login
    heroku git:remote -a goodnitebot
    git add .
    git commit -am "make it better"
    git push heroku master
    
  15. Back to Heroku’s website. Click on your app, then Resources. Edit > disable Web > Confirm. Edit > enable Worker > Confirm. Check Twitter.


A few years ago I had the idea of creating a Twitterbot that could make recommendations. If someone were to tweet “Recommend a movie” it could randomly reply with a classic movie. This idea was interesting, but wasn’t very funny. I eventually decided that a better idea would be to reply to any “Recommend me music” tweets with incredibly old big band leaders (Glenn Miller and Benny Goodman) and jazz crooners (Bing Crosby and Frank Sinatra). In July of 2015, I made FogeyBot:

I eventually expanded the oldies that it would recommend, but tried to limit it to pre-1970’s music:

"oldmusic":["Glenn Miller","Benny Goodman","Mitch Miller","Lawrence Welk","Perry Como","Henry Mancini","Pat Boone","Duke Ellington","Cab Calloway","Count Basie","Louis Armstrong","Dean Martin","Bobby Darin","Billie Holiday","Ella Fitzgerald","Robert Goulet","Nat King Cole","Andy Williams","Mel Tormé","Frank Sinatra","Liza Minnelli","Tony Bennett","Bing Crosby","Johnny Mathis","Tom Jones","Jimmie Rodgers","Roy Rogers","Merle Travis","Merle Haggard","Hank Snow","Gene Autry","The Carter Family","Hank Williams","Flatt & Scruggs","Bill Monroe","Ralph Stanley","Buck Owens","Bob Wills and His Texas Playboys","Conway Twitty","Chet Atkins","Roger Miller","Elvis Presley","Doris Day","The Everly Brothers","The Weavers","Pete Seeger","Fats Domino","Neil Diamond","Ricky Nelson","Paul Anka","Dionne Warwick","Brenda Lee","Kenny Rogers","Sam Cooke","Jackie Wilson","Chubby Checker","Roy Orbison","Neil Sedaka","Herb Alpert & The Tijuana Brass","Tommy James & The Shondells","Wilson Pickett","Chuck Berry","The Righteous Brothers","Marty Robbins","Petula Clark","Jan & Dean","The Sons of the Pioneers","Cliff Edwards","Hoagy Carmichael","Les Paul & Mary Ford","Sister Rosetta Tharpe","Ernest Tubb","Miles Davis","John Lee Hooker","Lionel Hampton","Peggy Lee","Buddy Holly","Dinah Shore","Muddy Waters","T-Bone Walker","Woody Guthrie","Rose Murphy","Raymond Scott","Fred Astaire","The Dave Brubeck Quartet","Tennessee Ernie Ford","The Kingston Trio","Jim Reeves","Frankie Avalon","Screamin' Jay Hawkins","Nina Simone","George Jones","Little Richard","Harry Belafonte","Wanda Jackson","The Coasters","Jerry Lee Lewis","B.B. King","Howlin' Wolf","Bo Diddley","Ray Charles","Bill Haley and His Comets","Johnny Cash"]

I originally coded the bot to run on an hourly basis. Eventually enough people complained and the bot was in “Twitter jail” for sending spam. I rewrote the bot so that it replied to tweets directed at it. Send a tweet such as “@fogeybot what music do you like?” Or “@fogeybot what should I listen to?” You will get a random reply such as:

  • Nothin’ beats John Lee Hooker… except maybe Howlin’ Wolf
  • Hows about Tony Bennett?
  • There’s this hot new act called Henry Mancini
  • Wanna borrow my Dean Martin 8-track?

Next, I added some old fogey ramblings. This was a lot of fun to write. Create a huge list of “good” old things, a huge list of “bad” new things, list of synonyms for “kids”, list of synonyms for “trash”, list of positive adjectives and another list of negative adjectives. Once a week, fogeybot will tweet out a random rant:

  • Back when I was a youngen, there was no filthy Myspace Top 8 and I turned out fine
  • Parents these days should give their youngens Upton Sinclair’s ‘The Jungle’ not annoying Apple dongle
  • Girl Ghostbusters?!! Pedestrian diddly!!!!!!!1
  • Does anyone else remember back when the Lindbergh Baby used to be good?
  • Is it just me or is terrible Selfie Stick literally the worst thing ever?
  • Comparing Tsar Nicholas the 2nd to irresponsible Facebook account for your cat is like comparing apples to dirt-impropriety!
  • Wish I was born before all this senseless emoticon foolishness balderdash
  • When I was a pubescent with big bands vs moppets nowadays with their hideous Gangnam Style shenanigans

At one point I figured out how to use the giphy.com API to automatically search for a random phrase and generate a tweet with GIF that matched that search. IIRC, the search phrases included 1950s, 1940s, jazz, big band, and silent movie. It worked pretty well, until GIPHY changed their API.

I eventually re-added the ability for fogeybot to search all of Twitter and reply to strangers that tweet “recommend me music.” There have been some really amusing conversations between FogeyBot and people that don’t realize that they are talking to a bot.




RECENT POSTS