Coder Social home page Coder Social logo

pa-0 / pptx_notes_txt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thewilley/pptx_notes_txt

0.0 0.0 0.0 44 KB

A simple python script to extract notes from a powerpoint presentation and save them to a text file.

License: MIT License

Python 100.00%

pptx_notes_txt's Introduction

pptx_notes_txt

A simple python script to extract notes from a powerpoint presentation and save them to a text file.

Requirements

  • Python 3.6+
  • Click

Installation

pip install -r requirements.txt

Usage

Usage: pptx_notes_txt.py [OPTIONS]

  Script to extract the notes from a pptx file and write them to a text file.

Options:
  -i, --input TEXT   The path to the pptx file.  [required]
  -o, --output TEXT  The path to the output file.  [required]
  -p, --prettyprint  Write the text in a pretty format.
  -md, --markdown    Write the text in a markdown format.
  -c, --custom TEXT  The path to a custom format file.
  --help             Show this message and exit.

Example:
  python3 pptx_notes_txt.py -i <inputfile> -o <outputfile>

Try it out

Go to the root directory of the project and run the following command:

python3 pptx_notes_txt.py -i ./test/Presentation.pptx -o ./test/notes.txt -p

Formats

If you want to format the text, you can use the --prettyprint option to write the notes in a pretty format or the --markdown option to write the notes in a markdown format.

A custom format can also be specified by creating a file with the .custom extension and passing it to the --custom option. The file should contain two placeholders: {slide} and {notes}. The {slide} placeholder will be replaced with the slide number and the {notes} placeholder will be replaced with the notes. For example, the following custom format will write the notes in a markdown format:

# Slide {slide}
{notes}


You can try it out with the following command:

python3 pptx_notes_txt.py -i ./test/Presentation.pptx -o ./test/notes.txt -c ./test/myformat.custom

Which yeilds the following output:

# Slide 1
This is notes in the first slide

# Slide 2
Here are some more notes...

# Slide 3
…and even more here!

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.