In python how to extract text from a .ODF file?

A forum for general discussion of the Python programming language.

In python how to extract text from a .ODF file?

Postby vampo650 » Sat Mar 23, 2013 5:49 am

In python how to extract text from a .ODF(Open document format) file?'

Any idea? please let know..Your help is really appreciable..
vampo650
 
Posts: 9
Joined: Wed Mar 20, 2013 6:32 am

Re: In python how to extract text from a .ODF file?

Postby micseydel » Sat Mar 23, 2013 6:19 am

Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1223
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: In python how to extract text from a .ODF file?

Postby vampo650 » Sat Mar 23, 2013 9:11 am

micseydel wrote:https://pypi.python.org/pypi/odfpy


Hi,

Thanks for your response..I read the document. The author is not mentioned anywhere in the document how to extract the text form a ODF file..
@micseydel, did u work on odfpy earlier ? if yes, can you guide me how to proceed further..Thanks for advance
vampo650
 
Posts: 9
Joined: Wed Mar 20, 2013 6:32 am

Re: In python how to extract text from a .ODF file?

Postby micseydel » Sat Mar 23, 2013 9:35 am

It looks like they might require you to register as a user before giving you access to the documentation. Look around that site, and if you can't find the documentation, bug the developer to get access to it and make it easier for others to find.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1223
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: In python how to extract text from a .ODF file?

Postby vampo650 » Mon Mar 25, 2013 4:07 am

micseydel wrote:It looks like they might require you to register as a user before giving you access to the documentation. Look around that site, and if you can't find the documentation, bug the developer to get access to it and make it easier for others to find.



Hi again, I registered and I read the documentation. But I didnt find any chapter how to extract the text from ODT file..They had given ODT2HTML, ODT2XML and soon.....
vampo650
 
Posts: 9
Joined: Wed Mar 20, 2013 6:32 am

Re: In python how to extract text from a .ODF file?

Postby bbesase » Thu May 09, 2013 3:35 pm

Code: Select all
import os

path = "path/goes/here"
foundFiles = []
    for r,d,f in os.walk(path):                                                                             #cycles though every file in the the designated path
        for files in f:
            if '.Odf' in files:                                                                        #Only collects files that have "odf" in it

                path = os.path.join(r,files)
                print path



Can't you just use this?
bbesase
 
Posts: 18
Joined: Wed May 08, 2013 1:57 pm

Re: In python how to extract text from a .ODF file?

Postby metulburr » Thu May 09, 2013 6:29 pm

bbesase wrote:
Code: Select all
import os

path = "path/goes/here"
foundFiles = []
    for r,d,f in os.walk(path):                                                                             #cycles though every file in the the designated path
        for files in f:
            if '.Odf' in files:                                                                        #Only collects files that have "odf" in it

                path = os.path.join(r,files)
                print path





Can't you just use this?


in what way does this even extract anything from an ODT file like the OP requested? Not to mention this thread is somewhat old.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1387
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to General Discussions

Who is online

Users browsing this forum: DrakeMagi and 3 guests