{"id":16510597,"url":"https://github.com/wragge/trovenewsbot","last_synced_at":"2025-06-24T18:38:08.597Z","repository":{"id":8974181,"uuid":"10717655","full_name":"wragge/trovenewsbot","owner":"wragge","description":null,"archived":false,"fork":false,"pushed_at":"2013-11-03T22:05:50.000Z","size":208,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T15:14:20.986Z","etag":null,"topics":["code4lib","troveaustralia","twitter-bot"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wragge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-16T08:29:50.000Z","updated_at":"2023-11-17T14:22:30.000Z","dependencies_parsed_at":"2022-09-14T10:11:29.073Z","dependency_job_id":null,"html_url":"https://github.com/wragge/trovenewsbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wragge/trovenewsbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wragge%2Ftrovenewsbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wragge%2Ftrovenewsbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wragge%2Ftrovenewsbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wragge%2Ftrovenewsbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wragge","download_url":"https://codeload.github.com/wragge/trovenewsbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wragge%2Ftrovenewsbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261735084,"owners_count":23201952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code4lib","troveaustralia","twitter-bot"],"created_at":"2024-10-11T15:56:05.600Z","updated_at":"2025-06-24T18:38:08.577Z","avatar_url":"https://github.com/wragge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"trovenewsbot\n============\n\nSee me in action at [@TroveNewsBot](http://twitter.com/trovenewsbot).\n\nBuilt using the [Trove API](http://trove.nla.gov.au/general/api), the Twitter API, the [AlchemyAPI](http://www.alchemyapi.com/), and the [GeoNames webservice](http://www.geonames.org/export/web-services.html).\n\nFor TroveNewsBot's unofficial biography see: [TroveNewsBot: The story so far](http://storify.com/wragge/trovenewsbot-the-story-so-far).\n\nDon't miss [TroveNewsBot's Guide to Child Rearing](http://storify.com/wragge/trovenewsbot-s-guide-to-child-rearing).\n\n### Basic bot interactions:\n\n* Include the word 'hello' in a message to @TroveNewsBot to receive a greeting and a random newspaper article.\n* Any other message will be treated as a query and will be sent off to the Trove API to look for matching results in the newspaper database.\n* To receive any old random newspaper article from amongst the 100 million odd available, just tweet TroveNewsBot the hashtag '#luckydip' and nothing else.\n\n### Modifying your bot query:\n\nBy default, the TroveNewsBot tweets the first (ie most relevant) matching result back to you. To change this you can:\n\n* Include the hashtag '#luckydip' to receive a random article from the matching results.\n* Include the hashtag '#earliest' to receive the earliest matching article.\n* Include the hashtag '#latest' to receive the latest matching article.\n\nBy default, the search terms you supply are sent directly to the Trove API without any modification. To change this you can:\n\n* Include the hashtag '#any' to search for articles that match *any* of your search terms. This is the same as adding an 'OR' between your terms.\n* Include a year to limit your search to that year. (Note that the majority of Trove's newspaper content was published between 1803 and 1954.)\n* Include the hashtag '#here' and location-enable your tweet to add the name of the place nearest to you to the query string. The place information is retrieved from the GeoNames reverse geocoding API.\n\n### Opinionator Mode:\n\nIf you tweet a url to TroveNewsBot you enter **Opinionator** mode. In this mode, TroveNewsBot examines the page at the supplied url and builds a query based on it's contents. The result is a commentary of sorts drawn from from TroveNewsBot's reservoir of 100 million historic newspaper articles.\n\n#### Titles\n\nBy default, TroveNewsBot assembles its query by looking for a number of elements on the page:\n\n* The first set of h1 tags\n* A meta tag with a name including the string 'title'\n* Whatever's in the title tag\n\nTroveNewsBot takes the text of whichever of these is found first, removes stopwords, slices off the first ten words, sends them off to Trove, and tweets the result.\n\n#### Keywords\n\nIf you add the hashtag '#keywords' to a tweet containing a url, TroveNewsBot uses the [AlchemyAPI](http://www.alchemyapi.com/) to extract the ten top-ranked key words or phrases from the complete text of the page. These are then sent to Trove as before. This should probably (maybe) increase the relevance of TroveNewsBot's response.\n\n### Automatic botness:\n\n* At 9am, 3pm and 9pm (AEST), TroveNewsBot tweets a random article that has been updated or added in the previous 24 hours.\n* At 8am, 12 noon, 4pm and 8pm (AEST), TroveNewsBot tweets a response to the latest news item from the ABC's [Just In](http://www.abc.net.au/news/justin/) page.\n* Every few hours TroveNewsBot tweets a response to the most recent link from [DPLA](http://dp.la) tweeted by [DPLABot](https://twitter.com/DPLAbot).\n\nReleased under CC0 licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwragge%2Ftrovenewsbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwragge%2Ftrovenewsbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwragge%2Ftrovenewsbot/lists"}