Skip to content
Snippets Groups Projects
Verified Commit b6d7f1b5 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent 3fec23eb
No related branches found
No related tags found
No related merge requests found
Showing
with 540 additions and 88 deletions
/deployment/build/
\ No newline at end of file
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="go build requirements-manager and run create table" type="GoApplicationRunConfiguration" factoryName="Go Application"> <configuration default="false" name="go build requirements-manager and run create meta" type="GoApplicationRunConfiguration" factoryName="Go Application">
<module name="requirements-manager" /> <module name="requirements-manager" />
<working_directory value="$PROJECT_DIR$/application/source" /> <working_directory value="$PROJECT_DIR$/application/source" />
<parameters value="meta print -c id -c name -c percent -c YES -p $PROJECT_DIR$/development/examples/example1" /> <parameters value="meta print -c ID -c Title -c Created -c Version -c File -p $PROJECT_DIR$/development/examples/example1" />
<kind value="DIRECTORY" /> <kind value="DIRECTORY" />
<package value="gitlab.schukai.com/oss/utilities/requirements-manager" /> <package value="gitlab.schukai.com/oss/utilities/requirements-manager" />
<directory value="$PROJECT_DIR$/application/source" /> <directory value="$PROJECT_DIR$/application/source" />
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<configuration default="false" name="go build requirements-manager and run print overview" type="GoApplicationRunConfiguration" factoryName="Go Application"> <configuration default="false" name="go build requirements-manager and run print overview" type="GoApplicationRunConfiguration" factoryName="Go Application">
<module name="requirements-manager" /> <module name="requirements-manager" />
<working_directory value="$PROJECT_DIR$/application/source" /> <working_directory value="$PROJECT_DIR$/application/source" />
<parameters value="overview print -c ID -c Title -c Version -p $PROJECT_DIR$/development/examples/example1 -t $PROJECT_DIR$/development/examples/example1/overview.template" /> <parameters value="overview print -c ID -c Title -c Version -p $PROJECT_DIR$/development/examples/example1 -o /tmp/overview.pdf -f pdf -t $PROJECT_DIR$/development/examples/example1/overview.template" />
<kind value="DIRECTORY" /> <kind value="DIRECTORY" />
<package value="gitlab.schukai.com/oss/utilities/requirements-manager" /> <package value="gitlab.schukai.com/oss/utilities/requirements-manager" />
<directory value="$PROJECT_DIR$/application/source" /> <directory value="$PROJECT_DIR$/application/source" />
......
package main package main
import ( import (
"fmt"
"os" "os"
"os/user" "os/user"
"path" "path"
...@@ -24,6 +23,28 @@ var ( ...@@ -24,6 +23,28 @@ var (
} }
) )
const defaultTemplate = `
## Overview
Created: {{ .created }}
{{.Meta}}
## Tasks
{{.Tasks}}
## Items
{{.Items}}
## requirements
{{.Requirements}}
`
// Exporting interface instead of struct // Exporting interface instead of struct
//type Configuration interface{} //type Configuration interface{}
...@@ -40,7 +61,7 @@ type Configuration struct { ...@@ -40,7 +61,7 @@ type Configuration struct {
} `yaml:"table"` } `yaml:"table"`
Overview struct { Overview struct {
Template string `yaml:"columns"` Template string `yaml:"template"`
} `yaml:"overview"` } `yaml:"overview"`
} }
...@@ -71,6 +92,8 @@ type commandLineOptions struct { ...@@ -71,6 +92,8 @@ type commandLineOptions struct {
Print struct { Print struct {
Columns []string `short:"c" long:"column" description:"defines the columns used"` Columns []string `short:"c" long:"column" description:"defines the columns used"`
TemplatePath string `short:"t" long:"template" description:"file name of the template of the overview page"` TemplatePath string `short:"t" long:"template" description:"file name of the template of the overview page"`
Output string `short:"o" long:"output" description:"redirect output to a file"`
Format string `short:"f" long:"format" description:"the desired output format (pdf, md)"`
} `command:"print"` } `command:"print"`
} `command:"overview"` } `command:"overview"`
Version struct { Version struct {
...@@ -138,11 +161,14 @@ func NewConfiguration() (*flags.Command, *commandLineOptions, *Configuration) { ...@@ -138,11 +161,14 @@ func NewConfiguration() (*flags.Command, *commandLineOptions, *Configuration) {
} }
if arguments.Overview.Print.TemplatePath != "" { if arguments.Overview.Print.TemplatePath != "" {
dat, err := os.ReadFile(arguments.Overview.Print.TemplatePath) template, err := os.ReadFile(arguments.Overview.Print.TemplatePath)
if err != nil { if err != nil {
printErrorAndExit(exitCodeCatchAll, "the specified template "+arguments.Overview.Print.TemplatePath+" was not found.") printErrorAndExit(exitCodeCatchAll,
"the specified template", arguments.Overview.Print.TemplatePath)
} }
fmt.Print(string(dat)) cfg.Overview.Template = string(template)
} else {
cfg.Overview.Template = defaultTemplate
} }
} }
case "meta": case "meta":
...@@ -160,6 +186,10 @@ func NewConfiguration() (*flags.Command, *commandLineOptions, *Configuration) { ...@@ -160,6 +186,10 @@ func NewConfiguration() (*flags.Command, *commandLineOptions, *Configuration) {
func validateColumns(columns []string) []string { func validateColumns(columns []string) []string {
//for i, column := range columns {
// columns[i] = printer.Sprintf(column)
//}
// VALIDATE COLUMS NAME // VALIDATE COLUMS NAME
// //
...@@ -176,15 +206,10 @@ func validateColumns(columns []string) []string { ...@@ -176,15 +206,10 @@ func validateColumns(columns []string) []string {
} }
func processError(err error) {
fmt.Println(err)
os.Exit(2)
}
func readFile(cfg *Configuration, filename string) { func readFile(cfg *Configuration, filename string) {
f, err := os.Open(filename) f, err := os.Open(filename)
if err != nil { if err != nil {
processError(err) printErrorAndExit(2, err.Error())
} }
defer f.Close() defer f.Close()
...@@ -192,6 +217,6 @@ func readFile(cfg *Configuration, filename string) { ...@@ -192,6 +217,6 @@ func readFile(cfg *Configuration, filename string) {
decoder := yaml.NewDecoder(f) decoder := yaml.NewDecoder(f)
err = decoder.Decode(cfg) err = decoder.Decode(cfg)
if err != nil { if err != nil {
processError(err) printErrorAndExit(2, err.Error())
} }
} }
...@@ -36,7 +36,7 @@ func GetPageData(directory string) (error, []pageData) { ...@@ -36,7 +36,7 @@ func GetPageData(directory string) (error, []pageData) {
err, p := importData(content) err, p := importData(content)
if err != nil { if err != nil {
printError(cleanedPath + " does not contain a valid yaml definition") printError("does not contain a valid yaml definition", cleanedPath)
return nil return nil
} }
......
...@@ -12,8 +12,8 @@ type Item struct { ...@@ -12,8 +12,8 @@ type Item struct {
Group string `yaml:"Group"` Group string `yaml:"Group"`
Description string `yaml:"Description"` Description string `yaml:"Description"`
DeliveryUntil time.Time `yaml:"Delivery until"` DeliveryUntil time.Time `yaml:"Delivery until"`
providedOn time.Time `yaml:"Provided on"` ProvidedOn time.Time `yaml:"Provided on"`
providedBy string `yaml:"Provided by"` ProvidedBy string `yaml:"Provided by"`
} }
func buildItemTable(config *Configuration, pageDataList []pageData) (error, string) { func buildItemTable(config *Configuration, pageDataList []pageData) (error, string) {
...@@ -22,7 +22,14 @@ func buildItemTable(config *Configuration, pageDataList []pageData) (error, stri ...@@ -22,7 +22,14 @@ func buildItemTable(config *Configuration, pageDataList []pageData) (error, stri
table := tablewriter.NewWriter(buf) table := tablewriter.NewWriter(buf)
table.SetHeader([]string{"Group", "Description", "Delivery until", "Provided on", "Provided by", "File"}) table.SetHeader([]string{
printer.Sprintf("Group"),
printer.Sprintf("Description"),
printer.Sprintf("Delivery until"),
printer.Sprintf("Provided on"),
printer.Sprintf("Provided by"),
printer.Sprintf("File"),
})
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|") table.SetCenterSeparator("|")
...@@ -38,13 +45,18 @@ func buildItemTable(config *Configuration, pageDataList []pageData) (error, stri ...@@ -38,13 +45,18 @@ func buildItemTable(config *Configuration, pageDataList []pageData) (error, stri
} else { } else {
db = info.DeliveryUntil.Format(config.Locale.DateFormat) db = info.DeliveryUntil.Format(config.Locale.DateFormat)
} }
if info.providedOn.IsZero() { if info.ProvidedOn.IsZero() {
db = "—" do = "—"
} else { } else {
db = info.providedOn.Format(config.Locale.DateFormat) do = info.ProvidedOn.Format(config.Locale.DateFormat)
} }
tableData = append(tableData, []string{info.Group, info.Description, db, do, info.providedBy, pageData.File}) //text := info.Description + ", "
//text += printer.Sprintf("Group") + ": " + info.Group + ", "
//text += printer.Sprintf("File") + ": " + pageData.File
tableData = append(tableData, []string{info.Group, info.Description, db, do, info.ProvidedBy, pageData.File})
//tableData = append(tableData, []string{text, db, do, info.ProvidedBy})
} }
} }
......
...@@ -6,41 +6,224 @@ import ( ...@@ -6,41 +6,224 @@ import (
"golang.org/x/text/message/catalog" "golang.org/x/text/message/catalog"
) )
type l10nEntry struct { type l10nLocaleTranslation struct {
tag, key string tag string
msg interface{} msg interface{}
} }
type l10nKeyTranslation struct {
key string
tm []l10nLocaleTranslation
}
var l10nEntries = [...]l10nEntry{ var l10nMap = []l10nKeyTranslation{
{"en", "ToDo", "ToDo"}, {
{"en", "Due", "Due"}, "does not contain a valid yaml definition",
{"en", "File", "File"}, []l10nLocaleTranslation{
{"de", "ToDo", "Aufgabe"}, {"de", "\"%s\" enthält keine gültige yaml Struktur."},
{"de", "Due", "Erledigen bis"}, {"en", "\"%s\" does not contain a valid yaml definition."},
{"de", "File", "Datei"}, },
},
//{"en", "%d task(s) remaining!", plural.Selectf(1, "%d", {
// "=1", "One task remaining!", "the specified template",
// "=2", "Two tasks remaining!", []l10nLocaleTranslation{
// "other", "[1]d tasks remaining!", {"de", "Das angegebene Template \"%s\" wurde nicht gefunden."},
//)}, {"en", "the specified template \"%s\" was not found."},
//{"el", "%d task(s) remaining!", plural.Selectf(1, "%d", },
// "=1", "Μία εργασία έμεινε!", },
// "=2", "Μια-δυο εργασίες έμειναν!", {
// "other", "[1]d εργασίες έμειναν!", "the due of the todo cannot be parsed",
//)}, []l10nLocaleTranslation{
{"de", "Das Datum %s der Aufgabe \"%s\" kann nicht verarbeitet werden."},
{"en", "the due %s of the todo \"%s\" cannot be parsed."},
},
},
{
"ToDo",
[]l10nLocaleTranslation{
{"de", "Aufgabe"},
{"en", "task"},
},
},
{
"Due",
[]l10nLocaleTranslation{
{"de", "Bis"},
{"en", "due"},
},
}, {
"File",
[]l10nLocaleTranslation{
{"de", "Datei"},
{"en", "file"},
},
}, {
"Group",
[]l10nLocaleTranslation{
{"de", "Gruppe"},
{"en", "Group"},
},
},
{
"Description",
[]l10nLocaleTranslation{
{"de", "Beschreibung"},
{"en", "Description"},
},
},
{
"Delivery until",
[]l10nLocaleTranslation{
{"de", "Bis"},
{"en", "until"},
},
},
{
"Provided on",
[]l10nLocaleTranslation{
{"de", "Am"},
{"en", "on"},
},
},
{
"Provided by",
[]l10nLocaleTranslation{
{"de", "Von"},
{"en", "by"},
},
},
{
"Type",
[]l10nLocaleTranslation{
{"de", "Typ"},
{"en", "Type"},
},
},
{
"Title",
[]l10nLocaleTranslation{
{"de", "Titel"},
{"en", "Title"},
},
},
{
"Alias",
[]l10nLocaleTranslation{
{"de", "Alias"},
{"en", "Alias"},
},
},
{
"Type",
[]l10nLocaleTranslation{
{"de", "Typ"},
{"en", "Type"},
},
},
{
"Keywords",
[]l10nLocaleTranslation{
{"de", "Schlüsselwörter"},
{"en", "Keywords"},
},
},
{
"Author",
[]l10nLocaleTranslation{
{"de", "Autor"},
{"en", "Author"},
},
},
{
"Status",
[]l10nLocaleTranslation{
{"de", "Status"},
{"en", "Status"},
},
},
{
"Complexity",
[]l10nLocaleTranslation{
{"de", "Komplexität"},
{"en", "Complexity"},
},
},
{
"Difficulty",
[]l10nLocaleTranslation{
{"de", "Schwierigkeit"},
{"en", "Difficulty"},
},
},
{
"Priority",
[]l10nLocaleTranslation{
{"de", "Priorität"},
{"en", "Priority"},
},
},
{
"Version",
[]l10nLocaleTranslation{
{"de", "Version"},
{"en", "Version"},
},
},
{
"Milestone",
[]l10nLocaleTranslation{
{"de", "Meilenstein"},
{"en", "Milestone"},
},
},
{
"Created",
[]l10nLocaleTranslation{
{"de", "Erstellt am"},
{"en", "Created"},
},
},
{
"LastUpdate",
[]l10nLocaleTranslation{
{"de", "Letzte Änderung"},
{"en", "LastUpdate"},
},
},
{
"The file cannot be read",
[]l10nLocaleTranslation{
{"de", "Die Datei \"%s\" kann nicht eingelesen werden."},
{"en", "The file \"%s\" cannot be read."},
},
},
{
"The output file cannot be written",
[]l10nLocaleTranslation{
{"de", "Die Ausgabedatei kann nicht geschrieben werden (%s)."},
{"en", "The output file cannot be written (%s)."},
},
}, {
"A temporary file cannot be created",
[]l10nLocaleTranslation{
{"de", "Es kann keine temporäre Datei angelegt werden (%s)."},
{"en", "A temporary file cannot be created (%s)."},
},
},
} }
func initL10n() { func initL10n() {
for _, e := range l10nEntries { for _, e := range l10nMap {
tag := language.MustParse(e.tag) key := e.key
switch msg := e.msg.(type) { for _, f := range e.tm {
tag := language.MustParse(f.tag)
switch msg := f.msg.(type) {
case string: case string:
message.SetString(tag, e.key, msg) message.SetString(tag, key, msg)
case catalog.Message: case catalog.Message:
message.Set(tag, e.key, msg) message.Set(tag, key, msg)
case []catalog.Message: case []catalog.Message:
message.Set(tag, e.key, msg...) message.Set(tag, key, msg...)
}
} }
} }
} }
{
"language": "en-US",
"messages": null
}
\ No newline at end of file
...@@ -2,6 +2,9 @@ package main ...@@ -2,6 +2,9 @@ package main
import ( import (
"fmt" "fmt"
"os"
"golang.org/x/text/language"
"golang.org/x/text/message" "golang.org/x/text/message"
) )
...@@ -16,11 +19,34 @@ var ( ...@@ -16,11 +19,34 @@ var (
//sugar *zap.SugaredLogger //sugar *zap.SugaredLogger
) )
var serverLangs = []language.Tag{
language.English, // en fallback
language.German, // de
}
var matcher = language.NewMatcher(serverLangs)
var userPrefs = []language.Tag{
language.Make(os.Getenv("LANG")),
language.Make("en"),
}
func init() { func init() {
printer = message.NewPrinter(message.MatchLanguage("de"))
initEnvironment() initEnvironment()
tag, _, _ := matcher.Match(userPrefs...)
printer = message.NewPrinter(tag)
initL10n() initL10n()
//
//p := message.NewPrinter(language.English)
//p.Printf("archive(noun)") // Prints "archive"
//p.Printf("archive(verb)") // Prints "archive"
// p2 := message.NewPrinter(language.German)
//fmt.Println(printer.Sprintf("Due")) // Prints "Archiv"
// p2.Printf("archive(verb)") // Prints "archivieren"
//initLogger() //initLogger()
} }
...@@ -39,7 +65,7 @@ func initEnvironment() { ...@@ -39,7 +65,7 @@ func initEnvironment() {
*/ */
func main() { func main() {
activeCommand, _, config := NewConfiguration() activeCommand, arguments, config := NewConfiguration()
version = "development" version = "development"
build = "1.1.1" build = "1.1.1"
...@@ -52,7 +78,7 @@ func main() { ...@@ -52,7 +78,7 @@ func main() {
subcommand := activeCommand.Active subcommand := activeCommand.Active
switch subcommand.Name { switch subcommand.Name {
case "print": case "print":
err := PrintOverview(config) err := PrintOverview(config, arguments)
if err != nil { if err != nil {
printErrorAndExit(2, err.Error()) printErrorAndExit(2, err.Error())
} }
......
...@@ -9,15 +9,17 @@ import ( ...@@ -9,15 +9,17 @@ import (
var lastBlock string var lastBlock string
// print error // print error
func printErrorAndExit(code int, message string) { func printErrorAndExit(code int, message string, a ...interface{}) {
printError(message) printError(message, a...)
if code == 0 { if code == 0 {
code = exitCodeCatchAll code = exitCodeCatchAll
} }
os.Exit(code) os.Exit(code)
} }
func printError(message string) { func printError(message string, a ...interface{}) {
message = printer.Sprintf(message, a...)
if lastBlock == "error" { if lastBlock == "error" {
color.Error.Println(" " + message) color.Error.Println(" " + message)
......
...@@ -4,17 +4,32 @@ import ( ...@@ -4,17 +4,32 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"reflect" "reflect"
"time"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
) )
func translateMetaHeaders(columns []string) []string {
result := []string{}
for _, column := range columns {
result = append(result, printer.Sprintf(column))
}
return result
}
func buildMeta(config *Configuration, pageDataList []pageData) (error, string) { func buildMeta(config *Configuration, pageDataList []pageData) (error, string) {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
table := tablewriter.NewWriter(buf) table := tablewriter.NewWriter(buf)
table.SetHeader(config.Table.Columns) translateMetaColumns := translateMetaHeaders(config.Table.Columns)
table.SetHeader(translateMetaColumns)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|") table.SetCenterSeparator("|")
...@@ -40,6 +55,14 @@ func buildMeta(config *Configuration, pageDataList []pageData) (error, string) { ...@@ -40,6 +55,14 @@ func buildMeta(config *Configuration, pageDataList []pageData) (error, string) {
case "string": case "string":
found = true found = true
row = append(row, field.String()) row = append(row, field.String())
case "Time":
found = true
t := field.Interface().(time.Time)
if t.IsZero() {
row = append(row, "—")
} else {
row = append(row, field.Interface().(time.Time).Format(config.Locale.DateFormat))
}
case "int": case "int":
found = true found = true
row = append(row, field.String()) row = append(row, field.String())
...@@ -84,8 +107,6 @@ func printMeta(config *Configuration) error { ...@@ -84,8 +107,6 @@ func printMeta(config *Configuration) error {
} }
err, table := buildMeta(config, pageData) err, table := buildMeta(config, pageData)
fmt.Println(table) fmt.Println(table)
return err return err
} }
...@@ -2,15 +2,22 @@ package main ...@@ -2,15 +2,22 @@ package main
import ( import (
"html/template" "html/template"
"io/ioutil"
"os" "os"
"strings"
"time"
) )
type Dataset struct { type Dataset struct {
Config *Configuration Config *Configuration
Meta string Meta string
Tasks string
Items string
Requirements string
Created time.Time
} }
func PrintOverview(config *Configuration) error { func PrintOverview(config *Configuration, arguments *commandLineOptions) error {
err, pageData := GetPageData(config.Path) err, pageData := GetPageData(config.Path)
if err != nil { if err != nil {
...@@ -22,21 +29,108 @@ func PrintOverview(config *Configuration) error { ...@@ -22,21 +29,108 @@ func PrintOverview(config *Configuration) error {
return err return err
} }
t, err := template.New("overview").Parse("You have a task named\n{{ .Meta}} ") err, tasks := buildToDosTable(config, pageData)
if err != nil { if err != nil {
return err return err
} }
err, items := buildItemTable(config, pageData)
if err != nil {
return err
}
t, err := template.New("overview").Parse(config.Overview.Template)
if err != nil {
return err
}
requirements := ""
for _, p := range pageData {
requirements = requirements + getOverviewContent(p.Absolute)
}
d := new(Dataset) d := new(Dataset)
d.Meta = meta d.Meta = meta
d.Tasks = tasks
d.Config = config d.Config = config
d.Items = items
d.Requirements = requirements
d.Created = time.Now()
//d.pageData = pageData //d.pageData = pageData
if arguments.Overview.Print.Output == "" {
err = t.Execute(os.Stdout, d) err = t.Execute(os.Stdout, d)
if err != nil { if err != nil {
return err return err
} }
}
outputName := arguments.Overview.Print.Output
if arguments.Overview.Print.Format == "pdf" {
file, err := ioutil.TempFile(os.TempDir(), "prefix")
if err != nil {
printErrorAndExit(2, "A temporary file cannot be created", err.Error())
}
defer os.Remove(file.Name())
err = t.Execute(file, d)
if err != nil {
return err
}
convertToPDF(file.Name(), outputName)
} else {
file, err := os.Create(outputName)
if err != nil {
printErrorAndExit(2, "The output file cannot be written", err.Error())
}
// close fo on exit and check for its returned error
defer func() {
if err := file.Close(); err != nil {
printErrorAndExit(2, "The output file cannot be written", err.Error())
}
}()
err = t.Execute(file, d)
if err != nil {
return err
}
}
return nil return nil
} }
func getOverviewContent(absolute string) string {
content, err := os.ReadFile(absolute)
if err != nil {
printError("The file cannot be read", absolute)
return ""
}
s := string(content)
a := strings.Index(s, "\n---")
if a == -1 {
return s
}
s = s[a+4 : len(s)-1]
b := strings.Index(s, "\n...")
if b == -1 {
b = strings.Index(s, "\n---")
}
if b > -1 {
s = s[b+4 : len(s)-1]
}
return s
}
package main
import (
"fmt"
"os/exec"
)
func convertToPDF(source string, output string) string {
arguments := "/bin/env pandoc "
arguments += "--number-sections "
arguments += "--variable \"geometry:a4paper,margin=2cm\" "
arguments += "--variable fontsize=12pt "
arguments += "--variable version=2.0 "
arguments += source + " "
arguments += "--pdf-engine=xelatex "
arguments += "--listings "
arguments += "--template /home/volker.schukai/Downloads/eisvogel/eisvogel.latex "
arguments += "--columns=5 "
arguments += "--toc "
arguments += "--output=" + output
cmd, err := exec.Command("bash", "-c", arguments).Output()
if err != nil {
printErrorAndExit(2, err.Error())
}
fmt.Println(string(cmd))
return string(cmd)
}
...@@ -18,9 +18,14 @@ const dateLayout = "2006-01-02 15:04:05 GMT" ...@@ -18,9 +18,14 @@ const dateLayout = "2006-01-02 15:04:05 GMT"
func newToDo(date string, text string) toDo { func newToDo(date string, text string) toDo {
d, err := time.Parse(dateLayout, date+" 00:00:00 GMT") var d time.Time
var err error
if date != "" {
d, err = time.Parse(dateLayout, date+" 00:00:00 GMT")
if err != nil { if err != nil {
printError("the due " + date + " of the todo " + text + " cannot be parsed.") printError("the due of the todo cannot be parsed", date, text)
}
} }
t := toDo{ t := toDo{
...@@ -65,7 +70,10 @@ func buildToDosTable(config *Configuration, pageDataList []pageData) (error, str ...@@ -65,7 +70,10 @@ func buildToDosTable(config *Configuration, pageDataList []pageData) (error, str
table := tablewriter.NewWriter(buf) table := tablewriter.NewWriter(buf)
table.SetHeader([]string{printer.Sprint("ToDo"), printer.Sprint("Due"), printer.Sprint("File")}) table.SetHeader([]string{
printer.Sprintf("ToDo"),
printer.Sprintf("Due"),
printer.Sprintf("File")})
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|") table.SetCenterSeparator("|")
......
File deleted
File deleted
File deleted
---
Author: "Me"
title: "The Document Title"
author: [Example Author, Another Author]
date: "2017-02-20"
keywords: [Markdown, Example]
lang: de
titlepage: true
titlepage-color: "CE0000"
titlepage-text-color: "FFFFFF"
titlepage-rule-color: "FFFFFF"
titlepage-rule-height: 2
logo: "/home/volker.schukai/projekte/local/marketing/logos/varianten/schukai-weiss-1000-210.png"
logo-width: "6cm"
toc-own-page: true
table-use-row-colors: true
subtitle: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx documents
abstract: document summary, included in LaTeX, ConTeXt, AsciiDoc, and docx documents
subject: document subject, included in ODT, PDF, docx, EPUB, and pptx metadata
...
## Overview
Created: {{ .Created.Format "02.Jan.2006" }}
{{.Meta}}
## Tasks
{{.Tasks}}
## Items
{{.Items}}
## Requirements
***
BBBBBB
{{.Requirements}}
AAAAAA
***
TEMPLATE
\ No newline at end of file
...@@ -7,23 +7,24 @@ Title: Value1 ...@@ -7,23 +7,24 @@ Title: Value1
Created: 2022-02-21 Created: 2022-02-21
Version: Value1 Version: Value1
ID: 9999 ID: 9999
--- ...
## Anforderung 1425
das ist ein test das ist ein test
@todo das ist das erste todo 1 @todo das ist das erste todo 1
@todo 2020-12-02 das ist das erste todo 2
@todo 2020-12-03 das ist das erste todo 3
@todo 2020-12-02 das ist das erste todo 2
@todo 2020-12-03 das ist das erste todo 3
# Headline ### Headline 1
## Headline 1
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
## Headline 2 ### Headline 2
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
...@@ -10,17 +10,21 @@ Version: 2.0.2 ...@@ -10,17 +10,21 @@ Version: 2.0.2
ID: 23423 ID: 23423
--- ---
# Headline
## Headline 1 ## Anforderung 1426
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
@todo 2020-12-01 das ist das erste todo 1 @todo 2020-12-01 das ist das erste todo 1
@todo 2020-12-02 das ist das erste todo 2 @todo 2020-12-02 das ist das erste todo 2
@todo 2020-12-03 das ist das erste todo 3 @todo 2020-12-03 das ist das erste todo 3 sdfkjasdfk jasdkfjasd löfjasdklöfj asdkjfasdf jasdklf jasdfklöjasdfklöjasdklö
### Headline 1111
lorem in hendrerit in vulputate velit esse moles
## Headline 2 ### Headline 2222
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment