Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcolink/markdowntable
A simple Markdown table builder for Unity (works also on vanilla c# projects).
https://github.com/marcolink/markdowntable
csharp log markdown table unity unity3d
Last synced: 27 days ago
JSON representation
A simple Markdown table builder for Unity (works also on vanilla c# projects).
- Host: GitHub
- URL: https://github.com/marcolink/markdowntable
- Owner: marcolink
- License: apache-2.0
- Created: 2018-01-19T07:59:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-23T17:19:44.000Z (over 6 years ago)
- Last Synced: 2024-10-05T17:16:31.361Z (about 1 month ago)
- Topics: csharp, log, markdown, table, unity, unity3d
- Language: C#
- Homepage:
- Size: 2.48 MB
- Stars: 15
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MarkdownTable
A Simple Markdown table builder for Unity (works also on normal c# projects).## Usage
### Direct use of *MarkdownTableBuilder*
```csharp
var builder = new MarkdownTable.MarkdownTableBuilder()
.WithHeader("Name", "Manufacture", "Type", "Year")
.WithRow("Mary", "Aston Martin", "DB7", "1999")
.WithRow("Madeline", "Cadilac", "Eldorado", "1959")
.WithRow("Stephanie", "Chevrolet", "Bel Air", "1957")
.WithRow("Stacy", "Chevrolet", "Corvette Stingray", "1957")
.WithRow("Kate", "DeToamso", "Pantera", "1971");Debug.Log(builder.ToString());
```### *IEnumerable* Extension
```csharp
var garage = new[]
{
new {Name = "Mary", Manufacturer = "Aston Martin", Type = "DB7", Year = 1999},
new {Name = "Madeline", Manufacturer = "Cadilac", Type = "Eldorado", Year = 1959},
new {Name = "Stephanie", Manufacturer = "Chevrolet", Type = "Bel Air", Year = 1957},
new {Name = "Stacy", Manufacturer = "Chevrolet", Type = "Corvette Stingray", Year = 1957},
new {Name = "Kate", Manufacturer = "DeTomaso", Type = "Pantera", Year = 1971}
};Debug.Log(garage.ToMardownTableString());
```### Log Output
```
Name | Manufacturer | Type | Year
----------|--------------|-------------------|-----
Mary | Aston Martin | DB7 | 1999
Madeline | Cadilac | Eldorado | 1959
Stephanie | Chevrolet | Bel Air | 1957
Stacy | Chevrolet | Corvette Stingray | 1957
Kate | DeToamso | Pantera | 1971
```The output can be used as normal markup:
Name | Manufacturer | Type | Year
----------|--------------|-------------------|-----
Mary | Aston Martin | DB7 | 1999
Madeline | Cadilac | Eldorado | 1959
Stephanie | Chevrolet | Bel Air | 1957
Stacy | Chevrolet | Corvette Stingray | 1957
Kate | DeToamso | Pantera | 1971### Supported *Property/Field* Types:
* TypeCode.String
* TypeCode.Boolean
* TypeCode.Decimal
* TypeCode.Double
* TypeCode.Single
* TypeCode.Byte
* TypeCode.Int16
* TypeCode.Int32
* TypeCode.Int64
* TypeCode.SByte
* TypeCode.UInt16
* TypeCode.UInt32
* TypeCode.UInt64