Last active
August 29, 2015 14:04
-
-
Save bitops/9a37afab4cc2414cd66b to your computer and use it in GitHub Desktop.
docs and stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# omg | |
require 'bundler/setup' | |
require 'docx' | |
f = File.expand_path(File.join(File.dirname(__FILE__), "baz.docx")) | |
if File.exists? f | |
puts "It lives" | |
end | |
# Create a Docx::Document object for our existing docx file | |
doc = Docx::Document.open(f) | |
# Retrieve and display paragraphs | |
doc.paragraphs.each do |p| | |
puts p | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org/" | |
ruby "2.1.1" | |
gem 'docx', '~> 0.2.03' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEM | |
remote: http://rubygems.org/ | |
specs: | |
docx (0.2.03) | |
nokogiri (~> 1.5) | |
rubyzip (~> 0.9) | |
mini_portile (0.6.0) | |
nokogiri (1.6.3.1) | |
mini_portile (= 0.6.0) | |
rubyzip (0.9.9) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
docx (~> 0.2.03) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment