Learn about Windows PowerShell
Summary: Advanced Event 7 in 2011 Scripting Games uses Windows PowerShell to map user's names to Twitter names.
About this event
Division
Advanced
Date of Event
4/12/2011 12:15 AM
Due Date
4/19/2011 12:15 AM
You are enjoying using Twitter. Unfortunately, Twitter usernames are not always easily understandable. You would like to be able to map a Twitter username with the person’s actual name. To do this, you plan to retrieve this information from a SQL Saturday networking web page, such as the one shown in the following image. Then you plan to create a comma-separated value (CSV) file with the Twitter username, and the person’s actual name as fields.
2011 Scripting Games: All Links on One Page
Submit your scripts on PoshCode
Support our Sponsors!
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.
Ed Wilson, Microsoft Scripting Guy
So does the script get the users from a csv file, or from the web page? I get the output is a csv file, but you lost me on the input.
@Glenn - I'm pretty sure you GET the info from the SQL Sat. Networking webpage & then SEND the ifo to a CSV.
Scenario:
"To do this, you plan to retrieve this information from a SQL Saturday networking web page, such as the one shown in the following image. Then you plan to create a comma-separated value (CSV) file with the Twitter username, and the person’s actual name as fields."
Then after ya get the info from the web page into a CSV - create a function that will do translations from the info in the CSV file (Twitter name to Real Name and Real Name to Twitter Name)
That's my interpretation at least
That's funny. In the last event I was thinking "it would probably be helpful to have the person's actual name in addition to their username." But I decided to keep it simple and just focus on the required information.
I thought about that too from AE6, but I also didn't want to go too crazy and go outside the requirements any more than I already did. I agree with @Mike.Wells and believe that we have to pull that info from the site and add it into a CSV.
@Glenn Sizemore sorry if I was unclear. My thinking (and the prototype I wrote for this event) was that you would get all of the twitter id's and usernames from the SQL Saturday #70 web page. You would store them into a CSV file as a CHEAP/EASY type of data storage. You would then be able to open the CSV file in an Excel Spreadsheet and that would you to be able to do a quick lookup to resolve a users twitter id to the users actual name.
@ Mike.Wells yep ... that is it!
@Jason Hofferle there have been SO many times that I wanted to send a direct message to a particular user on Twitter, and I did not know their twitter name ... I actually wrote something similiar to this for my own use ... I then thought it would make a COOL event for the 2011 Scripting Games.
@Boe Prox not going too crazy with the games? hehehe that is part of the fun. It is actually one of the things I look forward to each year ... seeing what the contestants come up with ... comparing my personal approach to the way the contestants answer the questions ... and looking at the "extensions" that are incorporated into the scripts.
Well I guess that is settled then. Grab the names from the same web page it is.