{"id":31647622,"url":"https://github.com/invaderzim85/zimlabs.tablecreator","last_synced_at":"2025-10-07T06:44:27.320Z","repository":{"id":65701546,"uuid":"308975826","full_name":"InvaderZim85/ZimLabs.TableCreator","owner":"InvaderZim85","description":"Library to create a \"table\" (ASCII-style, markdown, csv) of a list of values","archived":false,"fork":false,"pushed_at":"2025-07-25T07:15:49.000Z","size":282,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T16:31:27.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InvaderZim85.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-31T21:34:49.000Z","updated_at":"2025-07-25T07:13:43.000Z","dependencies_parsed_at":"2025-02-14T21:26:51.120Z","dependency_job_id":"74991625-e67d-4dbd-b161-64d1dac320b5","html_url":"https://github.com/InvaderZim85/ZimLabs.TableCreator","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/InvaderZim85/ZimLabs.TableCreator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvaderZim85%2FZimLabs.TableCreator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvaderZim85%2FZimLabs.TableCreator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvaderZim85%2FZimLabs.TableCreator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvaderZim85%2FZimLabs.TableCreator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InvaderZim85","download_url":"https://codeload.github.com/InvaderZim85/ZimLabs.TableCreator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvaderZim85%2FZimLabs.TableCreator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734434,"owners_count":26036404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T06:44:23.685Z","updated_at":"2025-10-07T06:44:27.313Z","avatar_url":"https://github.com/InvaderZim85.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZimLabs.TableCreator\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/InvaderZim85/ZimLabs.TableCreator)](https://github.com/InvaderZim85/ZimLabs.TableCreator/releases) [![Nuget](https://img.shields.io/nuget/v/ZimLabs.TableCreator)](https://www.nuget.org/packages/ZimLabs.TableCreator/)\n\nThis library is not very special :) It takes a list of objects and creates an ASCII \"table\", markdown table or a CSV list. Very simple and straight forward.\n\n---\n\n**Content**\n\n\u003c!-- TOC --\u003e\n\n- [Install](#install)\n- [Usage](#usage)\n- [Known issues](#known-issues)\n- [Changelog](#changelog)\n    - [Version 3.1.0](#version-310)\n    - [Version 3.0.0](#version-300)\n    - [Version 2.1.1](#version-211)\n    - [Version 2.1.0](#version-210)\n    - [Version 2.0.2](#version-202)\n    - [Version 2.0.1](#version-201)\n    - [Version 2.0.0](#version-200)\n    - [Version 1.5.0](#version-150)\n\n\u003c!-- /TOC --\u003e\n\n## Install\n\n```\nPM \u003e Install-Package ZimLabs.TableCreator\n```\n\n## Usage\n\nAttributes:\n\n```csharp\ninternal sealed class Person\n{\n    [Appearance(TextAlign = TextAlign.Right, Order = 1)]\n    public int Id { get; set; }\n\n    [Appearance(Name = \"First name\", Order = 3)]\n    public string Name { get; set; }\n\n    [Appearance(Order = 2)]\n    public string LastName { get; set; }\n\n    [Appearance(Name = \"E-Mail\", Order = 4)]\n    public string Mail { get; set; }\n\n    [Appearance(Ignore = true)]\n    public string Gender { get; set; }\n\n    [Appearance(Name = \"Job title\")]\n    public string JobTitle { get; set; }\n\n    [Appearance(Format = \"yyyy-MM-dd\")]\n    public DateTime Birthday { get; set; }\n}\n```\n\n\u003e **Note**: If not all properties have an Order value, the following order is applied:\n\n1. occurrence in the class\n2. order according to Order value\n\nUsage of the Create / Save methods:\n\n```csharp\nvar personList = CreateDummyList().ToList();\n\n// Print the complete list\nConsole.WriteLine(\"Person List\");\nConsole.WriteLine(personList.CreateTable());\n\n// Save the person list\npersonList.SaveTable(\"PersonList.txt\");\n\n// Print a single person\nvar person = personList.FirstOrDefault();\n\nConsole.WriteLine(\"Single person\");\nConsole.WriteLine(\"Value list\");\nConsole.WriteLine(person.CreateValueList());\n\nConsole.WriteLine(\"Value table\");\nConsole.WriteLine(person.CreateValueTable());\n\n// Save the person (as value list)\nperson.SaveValue(\"FileName.txt\");\n\n// Save the person (as table)\nperson.SaveValueAsTable(\"FileName.txt\");\n\nConsole.WriteLine(\"Done\");\nConsole.ReadLine();\n```\n\nThe result:\n\n```\nPerson List\n+-------------------------------+------------+----+-------------+------------+-------------------------------+\n| Job title                     | Birthday   | Id | LastName    | First name | E-Mail                        |\n+-------------------------------+------------+----+-------------+------------+-------------------------------+\n| Environmental Tech            | 1968-03-26 |  1 | Giblin      | Tommy      | tgiblin0@amazon.co.uk         |\n| Teacher                       | 1952-04-24 |  2 | Puden       | Sven       | spuden1@soundcloud.com        |\n| VP Quality Control            | 1965-04-10 |  3 | Czaple      | Garvy      | gczaple2@com.com              |\n| Pharmacist                    | 1986-07-23 |  4 | Mariotte    | Eryn       | emariotte3@issuu.com          |\n| Senior Financial Analyst      | 1967-11-09 |  5 | Oiseau      | Zaccaria   | zoiseau4@huffingtonpost.com   |\n+-------------------------------+------------+----+-------------+------------+-------------------------------+\n\nSingle person\nValue list\n- Job title.: Environmental Tech\n- Birthday..: 26/03/1968 00:00:00\n- Id........: 1\n- LastName..: Giblin\n- First name: Tommy\n- E-Mail....: tgiblin0@amazon.co.uk\n\nValue table\n+------------+-----------------------+\n| Key        | Value                 |\n+------------+-----------------------+\n| Job title  | Environmental Tech    |\n| Birthday   | 26/03/1968 00:00:00   |\n| Id         | 1                     |\n| LastName   | Giblin                |\n| First name | Tommy                 |\n| E-Mail     | tgiblin0@amazon.co.uk |\n+------------+-----------------------+\n```\n\nFor more examples take a look at the demo project.\n\n## Known issues\n\nCurrently it's possible to call the methods for a single entry with a list:\n\n```csharp\n// Wrong call\npersonList.CreateValueList();\n```\n\n~~I'll try to fix the bug in the next version (1.5).~~\n\nSince I didn't find a solution to prevent calling the method for a single value, I included a check that throws an error when trying to call the method for a single value from a list.\n\nIf you call from a list a function, which was developed only for a single value, an `NotSupportedException` with the following message will be thrown:\n\n```\nThe specified type is not supported by this method. Please choose \"CreateTable\" or \"SaveTable\" instead.\n```\n\nSorry for the inconvenience.\n\n## Changelog\n\n### Version 3.1.0\n\nRemoved the old *obsolete* methods (for more information see [Version 3.0.0](#version-300))\n\n### Version 3.0.0\n\n🚨🚨🚨 BREAKING CHANGE 🚨🚨🚨\n\nBetween the last version and this one the runtime environment has been changed! New runtime environment is **.NET 9**\n\nOther changes:\n\n- Code tidied up\n- Property `EncapsulateText` added. If the value is set to `true`, every text value is automatically set in quotation marks, regardless of which attribute is set for the corresponding property.\n\n**IMPORTANT**\n\nSeveral methods have been given the obsolete attribute. These methods will be removed in the next version!\n\nWhy? The options have been moved to a separate class. This streamlines the actual code, as the other methods only functioned as \"wrappers\". The new options class also makes it easier to use, as you can see at a glance which options have been set.\n\n### Version 2.1.1\n\n- Option `addHeader` addded, with which you can decide whether the CSV content should contain a header line.\n- Added classes for the various options to improve clarity (`TableCreateOptions` and `TableCreatorListOptions`).\n- Appearance attribute adjusted. It is now possible to specify whether the content of a property should be encapsulate in quotation marks.\n\n### Version 2.1.0\n\n- Fixed some bugs:\n    - Custom *format* was not used in some cases (`DataTable` functions)\n    - Missing `null` check in the list functions\n- Added .NET 8 support (multiple target frameworks). Now .NET 7 and .NET 8 are supported\n- Minor changes under the hood (usage of the new C# 12 features)\n\n### Version 2.0.2\n\n- Added missing api documentation\n\n### Version 2.0.1\n\n- Fixed a bug in the `DataTable` CSV generator \n\n### Version 2.0.0\n\n🚨🚨🚨 BREAKING CHANGE 🚨🚨🚨\n\nBetween the last version and this one the runtime environment has been changed! New runtime environment is **.NET 7**\n\nOther changes:\n\n- Added the support of `DataTable`\n\n### Version 1.5.0\n\nAdded check function to the following methods\n\n- `CreateValueTable`\n- `SaveValue`\n- `SaveValueAsTable`\n\nThe function checks if the given value is a list or not. If the value is a list an exception (`NotSupportedException`) will be thrown.\n\nFor more information see [Known issues](#known-issues).\n\nI also removed the documentation for the classes, because the tool I use for that doesn't seem to cope with .NET Standard, so the documentation wasn't updated anymore.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvaderzim85%2Fzimlabs.tablecreator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvaderzim85%2Fzimlabs.tablecreator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvaderzim85%2Fzimlabs.tablecreator/lists"}