Generate file based on command-line argument.
This commit is contained in:
parent
fe42315cd9
commit
51a108ce64
3 changed files with 21 additions and 8 deletions
|
@ -562,7 +562,10 @@ mailinglist.o: mailinglist.import.scm
|
|||
mailinglist.import.scm: $(MAILINGLIST-SOURCES)
|
||||
|
||||
EXPORT-SHEET-SOURCES=export-sheet.scm mbase.import.scm \
|
||||
brmember.import.scm
|
||||
brmember.import.scm brmember-format.import.scm \
|
||||
util-bst-ldict.import.scm members-payments.import.scm \
|
||||
util-format.import.scm members-fees.import.scm \
|
||||
cal-period.import.scm
|
||||
|
||||
export-sheet.o: export-sheet.import.scm
|
||||
export-sheet.import.scm: $(EXPORT-SHEET-SOURCES)
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
(chicken base)
|
||||
(chicken string)
|
||||
(chicken format)
|
||||
srfi-1
|
||||
mbase
|
||||
brmember
|
||||
brmember-format
|
||||
|
@ -42,10 +43,10 @@
|
|||
members-payments
|
||||
util-format
|
||||
members-fees
|
||||
srfi-1)
|
||||
cal-period)
|
||||
|
||||
(define (print-attendance-sheet MB)
|
||||
(print "\\documentclass[11pt]{article}")
|
||||
(print "\\documentclass[10pt]{article}")
|
||||
(print "\\usepackage[top=1cm,left=2cm,right=2cm,bottom=2cm]{geometry}")
|
||||
(print "\\begin{document}")
|
||||
(print "\\begin{center}")
|
||||
|
@ -58,7 +59,7 @@
|
|||
(print "\\vskip1em")
|
||||
(newline)
|
||||
(define colnames
|
||||
'((id) Nick Name Surname (Balance) (Active) Signature))
|
||||
'((id) Nick Name Surname (Fee) (Balance) (Active) Signature))
|
||||
(print
|
||||
(format
|
||||
"\\begin{tabular}{|~A|}"
|
||||
|
@ -110,9 +111,14 @@
|
|||
(acal12 (map cadr rcal12))
|
||||
(acal12* (map (lambda (f) (if (memq 'active f) 1 0)) acal12))
|
||||
(numactive (foldl + 0 acal12*))
|
||||
(spec-fee (brmember-spec-fee mr))
|
||||
(current-fee (if spec-fee
|
||||
spec-fee
|
||||
(member-calendar-entry->fee
|
||||
(list (*current-month*)
|
||||
(brmember-flags mr)
|
||||
spec-fee))))
|
||||
)
|
||||
(display acal12* (current-error-port))
|
||||
(newline (current-error-port))
|
||||
(print
|
||||
(brmember-id mr)
|
||||
" & "
|
||||
|
@ -124,6 +130,8 @@
|
|||
" & "
|
||||
sname
|
||||
" & "
|
||||
(format-amount current-fee)
|
||||
" & "
|
||||
(format-amount
|
||||
(member-total-balance mr))
|
||||
" & "
|
||||
|
|
|
@ -185,6 +185,7 @@
|
|||
(-fname- file:gnuplot-data))
|
||||
(-sheet (filename) "Generate attendance sheet"
|
||||
(-needs-bank- #t)
|
||||
(-fname- filename)
|
||||
(-action- 'gen-sheet))
|
||||
|
||||
""
|
||||
|
@ -361,7 +362,8 @@
|
|||
(gen-html-members MB (-web-dir-)))
|
||||
((gen-sheet)
|
||||
(log-info "Generating attendance sheet")
|
||||
(print-attendance-sheet MB))
|
||||
(parameterize ((current-output-port (open-output-file (-fname-))))
|
||||
(print-attendance-sheet MB)))
|
||||
((edit)
|
||||
(if mr
|
||||
(let ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue