Create an animated GIF from the PastPages news homepage archive
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pastpages2gif
samples
.gitignore
README.md
requirements.txt

README.md

                  _                                 ___          _  __ 
                 | |                               |__ \        (_)/ _|
  _ __   __ _ ___| |_ _ __   __ _  __ _  ___  ___     ) |   __ _ _| |_ 
 | '_ \ / _` / __| __| '_ \ / _` |/ _` |/ _ \/ __|   / /   / _` | |  _|
 | |_) | (_| \__ \ |_| |_) | (_| | (_| |  __/\__ \  / /_  | (_| | | |  
 | .__/ \__,_|___/\__| .__/ \__,_|\__, |\___||___/ |____|  \__, |_|_|  
 | |                 | |           __/ |                    __/ |      
 |_|                 |_|          |___/                    |___/       

Create an animated GIF from the PastPages news homepage archive. An experiment with the PastPages API.

Examples

Start with something simple

import pastpages2gif
from datetime import datetime

pastpages2gif.get_site(
    "./bbc.gif",
    "bbc",
    datetime(2012, 12, 31, 18, 0, 0),
    datetime(2013, 1, 1, 6, 0, 0),
    verbose=True
)

BBC Fiscal Cliff

Now with timezones

import pytz
import pastpages2gif
from datetime import datetime

pastpages2gif.get_site(
    "./boston-bombing.gif",
    "bostoncom",
    datetime(2013, 4, 15, 11, 0, 0).replace(tzinfo=pytz.timezone("US/Eastern")),
    datetime(2013, 4, 17, 11, 0, 0).replace(tzinfo=pytz.timezone("US/Eastern")),
    verbose=True
)

Boston Bombing

Now with custom speed and size

import pytz
import pastpages2gif
from datetime import datetime

pastpages2gif.get_site(
    "./drudge-report.gif",
    "drudge-report",
    datetime(2012, 11, 6, 4, 0, 0).replace(tzinfo=pytz.timezone("US/Eastern")),
    datetime(2012, 11, 7, 4, 0, 0).replace(tzinfo=pytz.timezone("US/Eastern")),
    duration=1.0,
    max_width=900,
    max_height=2000,
    verbose=True
)

Four more tears