Move the license text to texts as well.
This commit is contained in:
parent
e91a0d769b
commit
164cfa83c2
3 changed files with 114 additions and 26 deletions
|
@ -45,7 +45,7 @@ BBSTOOL-DEPS=bbstool.scm testing.import.scm listing.import.scm \
|
||||||
mailman.import.scm util-set-list.import.scm \
|
mailman.import.scm util-set-list.import.scm \
|
||||||
util-time.import.scm util-tag.import.scm util-io.import.scm \
|
util-time.import.scm util-tag.import.scm util-io.import.scm \
|
||||||
util-string.import.scm util-io.import.scm \
|
util-string.import.scm util-io.import.scm \
|
||||||
util-list.import.scm util-parser.import.scm
|
util-list.import.scm util-parser.import.scm texts.import.scm
|
||||||
|
|
||||||
BBSTOOL-OBJS=bbstool.o testing.o listing.o month.o period.o ansi.o \
|
BBSTOOL-OBJS=bbstool.o testing.o listing.o month.o period.o ansi.o \
|
||||||
dictionary.o command-line.o members-base.o primes.o \
|
dictionary.o command-line.o members-base.o primes.o \
|
||||||
|
@ -54,7 +54,7 @@ BBSTOOL-OBJS=bbstool.o testing.o listing.o month.o period.o ansi.o \
|
||||||
bank-account.o bank-fio.o members-payments.o member-parser.o \
|
bank-account.o bank-fio.o members-payments.o member-parser.o \
|
||||||
web-static.o environment.o mailman.o util-set-list.o \
|
web-static.o environment.o mailman.o util-set-list.o \
|
||||||
util-time.o util-tag.o util-io.o util-string.o util-io.o \
|
util-time.o util-tag.o util-io.o util-string.o util-io.o \
|
||||||
util-list.o util-parser.o
|
util-list.o util-parser.o texts.o
|
||||||
|
|
||||||
.PHONY: imports
|
.PHONY: imports
|
||||||
imports: $(BBSTOOL-DEPS)
|
imports: $(BBSTOOL-DEPS)
|
||||||
|
@ -290,3 +290,8 @@ UTIL-PARSER-SOURCES=util-parser.scm testing.import.scm
|
||||||
|
|
||||||
util-parser.o: util-parser.import.scm
|
util-parser.o: util-parser.import.scm
|
||||||
util-parser.import.scm: $(UTIL-PARSER-SOURCES)
|
util-parser.import.scm: $(UTIL-PARSER-SOURCES)
|
||||||
|
|
||||||
|
TEXTS-SOURCES=texts.scm
|
||||||
|
|
||||||
|
texts.o: texts.import.scm
|
||||||
|
texts.import.scm: $(TEXTS-SOURCES)
|
||||||
|
|
|
@ -4,27 +4,6 @@
|
||||||
;; Brmburo system - members management tool.
|
;; Brmburo system - members management tool.
|
||||||
;;
|
;;
|
||||||
|
|
||||||
;; The license of this file and of the whole suite.
|
|
||||||
(define license-text "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.
|
|
||||||
")
|
|
||||||
|
|
||||||
(import (chicken repl)
|
(import (chicken repl)
|
||||||
testing
|
testing
|
||||||
listing
|
listing
|
||||||
|
@ -51,10 +30,11 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
bank-account
|
bank-account
|
||||||
mailman
|
mailman
|
||||||
util-set-list
|
util-set-list
|
||||||
util-parser)
|
util-parser
|
||||||
|
texts)
|
||||||
|
|
||||||
;; Print banner
|
;; Print banner
|
||||||
(print "bbstool 0.9.3 (c) 2023 Brmlab, z.s.")
|
(print "HackerBase 0.9.3 (c) 2023 Brmlab, z.s.")
|
||||||
(newline)
|
(newline)
|
||||||
|
|
||||||
;; Command-line options and configurable parameters
|
;; Command-line options and configurable parameters
|
||||||
|
@ -83,7 +63,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
(newline)
|
(newline)
|
||||||
(exit 0))
|
(exit 0))
|
||||||
(-license () "Show licensing terms"
|
(-license () "Show licensing terms"
|
||||||
(print license-text)
|
(print banner)
|
||||||
|
(newline)
|
||||||
|
(print license)
|
||||||
(exit 0))
|
(exit 0))
|
||||||
""
|
""
|
||||||
"Configuration options:"
|
"Configuration options:"
|
||||||
|
|
101
src/texts.scm
Normal file
101
src/texts.scm
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
;;
|
||||||
|
;; texts.scm
|
||||||
|
;;
|
||||||
|
;; Textual content.
|
||||||
|
;;
|
||||||
|
;; 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 texts))
|
||||||
|
|
||||||
|
(module
|
||||||
|
texts
|
||||||
|
(
|
||||||
|
banner
|
||||||
|
license
|
||||||
|
)
|
||||||
|
|
||||||
|
(import scheme
|
||||||
|
(chicken base)
|
||||||
|
(chicken string)
|
||||||
|
(chicken format))
|
||||||
|
|
||||||
|
;; Banner source with numbers for ANSI CSI SGR
|
||||||
|
(define banner-source "
|
||||||
|
1 __ __ __
|
||||||
|
1 / / / /___ ______/ /_____ _____
|
||||||
|
2 / /_/ / __ `/ ___/ //_/ _ \\/ ___/ Space
|
||||||
|
3 / __ / /_/ / /__/ ,< / __/ / 0____
|
||||||
|
0/_/ /_/\\__,_/\\___/_/|_|\\___/_/ 0/ __ )____ _________
|
||||||
|
7/ __ / __ `/ ___/ _ \\
|
||||||
|
5M 4E 5M 4B 5E 4R 5S 6Data / /_/ / /_/ (__ ) __/
|
||||||
|
1/_____/\\__,_/____/\\___/
|
||||||
|
")
|
||||||
|
|
||||||
|
;; Mapping of color tags to ANSI CSI SGR
|
||||||
|
(define colors
|
||||||
|
'((#\0 . 90) ; W
|
||||||
|
(#\1 . 97)
|
||||||
|
(#\2 . 91) ; R
|
||||||
|
(#\3 . 31)
|
||||||
|
(#\4 . 92) ; G
|
||||||
|
(#\5 . 32)
|
||||||
|
(#\6 . 94) ; B
|
||||||
|
(#\7 . 34)))
|
||||||
|
|
||||||
|
;; Fill-in ANSI CSI SGR to produce printable banner
|
||||||
|
(define banner
|
||||||
|
(string-intersperse
|
||||||
|
(map (lambda (line)
|
||||||
|
(string-append
|
||||||
|
(list->string
|
||||||
|
(flatten
|
||||||
|
(map (lambda (ch)
|
||||||
|
(let ((color (assq ch colors)))
|
||||||
|
(if color
|
||||||
|
(string->list (sprintf "\x1b[~Am" (cdr color)))
|
||||||
|
ch)))
|
||||||
|
(string->list line))))
|
||||||
|
"\x1b[0m"))
|
||||||
|
(string-split banner-source "\n"))
|
||||||
|
"\n"))
|
||||||
|
|
||||||
|
;; The license of this file and of the whole suite.
|
||||||
|
(define license "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.
|
||||||
|
")
|
||||||
|
|
||||||
|
)
|
Loading…
Add table
Add a link
Reference in a new issue