TableCraft.Core 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package TableCraft.Core --version 1.0.0
NuGet\Install-Package TableCraft.Core -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TableCraft.Core" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TableCraft.Core --version 1.0.0
#r "nuget: TableCraft.Core, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TableCraft.Core as a Cake Addin
#addin nuget:?package=TableCraft.Core&version=1.0.0

// Install TableCraft.Core as a Cake Tool
#tool nuget:?package=TableCraft.Core&version=1.0.0

TableCraft

Overview

TableCraft is a general and extensible solution for parsing configuration source files, generating configuration description files and customizing configuration reading codes.

Features

TableCraft.Core

  • Define valid value types and collection types for fields
  • Add labels to fields for special handling (such as primary keys in tables)
  • Support data sources of different file types (currently supports: csv)
  • Support data descriptions of different file types (currently supports: json)
  • Use T4 Text Templates and TableCraft API to generate business code in any language
  • Support version control (currently supports: perforce)

Configuration

TableCraft.Core Configuration

libenv.json

To use the runtime library TableCraft.Core, you need to configure the libenv.json file and initialize it before use through the interface TableCraft.Core.Configuration.ReadConfigurationFromJson.

{
    // Define data value types
    "DataValueType": ["int", "uint", "float", "boolean", "string"],
    // Define collection types
    "DataCollectionType": ["none", "array"],
    // Define available field tags
    "AttributeTag": ["primary", "label1", "label2"],
    // TableCraft uses UTF8 encoding by default. Specify whether a BOM header is needed here.
    "UTF8BOM": false,
     // For csv type data source files, specify the row number where field names are located and where comments are located (if they do not exist, fill in -1).
     "CsvSource":{
        "HeaderLineIndex": 0,
        "CommentLineIndex": 1
     },
     // Specify various export code methods.
    "ConfigUsageType":{
        "usage0":{
            // T4 template file used to generate code. This file needs to be placed in the Templates directory at the same level as the executable file.
            "CodeTemplateName":"usage0-template.tt",
            // The type of generated file. In this example, c# code is generated.
            "TargetFileType":".cs",
            // The format string of the generated file name, if this string contains a file type, it will be replaced by TargetFileType
            "OutputFormat": "{0}_base"
        }
     },
    // Specify group to support exporting multiple files for each usage
    "ConfigUsageGroup":{
        "group0":[
            "usage0",
            "usage1"
        ]
    }
}

License

MIT

Copyright (c) 2023 - Boming Chen

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 148 7/13/2023
1.0.1 113 7/12/2023
1.0.0 136 7/12/2023