pythonicrubyist / ruby_powerpoint Goto Github PK
View Code? Open in Web Editor NEWA PowerPont parser in Ruby.
Home Page: http://rubygems.org/gems/ruby_powerpoint
License: MIT License
A PowerPont parser in Ruby.
Home Page: http://rubygems.org/gems/ruby_powerpoint
License: MIT License
I would like to parse and change the powerpoint text. What is the best way of going about this?
I followed the example and wanted to export the images of a pptx like this:
deck.slides.each do |slide|
File.open('temp.jpg', 'w'){|f| f.puts slide.images[0]}
end
the saved files are not valid images.
when I open them in an editor the only contain the line: #<Zip::InputStream:
are the generated files zip that need to be uncompressed?
Iterating over slide notes when notes are missing for some of slides throws this error.
This is the offending line:
It is really problematic because there's no clean way to recover from this error without using rescue nil
.
Edit: I checked the code again with the sample.pptx included in the specs/fixtures but couldn't reproduce it with sample.pptx. Not sure what could be causing it. I have 3 ppts and all of them exhibit the same behavior. I am afraid I am unable to share those ppts I'll see if I can try reproducing it with the included sample.pptx
It took me too long to figure out that the last entry in the ppt note array is the slide number. Could you please document this?
Another suggestion I would like to make is to return the notes_content as a hash instead of an array.
{
<slide_number>: [note_content]
}
Hey, Amazing gem.
I wanted to know if it is possible to data from charts in the slide of pptx file.
If yes, please let me know how, It will be huge help. Even getting the chart title is enough.
In the attached screenshot, I want the text written in the titles/content itself.
Using your gem, I am able to get ["2 (Text)", "3 (Table)", "4 (Image)"]
as output, but wanted to get [ "1 (Chart)", "2 (Text)", "3 (Table)", "4 (Image)"]
returned from slide.content
.
Thank you.
Warm regards,
Anuj Mohatkar
Hello,
I was wondering whether this library supports extracting entire powerpoint slides (rather than just the data)? Ideally I'm hoping to create a new file from a subset of the slides in a larger powerpoint presentation.
Thank you!
Hi thanks to help me, is it possible to get a background image ?
thanks.
I was looking for a way to find notes separately, is there any ?
It is just a suggestion. This gem not support ppt files, so. If the scenario is extract the content from each ppt slide this gem does not help.
The code below convert the ppt file in a pptx file.
libreoffice --headless --invisible --convert-to pptx *.ppt
Maybe put this code to convert the file is a way to support ppt.
Anyway tnks for this gem, help me a lot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.