View on GitHub

trovenewsbot2019

TroveNewsBot (the 2019 edition)

@TroveNewsBot is live on Twitter.

This is the latest version of @TroveNewsBot which includes a number of new or enhanced features:

Tweet screenshot

For an earlier incarnation of TroveNewsBot see this repository.

Search Trove newspapers

Ever wanted to search Trove’s newspapers without leaving Twitter? @TroveNewsBot can help! Simply tweet your search terms at @TroveNewsbot and it will search Trove for you, tweeting back the most relevant result. It can be as simple as this:

@TroveNewsbot lamingtons

Here’s an example of a tweeted query and @TroveNewsBot’s response. Note that ‘@TroveNewsBot’ has to appear first in your tweet (this is to stop the bot responding every time it gets a mention!).

Sorting results

By default, @TroveNewsBot tweets back the most relevant result (as defined by Trove’s relevance ranking). But you can change this by adding one of the following hashtags to your tweet:

For example:

@TroveNewsBot lamingtons #earliest

Filtering results

You can filter your results by using the following hashtags:

Examples:

@TroveNewsbot lamingtons #advertising
@TroveNewsBot lamingtons 1920 #year

Note that if you use the #illustrated hashtag, @TroveNewsBot will use the first illustration it finds in the selected article as the thumnail, rather than the article’s headline.

Combining search terms

If you include multiple search terms, @TroveNewsBot will look for articles that contain all the terms (an ‘AND’ search). If you want to change this, you can add the following hashtag:

For example:

@TroveNewsBot lamingtons pavlova #any

Combining hashtags

You can can combine any of the hashtags described above to make more complex searches. For example:

@TroveNewsBot lamington #earliest #illustrated

Serendipity mode

But what if don’t have a particular search term in mind? What if you just want to explore? @TroveNewsBot can help with that as well! Simply tweet #luckydip at @TroveNewsBot for a randomly selected newspaper article. If you want slightly less random results, you can add any of the filters describe above. For example:

@TroveNewsBot #luckydip
@TroveNewsBot #luckydip #illustrated
@TroveNewsBot 1910 #luckydip #illustrated #year

Behind the scenes, @TroveNewsBot randomly selects a random option to find your random article. The options are:

Note that this is something you can’t do through the Trove web interface. Bots FTW!

Opinionator mode

Instead of feeding search terms to @TroveNewsBot, you can send it a complete web page! Just tweet a url at @TroveNewsBot and it will automatically extract keywords from the page and use them to search Trove. You can limit the results using the filters described above. For example:

@TroveNewsBot https://en.wikipedia.org/wiki/Lamington
@TroveNewsBot https://en.wikipedia.org/wiki/Lamington #illustrated

While you could add #luckydip to this search, you’re not likely to get a very useful result. That’s because @TroveNewsBot searches for articles containing any of the keywords it extracts. Trove’s relevance ranking will push articles that match mutiple keywords to the top of the results, but a random result might only match a single keyword. But hey, if you’re feeling adventurous give it a go!

Single article mode

@TroveNewsBot’s tweets include a specially-generated thumbnail image of the newspaper article. To get these sorts of images from the Trove web interface you have to fiddle around with screen captures or PDFs. But again, @TroveNewsBot can help! If you already know the article you want, just tweet its identifier (that’s the number in the article’s url) and add the #id hashtag. For example, here’s the url of a newspaper article in Trove:

https://trove.nla.gov.au/newspaper/article/162833980

The article identifier is 162833980, so to get the article from @TroveNewsBot, just tweet:

@TroveNewsBot 162833980 #id

If the article has an illustration and you’d like the illustration used as the thumbnail image rather than the headline, just add #illustrated:

@TroveNewsBot 162833980 #id #illustrated

Here’s the results without and with the #illustrated hashtag. Obviously, if the article doesn’t have an illustration, adding #illustrated will have no effect!

Once @TroveNewsBot has responded with your nicely-presented article reference, you can save the thumbnail, or quote tweet the result. It’s an easy way of sharing a social media friendly version of a Trove newspaper article.

Automated updates

Technical details

@TroveNewsBot uses the following libraries (amongst others):

If you’d like to know more about how @TroveNewsBot generates the article thumbnails, look at the examples in the Trove Newspapers section of the GLAM Workbench.


Created by Tim Sherratt.

If you like this project, you can support it on Patreon.