1. Comparing documents in Word 2007

    Posted July 7, 2010 in software  |  No Comments so far

    Do you need to quickly find the differences between two large Word documents? Have you edited a large document only to realise you didn’t have Track Changes turned on?

    The “Compare” feature in Word 2007 will find the differences between two documents and display them using the Track Changes view. Here’s how to use it…

    Firstly, click the Compare button under Review. Then select the first of the two options.

    You’ll then see something like this:

    Click on the little folder icons next to the dropdown menus, then choose both the original document and the one you changed. It doesn’t matter which order you do it in.

    When you have selected both your documents, the box titled “Label changes with” will become editable. If you type your initials here, changes will be attributed to you.

    Then click OK and everything will change dramatically. You’ll see a panel on the left hand of the screen summarising the changes, and two panels on the right showing both the documents you selected:

    But the exciting stuff should be in the big middle panel, which is titled “Compared document”. There, you should see precisely what would have happened if you’d been using Track Changes all along!

    Stuff you added should be in red text and stuff you deleted should be crossed out. If you hold your mouse over any of the red text you should see a note about the change too.

    Using the “X” buttons in the top-right of each panel, close all of the panels except “Compared document”. You will now simply be viewing the “track changes” document, so you can just save it and send it over. And that should be it! Just remember to turn on Track Changes if you have any more editing to do.

  2. How to post your Last.fm loved tracks to Twitter

    Posted December 8, 2009 in How-to  |  5 Comments so far

    I remember when Twitter was still quite new. Back then, a lot of people were still trying to think of uses for it and one thing that was fairly common was to plug it into your Last.fm account.

    In retrospect I can see why that was seen as a good idea. Twitter was supposed to be about broadcasting minor ephemeral details, and the music you were currently listening to definitely fell into that category. But there was a downside. People listen to a lot of music and, with a Twitter post for each track played, that added up to a lot of useless information on Twitter. Thankfully, the practise of scrobbling directly to Twitter soon faded out.

    Today there are some more useful and less irritating ways of posting information from Last.fm (or, indeed, its open source alternative Libre.fm to your Twitter account. One of them, Tweekly.fm, produces an automated weekly tweet of your top three artists. Another one, which I’m going to explain here, involves posting tracks that you “love” on Last.fm to your Twitter account.

    Here’s how it works:

    1. If you don’t have a Last.f account, create one here
    2. Get the URL of your “Loved tracks” RSS feed. This is easy: just change “USERNAME” in the URL below for your Last.fm username.


    3. Test the URL by opening it in a browser. You should see something that looks a bit like this:
      Last.fm RSS feed browser output
    4. If it works, go to Twitterfeed.com and create an account if necessary
    5. Once logged in to Twitterfeed, click on the “Create new feed” button to the top-right of the screen
    6. In “Step 1: Send Feed To”, select Twitter. Click on the large “Authenticate Twitter” button and enter your Twitter account details. You’ll then be directed back to Twitterfeed.com
    7. In “Step 2: Name feed & source URL”, enter a name for the feed – this can be anything you like. In the “RSS Feed URL” field, paste the URL of your RSS feed
      Twitterfeed screenshot 1
    8. Click on the “test feed” button to make sure the feed is valid
    9. Click “Advanced settings”. A bunch of new options will appear underneath. Here’s a screenshot with the things you need to check circled in red:
      Twitterfeed's advanced settings

    10. In “Post content”, select “Title Only”. This will ensure that the posts to your Twitter account only contain the artist, title and shortened URL to the track you loved
    11. Make sure “Post link” is checked and a URL shortening service is selected
    12. You might also want to enter some text in the “Post Prefix” or “Post Suffix” fields, otherwise your tweets might be slightly baffling
    13. You’re done – just click “Create feed” and that’s it set up.

    Now whenever you “love” a track on Last.fm, your Twitter account will post a link to it. This makes Last.fm’s “love” feature a bit more useful when it comes to recommending music to other people – especially people who don’t use Last.fm. And as long as you don’t love everything you listen to you won’t be clogging up your Twitter feed.

  3. Using Google Spreadsheets to extract Twitter data

    Posted November 20, 2009 in How-to, twitter  |  28 Comments so far

    Update (5th December 2017): Several years ago, Twitter changed its API in a way that completely broke the process I describe below. I don’t know how you’d do the same thing today. It would probably help if you were some kind of white supremacist, going by where Twitter’s moral compass seems to be pointing.

    Last weekend I was looking for ways to extract Twitter search data in a structured, easily manageable format. The two APIs I was using (Twitter Search and Backtweets) were giving good results – but as a non-developer I couldn’t do much with the raw data they returned. Instead, I needed to get the data into a format like CSV or XLS.

    Some extensive googling led me to this extremely useful post on Labnol, where I learnt about how to use the ImportXML function in Google Spreadsheets. Before too long I’d cracked my problem. In this post I’m going to explain how you can do it too.

    Data you can extract from Twitter

    This walkthrough will teach you how to extract two types of Twitter data using Google Spreadsheets – tweets and links.

    Tweets are extracted using the Twitter Search API in conjunction with ImportFeed. This allows Twitter search results to be extracted into a spreadsheet format.

    Links are extracted using the Backtweets API in conjunction with ImportXML. The Backtweets API allows you to find any links posted on Twitter even if they’ve been shortened using services like bit.ly or tinyurl.

    I’m in a hurry, can I just do this right now?

    If you just want to do it – instead of learn how to do it – just open this Google spreadsheet I’ve created. ¬†You’ll need to make your own local copy so you can edit it. Instructions can be found in the spreadsheet itself.

    How to extract tweets containing links

    The instructions below will help you create a Google Spreadsheet that pulls in and displays the time, username and text of all tweets containing links to a specified page. Because it uses Backtweets, these tweets will be retrieved even if they used shortened URLs from services like bit.ly or tinyurl.

    1. Create a new spreadsheet in Google Documents.
    2. Enter column labels in this order: “Search criteria”, “Timestamp”, “Username” and “Tweet text” in cells A1 to D1.
    3. In cell B2, underneath Timestamp, insert the following formula:
    4. =ImportXML("http://backtweets.com/search.xml?itemsperpage=100&since_id=1255588696&key=key&q="&A2,"//tweet_created_at")
    5. In cell C2, underneath Username, insert the following formula:
    6. In cell D2, underneath Tweet Text, insert the following formula:
    7. Now paste a search query into cell A2 – say, http://www.google.com. After a few seconds, you should see columns B, C and D fill up with tweets, looking something like the image below:
    8. Google Spreadsheet showing Backtweets results

    9. The formulas pasted into cells B2, C2 and D2 all reference the URL in cell A2. This means that whenever you paste anything new into A2, the search results should refresh.
    10. Also, you can paste parts of URLs into A2 – not just entire ones. This is useful for seeing all links to a specific directory on your site, for example.

    Finally, this tool can only extract 100 results at a time – but it is possible to set it up to retrieve more than that. Look at my sample Google Spreadsheet if you want to do this.

    Extracting tweets from Twitter search results

    The method for doing this is identical to the above, but uses the ImportFeed function instead of ImportXML.

    1. Create a new spreadsheet in Google Documents.
    2. Enter column labels in this order: “Search criteria”, “Timestamp”, “Username” and “Tweet text”. For the rest of this walkthrough, I’m going to assume that these labels are in cells A1 to D1, but in reality you can put them wherever you like
    3. In cell B2, underneath Timestamp, insert the following formula:
      =ImportFeed("http://search.twitter.com/search.atom?rpp=20&page=1&q="&A2, "items created")
    4. In cell C2, underneath Username, insert the following formula:
      =ImportFeed("http://search.twitter.com/search.atom?rpp=20&page=1&q="&A2, "items author")
    5. In cell D2, underneath Tweet Text, insert the following formula:
      =ImportFeed("http://search.twitter.com/search.atom?rpp=20&page=1&q="&A2, "items title")

    6. Type a search query into cell A2 - say, "Hoth." Hit enter and the results will load. It should look something like this:
    7. Google Spreadsheets with data from Twitter searchThings will go wrong if you insert characters like # or @ into the search query. To get around this, type %23 instead of # and %40 instead of @. This will allow you to search for hash tags and usernames.

    I haven't been successful in generating more than 20 search results per request, but you can get around this using the page number parameter in the ImportFeed query string. See my own Google spreadsheet to find out how to do this.

    I hope these instructions are useful - if you have any comments, questions or feedback, please let me know in the comments.