Sha256: eb8a6c982cfc9bf9dd37e72ee9e9d640dacb9b59f03b35d8024eef2b09770aa6

Contents?: true

Size: 1.41 KB

Versions: 2

Compression:

Stored size: 1.41 KB

Contents

docxtor2
========

[![Build Status](https://travis-ci.org/vyorkin/docxtor2.png?branch=master)](https://travis-ci.org/vyorkin/docxtor2)
[![Coverage Status](https://coveralls.io/repos/vyorkin/docxtor2/badge.png)](https://coveralls.io/r/vyorkin/docxtor2)
[![Dependency Status](https://gemnasium.com/vyorkin/docxtor2.png)](https://gemnasium.com/vyorkin/docxtor2)
[![Gem Version](http://stillmaintained.com/vyorkin/docxtor2.png)](http://stillmaintained.com/vyorkin/docxtor2)

## Summary

Ruby docx generator

## Installation

Add this line to your application's Gemfile:

    gem 'docxtor2'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install 'docxtor2'

## Usage

```
stream = Docxtor2.generate do
  table_of_contents "Contents"
  h 1, "heading1"

  p "text1", :b => true do
    style 'p1'
    spacing :before => 80, :after => 240
    italic; u

    w "text2"
    br
    write "text3"
  end

  h 2 do
    w "heading2"
    line_break
    write "some text"
    br
    write "another text"
  end

  p "content", :style => 'p2', :i => true, :align => 'center'
end

file = File.new('test.docx', 'w')
file.write(stream.string)
file.close
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

run tests:

    turn -Itest test/lib

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docxtor2-0.0.9 README.md
docxtor2-0.1.0 README.md