Skip to main content

Retrospective

A retrospective exhibition presents works from an extended period of an artist's activity. Similarly, a retrospective compilation album is assembled from a recording artist's past material, usually their greatest hits. A television or newsstand special about an actor, politician, or other celebrity will present a retrospective of the subject's career highlights. A leading (usually elderly) academic may be honored with a Festschrift, an honorary book of articles or a lecture series relating topically to a retrospective of the honoree's career. Celebrity roasts good-naturedly mock the career of the guest of honor, often in a retrospective format.

This project seeks to create a 'retrospective' of Google News top hits. Retrospective takes a search term and searches Google News multiple times throughout a specified time range. It then parses this data and outputs a title, summary, image, and link for use in a blog or other project.

Installation

Install requirements

pip install -r requirements.txt

Upgrade Selenium

pip install -U selenium

Install ChromeDriver

Download ChromeDriver

Save to /usr/local/bin/chromedriver

On a Mac, you will need to give security permissions to chromedriver:
cd /usr/local/bin
xattr -d com.apple.quarantine chromedriver

Other OS may have similar procedures.

Once ChromeDriver is installed, Retrospective will keep it up to date with your current Chrome version

Configure AWS CLI

Retrospective sets up and uses AWS EC2 instances as proxies.

You must configure AWS CLI if you haven't already.

Tests

python Retrospective/test.py

Usage

Basic search for bioinformatics (console print out):

python Retrospective/Retrospective.py -t bioinformatics

-t specifies search term

Add articles to blog:

python Retrospective/Retrospective.py --repo /Users/my-user/my-website -t bioinformatics -c /content/blog -i /static/images --write-framework hugo

--repo specifies absolute directory of your blog or website

-c specifies the content path - i.e. where the blog posts live

-i specifies the image path - i.e. where the images live

--write-framework specifies the framework that retrospective creates posts for. Options are only 'hugo' and None. None will print output.

Adjust time period, window, and span:

python Retrospective/Retrospective.py -t bioinformatics -s 2 -p 6 -w 8

-s specifies time span in which the total search takes place, in years. Specifying 2 will search up to 2 years in the past. Default is 2.

-p specifies time period in which separate queries will take place, in months. Specifying 6 will create a new search every 6 months for the entire span. Default is 6.

-w specifies Time window in which individual queries take place, in weeks. Specifying 8 will look at all articles over an 8 week period for every individual search as specifies by the period and span. Default is 8.

From Config

Retrospective automatically populates a config file (retrospective.json by default) within the specified repository. This is intended to save your previous searches so that retrospective can be easily rerun and updated at a future time.

The --from-config option will carry out all previous searches saved in the config file, updated for the current date. You can manually edit the json file if you want to add more searches. This is the easiest way to manage using retrospective in a blog.

Example:

python Retrospective/Retrospective.py --repo /Users/my-user/my-website -c /content/blog -i /static/images --write-framework hugo --from-config

Release files for springbok-retrospective 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for springbok-retrospective 0.0.1
File Size Uploaded
springbok-retrospective-0.0.1.tar.gz 19.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for springbok-retrospective 0.0.1
File Interpreter ABI Platform
springbok_retrospective-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 49.8 kB

Release files / springbok-retrospective-0.0.1.tar.gz

Download URL springbok-retrospective-0.0.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7b5fea8b09fea804538165d5826a2e1bed4566cd187a41fedc800d7aa147ca62
BLAKE2b-256 checksum
How to use checksums
c1425897ab83269840127d82bb166d9ca1b31a7af43c09a4112f17dc627853c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.9

Release files / springbok_retrospective-0.0.1-py3-none-any.whl

Download URL springbok_retrospective-0.0.1-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f6d57d08f9bef38f036a3cebf8fdc5c422c44c87ec1df97df6bb37a632d3fad
BLAKE2b-256 checksum
How to use checksums
df808f699c2a577db3d68a7d807156dbbf6dcb6090d3de120b22e13ece9f2a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.9

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page