Start work on cards export.

This commit is contained in:
Dominik Pantůček 2023-03-23 22:09:47 +01:00
parent 4804d2f84c
commit 7a56162cdb
3 changed files with 55 additions and 6 deletions

View file

@ -42,22 +42,24 @@ BBSTOOL-DEPS=bbstool.scm testing.import.scm listing.import.scm \
ansi.import.scm member-file.import.scm \
command-line.import.scm members-base.import.scm \
utils.import.scm primes.import.scm member-record.import.scm \
configuration.import.scm progress.import.scm table.import.scm
configuration.import.scm progress.import.scm table.import.scm \
cards.import.scm
BBSTOOL-SOURCES=bbstool.scm testing.scm listing.scm dictionary.scm \
month.scm period.scm ansi.scm member-file.scm \
command-line.scm members-base.scm utils.scm primes.scm \
member-record.scm configuration.scm progress.scm table.scm
member-record.scm configuration.scm progress.scm table.scm \
cards.scm
BBSTOOL-OBJS=testing.o listing.o month.o period.o ansi.o \
member-file.o dictionary.o command-line.o \
members-base.o utils.o primes.o member-record.o \
configuration.o progress.o table.o
configuration.o progress.o table.o cards.o
BBSTOOL-SHARED=testing.so listing.so month.so period.so ansi.so \
member-file.so dictionary.so command-line.so \
members-base.so utils.so primes.so member-record.so \
configuration.so progress.so table.so
configuration.so progress.so table.so cards.so
.PHONY: imports
imports: $(BBSTOOL-DEPS)
@ -188,3 +190,9 @@ TABLE-SOURCES=table.scm ansi.import.scm testing.import.scm \
table.so: table.o
table.o: table.import.scm
table.import.scm: $(TABLE-SOURCES)
CARDS-SOURCES=cards.scm
cards.so: cards.o
cards.o: cards.import.scm
cards.import.scm: $(CARDS-SOURCES)

View file

@ -38,7 +38,8 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
primes
member-record
configuration
table)
table
cards)
;; Print banner
(print "bbstool 0.4 (c) 2023 Brmlab, z.s.")
@ -84,7 +85,8 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(-tstyle (style) "Use given table style: debug, ascii, unicode"
(*table-border-style* (string->symbol style)))
(-gencards (file:cards file:desfires) "Generates brmdoor-compatible card files"
(print "TODO: " file:cards " " file:desfires))
(-action- 'export-cards)
(-fname- (list file:cards file:desfires)))
)
;; Run tests

39
cards.scm Normal file
View file

@ -0,0 +1,39 @@
;;
;; cards.scm
;;
;; Cards exporter as required by brmdoor.
;;
;; ISC License
;;
;; Copyright 2023 Brmlab, z.s.
;; Dominik Pantůček <dominik.pantucek@trustica.cz>
;;
;; Permission to use, copy, modify, and/or distribute this software
;; for any purpose with or without fee is hereby granted, provided
;; that the above copyright notice and this permission notice appear
;; in all copies.
;;
;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
;; CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
;; OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
;; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
;;
(declare (unit cards))
(module
cards
(
cards-export
)
(import scheme)
(define (cards-export mb cardsfn desfirefn)
#f)
)