https://github.com/aquasync/ruby-ole
A library for easy read/write access to OLE compound documents for Ruby
https://github.com/aquasync/ruby-ole
Keywords from Contributors
rubygem feature-flag ruby-gem grape zip-extraction mvc activerecord activejob authorization feature-toggle
Last synced: about 22 hours ago
JSON representation
Repository metadata
A library for easy read/write access to OLE compound documents for Ruby
- Host: GitHub
- URL: https://github.com/aquasync/ruby-ole
- Owner: aquasync
- License: mit
- Created: 2008-09-22T16:00:28.000Z (over 17 years ago)
- Default Branch: master
- Last Pushed: 2024-11-04T11:58:32.000Z (over 1 year ago)
- Last Synced: 2026-02-22T12:22:08.955Z (9 days ago)
- Language: Ruby
- Homepage:
- Size: 308 KB
- Stars: 78
- Watchers: 6
- Forks: 24
- Open Issues: 0
- Releases: 27
-
Metadata Files:
- Readme: README.rdoc
- Changelog: ChangeLog
- License: COPYING
README.rdoc
= Introduction
The ruby-ole library provides a variety of functions primarily for
working with OLE2 structured storage files, such as those produced by
Microsoft Office - eg *.doc, *.msg etc.
= Example Usage
Here are some examples of how to use the library functionality,
categorised roughly by purpose.
1. Reading and writing files within an OLE container
The recommended way to manipulate the contents is via the
"file_system" API, whereby you use Ole::Storage instance methods
similar to the regular File and Dir class methods.
ole = Ole::Storage.open('oleWithDirs.ole', 'rb+')
p ole.dir.entries('.') # => [".", "..", "dir1", "dir2", "file1"]
p ole.file.read('file1')[0, 25] # => "this is the entry 'file1'"
ole.dir.mkdir('newdir')
2. Accessing OLE meta data
Some convenience functions are provided for (currently read only)
access to OLE property sets and other sources of meta data.
ole = Ole::Storage.open('test_word_95.doc')
p ole.meta_data.file_format # => "MSWordDoc"
p ole.meta_data.mime_type # => "application/msword"
p ole.meta_data.doc_author.split.first # => "Charles"
3. Raw access to underlying OLE internals
This is probably of little interest to most developers using the
library, but for some use cases you may need to drop down to the
lower level API on which the "file_system" API is constructed,
which exposes more of the format details.
Ole::Storage files can have multiple files with the same name,
or with a slash in the name, and other things that are probably
strictly invalid. This API is the only way to access those files.
You can access the header object directly:
p ole.header.num_sbat # => 1
p ole.header.magic.unpack('H*') # => ["d0cf11e0a1b11ae1"]
You can directly access the array of all Dirent objects,
including the root:
p ole.dirents.length # => 5
puts ole.root.to_tree
# =>
- #
|- #
|- #
|- #
\- #
You can access (through RangesIO methods, or by using the
relevant Dirent and AllocationTable methods) information like where within
the container a stream is located (these are offset/length pairs):
p ole.root["\001CompObj"].open { |io| io.ranges } # => [[0, 64], [64, 34]]
See the documentation for each class for more details.
= Thanks
* The code contained in this project was initially based on chicago's libole
(source available at http://prdownloads.sf.net/chicago/ole.tgz).
* It was later augmented with some corrections by inspecting pole, and (purely
for header definitions) gsf.
* The property set parsing code came from the apache java project POIFS.
* The excellent idea for using a pseudo file system style interface by providing
#file and #dir methods which mimic File and Dir, was borrowed (along with almost
unchanged tests!) from Thomas Sondergaard's rubyzip.
Owner metadata
- Name:
- Login: aquasync
- Email:
- Kind: user
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/5469?v=4
- Repositories: 8
- Last ynced at: 2023-04-10T09:00:33.559Z
- Profile URL: https://github.com/aquasync
GitHub Events
Total
- Watch event: 1
- Issue comment event: 5
- Push event: 3
- Pull request event: 4
Last Year
- Watch event: 1
Committers metadata
Last synced: 2 days ago
Total Commits: 131
Total Committers: 13
Avg Commits per committer: 10.077
Development Distribution Score (DDS): 0.191
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| aquasync | a****c@g****m | 106 |
| Andrew Nesbitt | a****z@g****m | 5 |
| taichi | t****0@g****m | 4 |
| Kenichi Kamiya | k****1@g****m | 4 |
| Olle Jonsson | o****n@g****m | 2 |
| aquasync | a****c@f****c | 2 |
| Brawnski | b****g@d****m | 2 |
| Sebastián Gamboa | me@s****m | 1 |
| Romulo A. Ceccon | r****n@g****m | 1 |
| Robert Reiz | r****1@g****m | 1 |
| Koichi ITO | k****o@g****m | 1 |
| Cristian Slabu | s****n@g****m | 1 |
| Les Nightingill | l****s@o****g | 1 |
Committer domains:
- orphansofrwanda.org: 1
- sagmor.com: 1
- drwholdings.com: 1
Issue and Pull Request metadata
Last synced: about 1 month ago
Total issues: 12
Total pull requests: 17
Average time to close issues: 12 months
Average time to close pull requests: 4 months
Total issue authors: 10
Total pull request authors: 11
Average comments per issue: 2.67
Average comments per pull request: 2.12
Merged pull request: 13
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 14 days
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 3.0
Past year merged pull request: 3
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- fabianfrz (2)
- mperham (2)
- sr3d (1)
- utkarsh2102 (1)
- sunilkr (1)
- miks (1)
- reiz (1)
- dfordivam (1)
- orangethunder (1)
- windwiny (1)
Top Pull Request Authors
- andrew (6)
- olleolleolle (3)
- brawnski (2)
- reiz (2)
- taichi-ishitani (2)
- romuloceccon (1)
- 545ch4 (1)
- lazylester (1)
- koic (1)
- kachick (1)
- funny-falcon (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 13
-
Total downloads:
- rubygems: 158,388,663 total
- Total docker downloads: 54,890,290
- Total dependent packages: 24 (may contain duplicates)
- Total dependent repositories: 4,556 (may contain duplicates)
- Total versions: 77
- Total maintainers: 1
gem.coop: ruby-ole
A library for easy read/write access to OLE compound documents for Ruby.
- Homepage: https://github.com/aquasync/ruby-ole
- Documentation: http://www.rubydoc.info/gems/ruby-ole/
- Licenses: MIT
- Latest release: 1.2.13 (published almost 2 years ago)
- Last Synced: 2026-03-02T03:32:40.369Z (1 day ago)
- Versions: 27
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 79,299,718 Total
- Docker Downloads: 27,445,145
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.126%
- Downloads: 0.379%
- Maintainers (1)
rubygems.org: ruby-ole
A library for easy read/write access to OLE compound documents for Ruby.
- Homepage: https://github.com/aquasync/ruby-ole
- Documentation: http://www.rubydoc.info/gems/ruby-ole/
- Licenses: MIT
- Latest release: 1.2.13 (published almost 2 years ago)
- Last Synced: 2026-02-24T09:11:37.718Z (7 days ago)
- Versions: 27
- Dependent Packages: 24
- Dependent Repositories: 4,556
- Downloads: 79,088,945 Total
- Docker Downloads: 27,445,145
-
Rankings:
- Downloads: 0.4%
- Dependent repos count: 0.466%
- Docker downloads count: 0.847%
- Dependent packages count: 0.924%
- Average: 2.369%
- Forks count: 5.39%
- Stargazers count: 6.186%
- Maintainers (1)
proxy.golang.org: github.com/aquasync/ruby-ole
- Homepage:
- Documentation: https://pkg.go.dev/github.com/aquasync/ruby-ole#section-documentation
- Licenses: mit
- Latest release: v1.2.13 (published almost 2 years ago)
- Last Synced: 2026-02-24T09:11:39.053Z (7 days ago)
- Versions: 13
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 4.536%
- Stargazers count: 5.025%
- Average: 7.485%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
ubuntu-23.04: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Licenses:
- Latest release: 1.2.12.2-2 (published 20 days ago)
- Last Synced: 2026-02-11T06:45:06.074Z (20 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-20.04: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Licenses:
- Latest release: 1.2.11.8-2 (published 18 days ago)
- Last Synced: 2026-02-13T07:19:01.036Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.10: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Licenses:
- Latest release: 1.2.12.2-2 (published 18 days ago)
- Last Synced: 2026-02-13T18:27:50.086Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Documentation: https://packages.debian.org/bullseye/ruby-ole
- Licenses:
- Latest release: 1.2.12.2-1 (published 20 days ago)
- Last Synced: 2026-02-13T08:23:04.125Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-10: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Documentation: https://packages.debian.org/buster/ruby-ole
- Licenses:
- Latest release: 1.2.11.8-1 (published 20 days ago)
- Last Synced: 2026-02-13T04:23:32.261Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-22.04: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Licenses:
- Latest release: 1.2.12.2-1 (published 18 days ago)
- Last Synced: 2026-02-13T13:21:54.433Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Documentation: https://packages.debian.org/bookworm/ruby-ole
- Licenses:
- Latest release: 1.2.12.2-2 (published 18 days ago)
- Last Synced: 2026-02-12T23:36:40.941Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
debian-13: ruby-ole
- Homepage: https://github.com/aquasync/ruby-ole
- Documentation: https://packages.debian.org/trixie/ruby-ole
- Licenses:
- Latest release: 1.2.12.2-2 (published 19 days ago)
- Last Synced: 2026-02-13T13:18:00.850Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
- logger >= 0
- rake >= 0
- test-unit >= 0
Score: 26.099791468245964