MIDDAY TRAIN
The idea for “Midday Train” was inspired by the story behind Gladys Knight and the Pips’s “Midnight Train to Georgia“. The writer, Jim Weatherly originally titled the song “Midnight Plane to Houston” after a conversation with Farrah Fawcett (who was dating his friend, Lee Majors) about taking a midnight plane to Houston and visit family. It was later changed to “Midnight Train to Georgia” for Cissy Houston and was later sung by Gladys Knight. My original plan was to list of all the towns and cities in the United States and not just the major cities, so a person can imagine taking a train to all these places during the day, preferably during the 9-5 work hours. I eventually will gather that list of all the cities and towns, but for now I just used Darius Kazemi’s JSON file on US Cities.
As for adding the responsiveness to this bot, some parts work, but others don’t and I’m still in the midst of debugging my error codes like “ReferenceError: followerHandle is not defined”. I also intend to vary the statements more.
UPDATE:
With an extra week to work on this project and Allison’s ‘rollDice‘ in-class tutorial from last week and the simple chatbot example code on GitHub, I was able to randomize the initial tweets more and debug the code for better responsiveness when a user likes, direct messages and retweets. And I learned to use GitHub with a lot of help from a tutor, so the sample code for this bot is available online.
(Initial Tweet)
Hello. Where are you headed? I am going to Wichita, Kansas.
— midday.train.to (@midday_train) February 15, 2017
Salutations! Going through Warren, Michigan. It’s supposed to be beautiful this time of year. Ever been?
— midday.train.to (@midday_train) February 22, 2017
Greetings! On my way to Killeen, Texas. Any suggestions on places to go?
— midday.train.to (@midday_train) February 22, 2017
Passing through Pasadena, California now. I’ve got a long way to go.
— midday.train.to (@midday_train) February 22, 2017
Hi! Heading to Orange, California. Any tips on navigating the city?
— midday.train.to (@midday_train) February 22, 2017
(Response after a user “likes” the twitter entry)
Honolulu, Hawaii is a great place to visit, My80sSelf
— midday.train.to (@midday_train) February 15, 2017
Durham, North Carolina is a great place to visit, My80sSelf
— midday.train.to (@midday_train) February 15, 2017
Fayetteville, North Carolina is rich in history, @My80sSelf
— midday.train.to (@midday_train) February 22, 2017
Can’t wait to try Irving’s local cuisine, @My80sSelf
— midday.train.to (@midday_train) February 22, 2017
(Response after a user replies to a twitter entry)
new york https://t.co/3AgoNC4qYq
— My 80’s Self . . . (@My80sSelf) February 15, 2017
@My80sSelf I’ll try to post 16 Fayetteville recommendations!
— midday.train.to (@midday_train) February 22, 2017
@My80sSelf I’ll try to post 27 Chesapeake recommendations!
— midday.train.to (@midday_train) February 22, 2017
(Response after a user follows the bot, but when I tried to change it to a different statement, like “You are welcome to come along,” the user name became “undefined” and the link to the user stopped working)
You are welcome to tag along, @My80sSelf!
— midday.train.to (@midday_train) February 22, 2017
SOURCE CODE: