Skip to main content

CLI to generate powerpoint slides from simple text file[s]

Project description

gen-pptx-from-simple-text

CLI to generate powerpoint slides from simple text file[s]

How to install?

https://pypi.org/project/gen-pptx-from-simple-text/

pip install gen-pptx-from-simple-text

How should the simple text file like for generating pptx?

Here is a sample text file - resources/dummy.txt. Each section separated by an empty line makes a slide in the generated pptx.

How to run the CLI?

$ pptx --help
Usage: pptx [OPTIONS] LYRICS_FILES...

  A powerpoint generator.

Options:
  -pt, --pptx-template-path PATH  [required]
  -ms, --master-slide-idx INTEGER
                                  [default: 0]
  -sl, --slide-layout-idx INTEGER
                                  [default: 6]
  -fs, --font-size INTEGER        [default: 32]
  -fn, --font-name TEXT           [default: Calibri]
  -ns, --dst-dir TEXT             [default: ./generated-pptx]
  -ta, --slide-txt-alignment [left|middle|right]
                                  [default: left]
  --help                          Show this message and exit.
pptx resources/dummy.txt -pt resources/default.pptx

Notes:

  • --pptx-template-path | -pt is expecting either a directory or a pptx file. If it is a directory, pptx-builder will chose one among all the pptx files found in the same directory. The pptx template file should be without any change to master slide index or in slide layout index. If there are any changes to master slide index or slide layout, you need to pass corresponding int type to -ms and -sl options. A sample pptx template file is available here resources/black.pptx.

FAQs

How can I add same footer to all pptx[s] built using the CLI?

Add footer to pptx template file to pass with --pptx-template-path option

How to get different backgrounds for the generated pptx files using the CLI?

Create different pptx template files with different backgrounds and pass it on to --pptx-template-path option. See this video on creating pptx template file.

How to setup development environment?

git clone https://github.com/sukujgrg/pptx-builder-from-yaml.git
cd pptx-builder-from-yaml
pipenv install --dev
pipenv shell
pipenv graph

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

gen-pptx-from-simple-text-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file gen-pptx-from-simple-text-1.0.0.tar.gz.

File metadata

  • Download URL: gen-pptx-from-simple-text-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.5

File hashes

Hashes for gen-pptx-from-simple-text-1.0.0.tar.gz
Algorithm Hash digest
SHA256 35e1fe9916245e1b97ef72c70a67960ad9beb67a142a03f7910783fe5cd716e7
MD5 ccf82b563aa783128ee3fd60e64e6aff
BLAKE2b-256 d16d08b99e1cc5eef300227bd14fec7e545208ef2abb29ebf52283c90f07233b

See more details on using hashes here.

File details

Details for the file gen_pptx_from_simple_text-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gen_pptx_from_simple_text-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.5

File hashes

Hashes for gen_pptx_from_simple_text-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43b06c864b99982413c838789cde49045b484ac73b0b12470e01f95fdb862038
MD5 8bfabc864d2fdf6b22a042ac9543bd07
BLAKE2b-256 244687799db2eee19d3b977ea9cd5a941e590b5ae696dec63560412153a6d4ca

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