Win32ole equivalent for Mac OS X

Is there an equivalent library for the Win32ole library on the PC? I
use this library to read word .doc files, but when I try to run the
script on Mac OS X, it doesn’t recognize it. Any possibilities?

Look at ruby cocoa

reuben doetsch wrote:

Look at ruby cocoa

Is there a word .doc format reader class in Cocoa? I wasn’t aware of
that?

Nathan L. wrote:

Is there an equivalent library for the Win32ole library on the PC? I
use this library to read word .doc files, but when I try to run the
script on Mac OS X, it doesn’t recognize it. Any possibilities?

Just to clarify, I’m trying to read a word .doc file on OS X, not do
generic automation.

On Mon, Jul 28, 2008 at 1:30 PM, Nathan L. [email protected] wrote:


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

Glen H. wrote:

On Mon, Jul 28, 2008 at 1:30 PM, Nathan L. [email protected] wrote:

Radar – O’Reilly


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

Thanks, but for some reason, I can’t install rb-appscript. I get this
error:

Building native extensions. This could take a while…
ERROR: Error installing rb-appscript:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb install rb-appscript
can’t find header files for ruby.

Gem files will remain installed in
/Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.1 for inspection.
Results logged to
/Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.1/gem_make.out
roboticbuddha:documents User$ ruby mergeAMdata.rb
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- appscript (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in require’
from mergeAMdata.rb:7

On Mon, Jul 28, 2008 at 12:54 PM, Nathan L. [email protected]
wrote:

extconf.rb install rb-appscript
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require’
from mergeAMdata.rb:7

Did you install the Xcode package? Ruby’s header files, as well as the
compiler, are not bundled with the default Mac OS X install.

Laurent

Laurent S. wrote:

On Mon, Jul 28, 2008 at 12:54 PM, Nathan L. [email protected]
wrote:

extconf.rb install rb-appscript
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require’
from mergeAMdata.rb:7

Did you install the Xcode package? Ruby’s header files, as well as the
compiler, are not bundled with the default Mac OS X install.

Laurent

No, how do I do that?

On Mon, Jul 28, 2008 at 1:58 PM, Nathan L. [email protected] wrote:

compiler, are not bundled with the default Mac OS X install.

Laurent

No, how do I do that?

http://developer.apple.com/documentation/Xcode/Conceptual/XcodeCoexistence/Contents/Resources/en.lproj/Basics/chapter_2_section_4.html

Laurent

RubyCocoa is to interface with the Cocoa API.
Cocoa is BIG.
The ability to open and read contents of .doc files is there.
Your mileage will vary of course, depending on what features of what
versions of Word are included in the file.
The Cocoa AppKit class NSTextView can display the contents easily.
You’ve got an uphill battle though, lots to learn to do it. It all
depends on what you want to do with it though.
You could easily use rb-appscript with the application TextEdit
(bundled on every OS X system with open source bundled with XCode).
That should get you enough to see if it is worth it to you.
.doc is one of many file formats native to OS X, but again, your
mileage will vary.

On Mon, Jul 28, 2008 at 1:54 PM, Nathan L. [email protected] wrote:

so loud, I can’t hear a word you’re saying."
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
gem_original_require': no such file to load -- appscript (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in require’
from mergeAMdata.rb:7

Posted via http://www.ruby-forum.com/.

Sorry, can’t help you there. I’m not at all versed in build
environments in
OS X. I would suggest checking your LD_LIBRARY_PATH and making sure the
headers for ruby are there but beyond that I have no idea.


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

On Tue, 2008-07-29 at 04:29 +0900, Nathan L. wrote:

reuben doetsch wrote:

Look at ruby cocoa

Is there a word .doc format reader class in Cocoa? I wasn’t aware of
that?

There are open source libraries that will read a Word doc. Maybe you can
interface to one of them.

  • app-text/wv
    Latest version available: 1.2.4
    Latest version installed: 1.2.4
    Unstable version: 1.2.4
    Use Flags (stable): +wmf
    Size of downloaded files: [no/bad digest]
    Homepage: http://wvware.sourceforge.net/
    Description: Tool for conversion of MSWord doc and rtf files to
    something readable
    License: GPL-2

  • app-text/wv2
    Latest version available: 0.2.3
    Latest version installed: 0.2.3
    Unstable version: 0.2.3
    Use Flags (stable): -
    Size of downloaded files: [no/bad digest]
    Homepage: http://wvware.sourceforge.net
    Description: Excellent MS Word filter lib, used in most Office
    suites
    License: LGPL-2


M. Edward (Ed) Borasky
ruby-perspectives.blogspot.com

“A mathematician is a machine for turning coffee into theorems.” –
Alfréd Rényi via Paul Erdős