Giter VIP home page Giter VIP logo

thinreports-template-cli's Introduction

Version

Thinreports Templete CLI

This command line tool is based on Thinreports.

Installation

$ gem install thinreports-template-cli

Usage

Thinreports Templete CLI is able to receive parameters of text blocks in a TLF (thinreports layout format) file as options of the command line program.

The command supports the following formats:

  • table
  • csv
  • json
  • pdf
$ thinreports-template-cli sample.tlf --help
thinreports-template-cli tlf [options]

Basic Options
        --format=table|csv|json|pdf

Thinreports Layout File Options
        --date=[DATE]                This is a sample date.
        --subject=[SUBJECT]          This is a sample subject.
        --name=[NAME]                This is a sample name.
        --number=[NUMBER]            This is a sample number.
        --date_jp=[DATE_JP]          This is a sample date for Japanese era name.

Datetime Support

  • A option value for a text block of a datetime format is parsed by DateTime#parse.
  • A text block of a datetime format is rendered by the strftime format of DateTime#strftime and era_ja.
  • If a text block of a datetime format does not have a command line option or a default value of a TLF file, this text block will be rendered with Datetime#now.

Examples

Output to a PDF file.

$ thinreports-template-cli sample.tlf --name="Your name" --date="2017-04-01" --format=pdf > sample.pdf

Output to a printer via the lpr command.

$ thinreports-template-cli sample.tlf --name="Your name" --date="2017-04-01" --format=pdf | lpr -P ApeosPort_V_C3375__aa_bb_cc_

License

The gem is available as open source under the terms of the MIT License.

Author

Masayuki Higashino

thinreports-template-cli's People

Contributors

mh61503891 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

derekzhang79

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.