initial commit
This commit is contained in:
parent
26658ee1ab
commit
e623ce23fd
|
@ -1,2 +1,4 @@
|
||||||
vendor
|
vendor
|
||||||
.idea
|
.idea
|
||||||
|
testdata
|
||||||
|
out.pdf
|
||||||
|
|
|
@ -48,3 +48,10 @@ This is designed to work with the CSV files output by Patreon's Benefits Tracker
|
||||||
-y float
|
-y float
|
||||||
top margin (default 12.7)
|
top margin (default 12.7)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Known Bugs
|
||||||
|
|
||||||
|
* Text that doesn't fit on one line isn't wrapped. For now, you can manually insert a linebreak in the relevant cell (using Calc or Excel or your preferred spreadsheet editor).
|
||||||
|
* unitStr doesn't affect fontsize
|
||||||
|
* In general nothing stops you from setting parameters that don't add up to the page dimensions
|
||||||
|
* Empty-address detection only works for Patreon CSVs
|
1
main.go
1
main.go
|
@ -77,6 +77,7 @@ func DoTheThing(pdf *gofpdf.Fpdf, data CSV) {
|
||||||
}
|
}
|
||||||
for ; i < data.NumRecords() && data.PatreonEmptyAddress(i); i++ {
|
for ; i < data.NumRecords() && data.PatreonEmptyAddress(i); i++ {
|
||||||
fmt.Printf("Warning: skipping empty addressee: %s\n", data.GetField(i, "Name"))
|
fmt.Printf("Warning: skipping empty addressee: %s\n", data.GetField(i, "Name"))
|
||||||
|
fmt.Printf("%v\n", data.Record(i))
|
||||||
}
|
}
|
||||||
if i >= data.NumRecords() {
|
if i >= data.NumRecords() {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue