README.md in thinreports-0.12.0 vs README.md in thinreports-0.12.1

- old
+ new

@@ -1,37 +1,49 @@ # Thinreports Generator [![Gem Version](https://badge.fury.io/rb/thinreports.svg)](http://badge.fury.io/rb/thinreports) [![Test](https://github.com/thinreports/thinreports-generator/workflows/Test/badge.svg)](https://github.com/thinreports/thinreports-generator/actions) -[![Maintainability](https://api.codeclimate.com/v1/badges/054b400031608957ec4a/maintainability)](https://codeclimate.com/github/thinreports/thinreports-generator/maintainability) -[Thinreports](http://www.thinreports.org) is an open source report generating tool for Ruby. +A Ruby library for [Thinreports](https://github.com/thinreports/thinreports). - * Thinreports Editor (GUI Designer) - * Thinreports Generator (Report Generator for Ruby) +## Prerequisites -## Getting Started +### Supported Versions - * [Installation Guide](http://www.thinreports.org/documentation/getting-started/installation.html) - * [Quick Start Guide](http://www.thinreports.org/documentation/getting-started/quickstart.html) - * [Examples](https://github.com/thinreports/thinreports-examples) - * [Changelog](https://github.com/thinreports/thinreports-generator/blob/master/CHANGELOG.md) - * [Discussion Group (GitHub Discussions)](https://github.com/thinreports/thinreports/discussions) - * [Discussion Group (Google Groups)](https://groups.google.com/forum/#!forum/thinreports) +- Ruby 2.5, 2.6, 2.7, 3.0 +- JRuby 9.2 +- Prawn 2.2, 2.3, 2.4 -## Supported versions +## Installation - * Ruby 2.5, 2.6, 2.7, 3.0 - * Prawn 2.2, 2.3, 2.4 - * JRuby 9.2 +Add this line to your application's Gemfile: -## Quick Reference +```ruby +gem 'thinreports' +``` -**NOTE:** You need to create a layout file `.tlf` using [Thinreports Editor](http://www.thinreports.org/features/editor/). +And then execute: -### Basic Objects and Basic Usage + $ bundle install +Or install it yourself as: + + $ gem install thinreports + + +## Getting Started + +First of all, check out [the README](https://github.com/thinreports/thinreports#getting-started) for an overview of Thinreports, its features, the two template formats available, and a complete example with template files and Ruby code. + +## Usage + +See [the README](https://github.com/thinreports/thinreports) for usage of the Section Format. + +### Basic Format + +The template file (`.tlf`) must be created in [the Basic Editor of the Thinreports Editor](https://github.com/thinreports/thinreports-editor/tree/master/basic-editor). + ```ruby require 'thinreports' report = Thinreports::Report.new layout: 'report.tlf' @@ -101,11 +113,11 @@ # : end end ``` -### Report and Page +#### Report and Page ```ruby report = Thinreports::Report.new layout: 'foo.tlf' 3.times { report.start_new_page } @@ -119,11 +131,11 @@ report.add_blank_page report.pages.last # => Report::BlankPage ``` -### Using multiple layouts +#### Using multiple layouts ```ruby report = Thinreports::Report.new report.use_layout '/path/to/default.tlf', default: true @@ -140,11 +152,11 @@ report.start_new_page layout: '/path/to/other2.tlf' do |page| # use '/path/to/other2.tlf' layout end ``` -### Callbacks +#### Callbacks ```ruby report = Thinreports::Report.new layout: 'foo.tlf' # It will be called before finalizing each page @@ -153,11 +165,11 @@ end ``` See also [features/report_callbacks](https://github.com/thinreports/thinreports-generator/tree/master/test/features/report_callbacks). -### List +#### List ```ruby report = Thinreports::Report.new layout: 'list.tlf' report.list.header do |header| @@ -202,11 +214,11 @@ end ``` See also [features/list_events](https://github.com/thinreports/thinreports-generator/tree/master/test/features/list_events). -### Page Number +#### Page Number ```ruby # Setting starting number of page report.start_page_number_from 5 @@ -223,11 +235,11 @@ end ``` See also [features/page_number](https://github.com/thinreports/thinreports-generator/blob/master/test/features/page_number) and [features/page_number_with_list](https://github.com/thinreports/thinreports-generator/blob/master/test/features/page_number_with_list). -### Configuring fallback fonts +#### Configuring fallback fonts ```ruby Thinreports.configure do |config| config.fallback_fonts = '/path/to/fallback.ttf' end @@ -235,36 +247,13 @@ Thinreports.config.fallback_fonts = ['/path/to/font_a.ttf', '/path/to/font_b.ttf'] ``` See also [features/eudc](https://github.com/thinreports/thinreports-generator/blob/master/test/features/eudc). -## Features - -Features of Editor is [here](http://www.thinreports.org/features/editor/). - -### Easy to generate PDF - -Design layout using Editor, then embed values to text field in layout. - -### Simple runtime environment - -Ruby, RubyGems, Prawn and Generator. - -### Dynamic operation - -Generator can dynamically: - - * change value of TextBlock and ImageBlock - * change style (border, fill, visibility, position, color, font) of Shape - -### Others - - * External characters (Gaiji) for Japanese - ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/thinreports/thinreports-generator. +Bug reports and pull requests are welcome on GitHub at https://github.com/thinreports/thinreports-generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/thinreports/thinreports/blob/master/CODE_OF_CONDUCT.md). ## Development ### How to run feature tests @@ -277,21 +266,21 @@ ### How to develop in Docker container You can use the Docker container for development. This container contains the libraries required for testing, such as diff-pdf. ``` -$ docker build -t thinreports-dev . -$ docker run -v $PWD:/thinreports:cached -it thinreports-dev bash +$ docker pull ghcr.io/hidakatsuya/ruby-with-diff-pdf:latest +$ docker run -v $PWD:/src:cached -it ghcr.io/hidakatsuya/ruby-with-diff-pdf bash -> /thinreports# +> /src# ``` You can run test: ``` -> /thinreports# bundle install -> /thinreports# bundle exec rake test:features +> /src# bundle install +> /src# bundle exec rake test:features ``` ## Releasing Generator 1. Update the version number in `version.rb` @@ -301,10 +290,10 @@ 5. Is the master CI green? If not, make it green 6. Run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to rubygems.org ## License -Thinreports Generator is licensed under the [MIT-License](https://github.com/thinreports/thinreports-generator/blob/master/MIT-LICENSE). +The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). ## Copyright -© 2010-2015 [Matsukei Co.,Ltd](http://www.matsukei.co.jp). +(c) 2021 [Matsukei Co.,Ltd](http://www.matsukei.co.jp).