1 Commits

Author SHA1 Message Date
92be4f65b0 feat: add demo video 2025-07-21 01:28:20 +02:00
3 changed files with 14 additions and 17 deletions

View File

@ -1,3 +1,6 @@
# unifood
University restaurant CLI that allows to retrieve menu information
## Demo
![Demonstration video](docs/res/demo.mp4)

View File

@ -41,6 +41,7 @@ func (f *TableFormatter) Format(list *interfaces.ResourceList) (io.Reader, error
// Setup table
t := table.NewWriter()
t.SetOutputMirror(outputBuffer)
t.SetStyle(table.StyleLight)
// Write header
@ -65,22 +66,15 @@ func (f *TableFormatter) Format(list *interfaces.ResourceList) (io.Reader, error
}
// Render
output := func() string {
switch f.RenderFormat {
case tableFormatCSV:
return t.RenderCSV()
t.RenderCSV()
case tableFormatHTML:
return t.RenderHTML()
t.RenderHTML()
case tableFormatMarkdown:
return t.RenderMarkdown()
t.RenderMarkdown()
default:
return t.Render()
}
}()
_, err := outputBuffer.WriteString(output)
if err != nil {
return nil, fmt.Errorf("failed to write rendered table: %w", err)
t.Render()
}
return outputBuffer, nil

BIN
docs/res/demo.mp4 Normal file

Binary file not shown.