Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
The Ballmer gem provides the basis for modifying Office documents in Ruby. It provides access to low-level primitives including:
PowerPoint is the only format with a higher-level abstraction that allows:
While Word and Excel don't have these abstractions, Ballmer has a "Document" class that can still be used to resolve and manipulate document parts.
Add this line to your application's Gemfile:
gem 'ballmer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ballmer
Its highly recommended to get comfortable with Nokogiri and XPath queries. Here's an example of what Ballmer can do:
require 'ballmer'
# Open a pptx file.
prez = Ballmer::Presentation.open Ballmer.path("../spec/fixtures/presentation3.pptx")
# Copy the first slide into the last position.
prez.slides.push prez.slides.first
# Lets manipulate some XML using XPath queries and Nokogiri.
prez.edit_xml 'docProps/app.xml' do |xml|
xml.at_xpath('/xmlns:Properties/xmlns:Company').content = 'Acme Inc.'
end
# Now save the file contents.
# prez.save
Microsoft Office documents are a complicating beast. I don't intend no support all functionality, but I do think there's a lot of value in higher-level abstractions for various document formats. If you are working on a project and build these abstractions I'd love to merge those with Ballmer.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that ballmer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.