{"id":17202049,"url":"https://github.com/colcarroll/seen_it_news","last_synced_at":"2025-03-25T09:14:44.677Z","repository":{"id":55627801,"uuid":"119100911","full_name":"ColCarroll/seen_it_news","owner":"ColCarroll","description":"Code for a hipster twitter bot","archived":false,"fork":false,"pushed_at":"2023-05-22T21:33:45.000Z","size":9,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T08:29:26.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ColCarroll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-26T20:40:44.000Z","updated_at":"2020-12-17T03:39:06.000Z","dependencies_parsed_at":"2024-12-03T03:17:06.718Z","dependency_job_id":null,"html_url":"https://github.com/ColCarroll/seen_it_news","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fseen_it_news","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fseen_it_news/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fseen_it_news/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fseen_it_news/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColCarroll","download_url":"https://codeload.github.com/ColCarroll/seen_it_news/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245431721,"owners_count":20614184,"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":[],"created_at":"2024-10-15T02:13:30.318Z","updated_at":"2025-03-25T09:14:44.633Z","avatar_url":"https://github.com/ColCarroll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Seen It News\n============\n\nInspired by the wonderful [@NYT_first_said](https://twitter.com/NYT_first_said), this project uses\nthe MIT Center for Civic Media's [Media Cloud project](https://mediacloud.org/) to find the earliest\nmention of a word in major English language newspapers. It uses this to issue a smugly superior\ntweet.\n\n\nInstallation\n------------\n\nI do not have a `setup.py` for this, so you need to install from source:\n```\n$ git clone git@github.com:ColCarroll/seen_it_news.git\n$ cd seen_it_news  # and probably activate a virtual environment\n$ pip install -r requirements.txt\n```\n\nThere should be a file called `.config.json` configuring the project. The useful\n[grift](https://github.com/kensho-technologies/grift) library will complain intelligently about\neach setting that you need to fill in. At the very least, you will need an API key for Media Cloud,\nwhich you get by [signing up for a free account](https://tools.mediacloud.org/#/user/signup), and \ncredentials for twitter, which \n[digital ocean's tutorial](https://www.digitalocean.com/community/tutorials/how-to-create-a-twitter-app)\ndoes a good job of describing.\n\n\nQuickstart\n----------\n\nAfter installing and configuring, just `python seen_it_news` should check up to 20 recent tweets,\nand respond to those it can. Data is stored in a sqlite database (`history.db`, by default), and\neverything is logged to stdout.\n\n\nCan it be used for anything useful?\n-----------------------------------\n\nYes! You can get the string it plans to tweet with `first_mention`:\n\n```\n\u003e\u003e\u003e from seen_it_news import FindFirstMention\n\n\u003e\u003e\u003e finder = FindFirstMention('vernatsch')\n\n\u003e\u003e\u003e print(finder.first_mention())\n@NYT_first_said The Mercury News was saying \"vernatsch\" for 8 years before the New York Times did:\nhttps://www.mercurynews.com/2009/03/10/wine-why-isnt-this-one-on-every-restaurants-list/\n```\n\nYou can also get all historical uses as a generator of tuples (which makes it easier to use elsewhere):\n\n```\n\u003e\u003e\u003e for mention in finder.all_mentions():\n...:     print(mention)\n...: \n(Media(name='The Wall Street Journal', id=1150, netloc='www.wsj.com'), 'Fall Wines: Go Red, but Light', 'https://www.wsj.com/articles/SB10000872396390443686004577635632300446956', datetime.datetime(2012, 9, 15, 0, 39, 5, tzinfo=tzutc()))\n(Media(name='The Mercury News', id=35, netloc='www.mercurynews.com'), \"Wine: Why isn't this one on every restaurant's list?\", 'https://www.mercurynews.com/2009/03/10/wine-why-isnt-this-one-on-every-restaurants-list/', datetime.datetime(2009, 3, 10, 11, 44, 39, tzinfo=tzutc()))\n\n```\n\nThat still does not seem very useful\n------------------------------------\n\nOuch! But fair! See Media Cloud's [\"Press and Publications\"](https://mediacloud.org/publications/) page\nfor more academic uses of the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolcarroll%2Fseen_it_news","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolcarroll%2Fseen_it_news","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolcarroll%2Fseen_it_news/lists"}