PlaceTimelapseTool is an utility designed to record and analyze the evolution of a Reddit collaborative canvas over time. It utilizes Reddit's API to capture the real-time changes on the canvas, storing the snapshots as a sequence of images. It offers functionality for producing time-lapse videos and for defining reference sections.
PlaceTimelapseTool
| - canvas_data
| - place_2023
| - canvas
| - reference_sections
| - section1
| - section2
| - timelapses
| - canvas_analysis.py
| - canvas_archiver.py
| - authparams.py
Canvas
class represents a snapshot of the canvas at a particular time.
from canvas_analysis import Canvas
canvas = Canvas(filename, event, load_image)
ReferenceSection
instances define areas of interest on the canvas for specific analysis. You can download overlay templates into a ReferenceSection for precise tracing.
from canvas_analysis import ReferenceSection
reference_section = ReferenceSection(event_name, name, top_left, width, height, correct_image)
Event
instances represent unique events associated with a series of canvas images and reference sections.
from canvas_analysis import Event
event = Event("place_2023")
Generate time-lapse videos using the create_basic_timelapse
function from the Event
class.
event.create_basic_timelapse(reference_section_name, start_time=start_time, end_time=end_time)
Create an authparams.py
file to include your Reddit API credentials (username, password, OAuth client, OAuth secret).
To run the main archiving script, execute:
python canvas_archiver.py