Not quite sure whether you just want to extract the text from PPT, or whether you want to make changes to it and save it back as a valid PPT. If it's the latter option, I think you're onto a loser!
Assuming the former, can you get the users to save in "Outline/RTF" format ? This will give you just the text, in RTF, which is fairly easy to parse.
If you have to deal with a PPT file, you might be able to write something using libole2 to open the PPT file and parse it directly, but it will not be easy! (First challenge - find the documentation for the PPT file format on msdn.microsoft.com)
Alternatively you could use something like StarOffice to convert it, but this will be very slow if you're processing lots of big presentations.
A final thought - putting religion to one side for a moment, why are you using Linux? For the cost of a PC, a Win2K licence and a Powerpoint licence (i.e. a few thousand pounds), you could save yourself lots of coding by just using Perl with Win32::OLE and controlling powerpoint directly. Your solution would be less likely to break when someone uses a powerpoint feature that StarOffice doesn't understand, too.
Chris
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|