Categorygithub.com/tableauio/tableau
modulepackage
0.11.0
Repository: https://github.com/tableauio/tableau.git
Documentation: pkg.go.dev

# README

Tableau

Modern Configuration Converter

Release Status Testing Status Code Coverage GitHub release (latest SemVer including pre-releases) go.dev GitHub

Tableau

A modern configuration converter based on Protobuf (proto3).

Features

  • Convert Excel/CSV/XML/YAML to JSON/Text/Bin.
  • Use Protobuf to define the structure of Excel/CSV/XML/YAML.
  • Use Golang to develop the conversion engine.
  • Support multiple programming languages, thanks to Protobuf (proto3).

Concepts

  • Importer:
    • imports a Excel/CSV file to a in-memory book of Table sheets.
    • imports a XML/YAML file to a in-memory book of Document sheets.
  • Parsers:
    • protogen: converts Excel/CSV/XML/YAML files to Protoconf files.
    • confgen: converts Excel/CSV/XML/YAML with Protoconf files to JSON/Text/Bin files.
  • Exporter:
    • protogen: exports a tableau.Workbook to a proto file.
    • confgen: exports a protobuf message to a JSON/Text/Bin file.
  • Protoconf: a dialect of Protocol Buffers (proto3) extended with tableau options, aimed to define the structure of Excel/CSV/XML/YAML.

Design

See official document: Design.

Contribution

Requirements

Protobuf

Goto Protocol Buffers v21.12, choose and download the correct platform of protoc, then install by README.

protoc-gen-go

Install: go install google.golang.org/protobuf/cmd/[email protected]

# Packages

No description provided by the author
No description provided by the author
Package load provides functions to load a protobuf message from different formats: - generated fomats: json, bin, txt - origin formats: xlsx, csv, xml, yaml.
Refer: https://github.com/go-eden/slf4go https://github.com/go-eden/slf4go-zap.
No description provided by the author
No description provided by the author
Package store provides functions to store a protobuf message to different formats: json, bin, and txt.
No description provided by the author
No description provided by the author

# Functions

GenConf can convert Excel/CSV/XML/YAML files to different configuration files: JSON, Text, and Bin.
Generate can convert Excel/CSV/XML/YAML files to protoconf files and different configuration files: JSON, Text, and Bin at the same time.
GenProto can convert Excel/CSV/XML/YAML files to protoconf files.
GetVersionInfo returns VersionInfo of tableau.
NewConfGenerator creates a new conf generator.
NewConfGeneratorWithOptions creates a new conf generator with options.
NewImporter creates a new importer of the specified workbook.
NewProtoGenerator creates a new proto generator.
NewProtoGeneratorWithOptions creates a new proto generator with options.
Proto2Excel converts protoconf files to excel files (with tableau header).
SetLang sets the default language.

# Constants

No description provided by the author

# Structs

VersionInfo holds versions of tableau'd main modules and VCS info.