TeaboxDataFormat.IO 0.1.5.1

dotnet add package TeaboxDataFormat.IO --version 0.1.5.1
                    
NuGet\Install-Package TeaboxDataFormat.IO -Version 0.1.5.1
                    
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="TeaboxDataFormat.IO" Version="0.1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TeaboxDataFormat.IO" Version="0.1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="TeaboxDataFormat.IO" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TeaboxDataFormat.IO --version 0.1.5.1
                    
#r "nuget: TeaboxDataFormat.IO, 0.1.5.1"
                    
#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.
#addin nuget:?package=TeaboxDataFormat.IO&version=0.1.5.1
                    
Install TeaboxDataFormat.IO as a Cake Addin
#tool nuget:?package=TeaboxDataFormat.IO&version=0.1.5.1
                    
Install TeaboxDataFormat.IO as a Cake Tool

TeaboxDataFormat

Library for reading and writing tab separated text data.

About

I found myself writing the same code for read and saving text data to files over and over again for various small projects, so I started this project have a package I could reuse instead.

My requirements for this project was

  • Easy to read and modify in text or spreadsheet editor. There should be no need for dedicate reader/editor for this format.
  • Allow for comments and white space.
  • Liberal in how data is ordered and forgiving of missing data.

As it has been implemented in a few various personal project.

Note that this library is still a work in process and things might change.

File Structure & usage example

Below is an example of how a file can look.

// Double slashes starts a comment that will be ignored 
!Brick	Color	Amount // Line that starts with ! names the columns (not required)
3001	Red	18 // Data is separated by tabs
3004	Blue	22 // Comment must have space or tab infront of it if line also includes data. Otherwise it will be considered part of data.

It can be read in the following way.

var data_file = TeaboxDataFile.Open<ProjectSpecificItemClass>("X:\\Sample.txt");

foreach(TeaboxDataRow row in data_table)
{
    Console.WriteLine("Part: " + row.Brick);
    Console.WriteLine("Color: " + row.Color);
    Console.WriteLine("Amount: " + row.Amount);
}

The class ProjectSpecificItemClass would look like this in code.

public class ProjectSpecificItemClass : TeaboxDataLine
{
    public string Brick { get; set; }
    public string Color { get; set; }
    public int Amount { get; set; }
}

Classes in this library are meant to be extended in project specific child classes. Which is the reason some functionality is hidden away in protected methods.

Requirements / Dependencies

  • .Net Framework 4.8
  • NUnit
  • Moq
  • Castle.Core
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.

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
0.1.5.1 170 5/27/2023
0.1.5 136 5/27/2023
0.1.3.1 1,282 9/13/2017
0.1.3 1,158 9/13/2017
0.1.2 1,151 7/27/2017
0.1.1 1,062 2/18/2017
0.1.0.1 3,735 11/22/2016
0.1.0 1,298 10/16/2016

Experimental build