How to read individual slide from ppt using tika package in python? - python-3.x

I want to compare data in two pptx file and show the differences if any using python.
I have tried with below code, but it is giving all content in single file. No way to segregate data based on slides.
I am able to read all content of pptx using tika but I need slide wise content to compare with other pptx file.
from tika import parser
parsed = parser.from_file('act.pptx')
act =parsed['content']
act=act.strip().replace('\n',' ')
Expected result is store each slide one text file.
Actual result is I am getting all slides data into one text file.

Related

Python reading pdf files

How can i use jupyter lab to read and extract tables from pdf files
A typical pdf file with text tilles subtitles and tables in between. I need the coding to extract the table under a specific title, and cleaning some unwanted text like page numbers
What are some of the coding to do that ?
Tabula-py: you can parse a PDF and convert it into a CSV, TSV, JSON, or a pandas DataFrame.

How to parse a pdf file and extract tables with their titles using python-camelot?

I am trying to parse some pdf files in order to extract some key information.There is number of tables in each pdf that contains a part of these information. So I tried to use camelot to extract tables and I got good results but I want to extract the title of each table because I want to do a mapping for each table with its title.
Can anyone tell me how to extract the title of table from pdf using python?

Identifying non grid tables in a word docx in python

This is the image of the docx fileI have some tables in the word file sheet from which i would like extract data from
I have tried extracting the text from the file and using regex . I tried to split the the text into tables
import docx
document = docx.Document('2.docx')
docText = b''.join([paragraph.text.encode('utf-8') for paragraph in document.paragraphs])
print (docText)
I don't really understand how to go about it using regex or is there any other method to go about it,I do want to specify the area and extarct the contents

Parse an ASCII based CSV file so EXCEL will parse out tab'ed data?

I am always getting requests to export data into a file for Excel. I work in an ASCII environment in Pick Database.
I would like to parse the text based csv so that when it's opened up in Excel, Excel would translate the parsing into separate tabs of data within the Excel document.

excel load save csv file messes with format

A 3rd party software 'Eclipse Orchestrator' saves its config file as 'csv' format. Among other things it includes camera exposure times like '1/2000' to indicate a 1/2000 sec exposure. Here a sample line from the csv file:
FOR,(VAR),0.000,5.000,49.000
TAKEPIC,MAGPRE (VAR),-,00:01:10.0,EOS450D,1/2000,9.0,100,0.000,RAW+FL,,N,Partial 450D
ENDFOR
When the csv file is loaded into Excel the screen display reads 'Jan-00'. So Excel interprets the string 1/2000 as a date. When the file is saved again as csv and inspected in an ascii editor it reads:
FOR,(VAR),0,5,49,,,,,,,,
TAKEPIC,MAGPRE (VAR),-,01:10.0,EOS450D,Jan-00,9,100,0,RAW+FL,,N,Partial 450D
ENDFOR,,,,,,,,,,,,
I had hoped to use Excel to variablearize the data and make it easier changeable. But the conversion to fake dates is not helping here.
The conversion at load-time affects the saved data format making it then unreadable for the 'Eclipse Orchestrator' program.
Any way to save the day in Excel, or just move on to write a prog to do the patching of the csv file?
Thanks,
Gert
If you import the CSV file instead of opening it, you can use the import wizard (Data ribbon > From Text) to define the data type of each column. Select Text for the exposure time and Excel will not attempt to convert it.

Resources