AutomateTheBoringStuff.Ch13 package

Submodules

AutomateTheBoringStuff.Ch13.P1_readPDF module

Read PDF

This program uses PyPDF4 to read PDF files.

Note

AutomateTheBoringStuff.Ch13.P1_readPDF.main()[source]

AutomateTheBoringStuff.Ch13.P2_writePDF module

Write PDF

This program uses PyPDF4 to write PDF documents.

Note

AutomateTheBoringStuff.Ch13.P2_writePDF.main()[source]

AutomateTheBoringStuff.Ch13.P3_combinePDFs module

Combine PDFs

Combines all the PDFs in the current working directory into a single PDF.

Note

AutomateTheBoringStuff.Ch13.P3_combinePDFs.main()[source]

AutomateTheBoringStuff.Ch13.P4_readWord module

Read Word

This program uses docx to read Word documents.

AutomateTheBoringStuff.Ch13.P4_readWord.main()[source]

AutomateTheBoringStuff.Ch13.P5_readDocx module

Read docx

Accepts a filename of a .docx file and returns a single string value of its text.

Note

AutomateTheBoringStuff.Ch13.P5_readDocx.getText(filename: str) → str[source]

Get text

Gets text from a given .docx file.

Parameters:filename – Path to .docx file to get text from.
Returns:String with all document text.

AutomateTheBoringStuff.Ch13.P6_writeWord module

Write Word

This program uses docx to write Word documents.

Note

AutomateTheBoringStuff.Ch13.P6_writeWord.main()[source]

Module contents