Skip to content

Commit

Permalink
Adjusts output report
Browse files Browse the repository at this point in the history
  • Loading branch information
mvrpl committed Aug 5, 2023
1 parent d863805 commit 8aed03e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions generate_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ import (
"math"
"os"
"path/filepath"
"strings"
"text/template"
"time"

"github.com/ConvertAPI/convertapi-go"
"github.com/ConvertAPI/convertapi-go/config"
"github.com/ConvertAPI/convertapi-go/param"
"github.com/dustin/go-humanize"
"github.com/goodsign/monday"
"github.com/syndtr/goleveldb/leveldb"
Expand Down Expand Up @@ -192,8 +188,6 @@ func GenReport(monthYear time.Time) {
encodedText := base64.StdEncoding.EncodeToString(buffer.Bytes()) */

config.Default.Secret = os.Getenv("API_SECRET")

caser := cases.Title(language.BrazilianPortuguese)
montYer := caser.String(monday.Format(monthYear, "January/2006", monday.LocalePtBR))

Expand All @@ -212,10 +206,4 @@ func GenReport(monthYear time.Time) {
if err != nil {
panic(err)
}

fileName := strings.ToLower(strings.Replace(montYer, "/", "", -1))

convertapi.ConvDef("html", "pdf",
param.NewPath("File", "report.html", nil),
).ToPath(fmt.Sprintf("report_%s.pdf", fileName))
}

0 comments on commit 8aed03e

Please sign in to comment.