Skip to main content

PowerPoint Template for python

Project description

PPTT

PyPI - Python Version PyPI PyPI download month codecov HitCount

PowerPoint Template for python

Installation

$ pip install PPTT
✨🍰✨

How to use it?

make master pptx

link how to make master pptx

master.pptx preview

master_preview

make page!

create slide.json like this

{
  "pages": [
    {
      "slide_pos": 1,
      "contents": {
        "title": {
          "text": "PPTT"
        },
        "subtitle": {
          "text": "you don't need to config design"
        }
      }
    },
    {
      "slide_pos": 2,
      "contents": {
        "title": {
          "text": "Replace Table Data"
        },
        "table": {
          "table": {
            "data_type": "key_value",
            "keys": [
              "Name",
              "Age",
              {
                "name": "Hobby",
                "data_key": "hobby"
              },
              {
                "name": {
                  "value": "Language",
                  "font": {
                    "bold": true,
                    "italic": true,
                    "underline": true,
                    "color": "#00F900"
                  }
                },
                "data_key": "language"
              }
            ],
            "data": [
              {"Name": "sinsky", "Age": 28, "hobby": "programming", "language": "korean"},
              {"Name": "summer", "Age": 4, "hobby": "reading", "language": "korean"},
              {"Name": "emmit", "Age": 30, "hobby": "lego", "language": "english"},
              {"Name": "agent", "Age": 20, "hobby": "hiding", "language": "english"},
              {
                "Name": "python",
                "Age": 38,
                "hobby": "making",
                "language": {
                  "value": "python",
                  "font": {
                    "bold": true,
                    "color": "#FFC107"
                  }
                }
              }
            ]
          }
        }
      }
    },
    {
      "slide_pos": 3,
      "contents": {
        "title": {
          "text": "Replace Chart Data"
        },
        "chart": {
          "chart": {
            "data_type": "category_data",
            "title": "this is new chart",
            "categories": ["list", "dict", "str"],
            "series": {
              "series 1": [5, 13, 8]
            }
          }
        }
      }
    },
    {
      "slide_pos": 4,
      "contents": {
        "body": {
          "text": "support multi-line\ntext\nlike this"
        },
        "table": {
          "table": {
            "data_type": "raw",
            "data": [
              [null, "1Q", {"value": "2Q", "font": {"bold": true}}],
              ["Apple", 10, {"value": 20, "font": {"italic": true}}],
              ["Google", 8, {"value": 8, "font": {"underline": true}}],
              ["AWS", 20, {"value": 15, "font": {"color": "00F900"}}]
            ]
          }
        },
        "chart": {
          "chart": {
            "data_type": "category_data",
            "categories": ["Apple", "Google", "AWS"],
            "series": {
              "1Q": [10, 8, 20],
              "2Q": [20, 6, 15]
            }
          }
        }
      }
    }
  ]
}

make ppt!

pptt make_ppt master.pptx clone.pptx -i slide.json
clone.pptx preview

master_preview

test

. ./tests.sh

Change Logs

  • 0.0.1
    • add cli version
    • cli usecase example
  • 0.0.2
  • 0.0.3
    • remove feature : I will refactoring ASAP
      • python api feature
      • template mode
    • add replace mode
    • update simple usecase example
    • support table data replace
      • support data type : raw, key_value
    • support chart data replace
      • support data type : category_data
  • 0.0.4
    • New Feature
      • support all chart data tye : xy_data, bubble_data
    • Docs
  • 0.0.5
    • Bug Fix
      • fix table replace data dose not reset issue
  • 0.0.6
    • New Feature
      • change text font style #10

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PPTT-0.0.6.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

PPTT-0.0.6-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file PPTT-0.0.6.tar.gz.

File metadata

  • Download URL: PPTT-0.0.6.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for PPTT-0.0.6.tar.gz
Algorithm Hash digest
SHA256 66a6fb6f695fb92214b68268102d2719eb260d6957cc635ba4342f0cc3552eb1
MD5 7768d27565b63fa63200218e2969824d
BLAKE2b-256 d81b2c198db83e1ae8b992fd549382aab914154270454c315b7473682113a0e2

See more details on using hashes here.

File details

Details for the file PPTT-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: PPTT-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for PPTT-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9332dc84dcf98ada60c0333cf3f406944e68b83b6f1bb5916b3b5c625b115d04
MD5 5848b3afa4dc896ee00aa78fb9abbc09
BLAKE2b-256 09f4656432dcee78497aafe421307e2a86c2efa62dec2a3ac5deeb5eaafead95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page