Skip to content

cnmasud/Python-PPT-Generate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

python-pptx-page-replacement

Auto-generate a polished 22-slide PowerPoint presentation on Page Replacement Algorithms (LRU, Clock, LFU) using python-pptx. Designed for university OS course presentations.

Features

  • 22 fully populated slides with theory, simulation traces, pros/cons, and comparison
  • Dynamic simulation — LRU, Clock, and LFU algorithms run on a configurable reference string
  • Styled trace tables — alternating rows, color-coded fault/hit cells
  • Professional design — 16:9 widescreen, navy title bar, shadow cards, accent colors
  • OS implementation details — real-world Linux, FreeBSD, Windows, Redis examples
  • No external dependencies beyond python-pptx — all visuals built with shapes and fills

Slide Structure

Slides Section
1–2 Title & Agenda
3–6 Introduction & Motivation
7–10 LRU Algorithm (Theory, How It Works, Simulation, Pros & Cons)
11–14 Clock Algorithm (Theory, How It Works, Simulation, Pros & Cons)
15–18 LFU Algorithm (Theory, How It Works, Simulation, Pros & Cons)
19–20 Comparison & Summary
21–22 References & Questions

Requirements

  • Python 3.8+
  • python-pptx
pip install python-pptx

Usage

python generate_ppt.py

Output: Page_Replacement_Algorithms.pptx in the same directory.

Configuration

Edit the top of generate_ppt.py to customize:

REF_STRING = [7, 0, 1, 2, 0, 3, 0, 4, 2, 3]  # Page reference string
NUM_FRAMES = 3                                   # Number of physical frames

Color Palette

Element Hex Usage
Navy #1B2A4A Title bar
Primary Blue #2E86C1 LRU theme, accents
Teal #1ABC9C Clock theme
Purple #8E44AD LFU theme
Amber #F39C12 Highlights
Green #27AE60 Advantages
Red #E74C3C Disadvantages

Logo

Place a logo.png in the same directory as the script. It will automatically appear in the top-right corner of every slide. If no logo is found, a placeholder rectangle is used.

Output Preview

The generated presentation includes:

  • Geometric accent shapes on title/closing slides
  • Horizontal card-based agenda with color progression
  • Two-column green/red pros & cons cards with accent bars
  • Comparison table with colored dots (🟢🟡🔴) and algorithm-themed headers
  • Full-width example footer strips with contextual tips

License

MIT

About

Auto-generate a polished 22-slide PowerPoint presentation on Page Replacement Algorithms (LRU, Clock, LFU) using python-pptx. Includes simulation traces, styled tables, and OS-level implementation details

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages