Port command-line and texts from hackerbase.
This commit is contained in:
parent
879107764a
commit
be9a620fd2
4 changed files with 117 additions and 5 deletions
|
@ -6,8 +6,9 @@ SCRP=$(shell chicken-install -repository)
|
||||||
CSC=CHICKEN_REPOSITORY_PATH=../eggs:$(SCRP) csc
|
CSC=CHICKEN_REPOSITORY_PATH=../eggs:$(SCRP) csc
|
||||||
|
|
||||||
BRMINV_SOURCES=brminv.scm frontend.import.scm command-line.import.scm \
|
BRMINV_SOURCES=brminv.scm frontend.import.scm command-line.import.scm \
|
||||||
util-proc.import.scm duck.import.scm
|
util-proc.import.scm duck.import.scm texts.import.scm
|
||||||
BRMINV_OBJS=brminv.o frontend.o command-line.o util-proc.o duck.o
|
BRMINV_OBJS=brminv.o frontend.o command-line.o util-proc.o duck.o \
|
||||||
|
texts.o
|
||||||
|
|
||||||
%.o: %.scm
|
%.o: %.scm
|
||||||
$(CSC) -c -static $<
|
$(CSC) -c -static $<
|
||||||
|
@ -24,8 +25,6 @@ frontend.import.scm: frontend.scm
|
||||||
frontend.scm:
|
frontend.scm:
|
||||||
cd ../frontend && npm run build && cd ../backend && csi -b -q ../tools/schemify-tree.scm -- ../frontend/dist frontend frontend-lookup
|
cd ../frontend && npm run build && cd ../backend && csi -b -q ../tools/schemify-tree.scm -- ../frontend/dist frontend frontend-lookup
|
||||||
|
|
||||||
BRMINV_SOURCES=brminv.scm frontend.import.scm
|
|
||||||
|
|
||||||
brminv.o: $(BRMINV_SOURCES)
|
brminv.o: $(BRMINV_SOURCES)
|
||||||
|
|
||||||
DUCK-SOURCES=duck.scm
|
DUCK-SOURCES=duck.scm
|
||||||
|
@ -42,3 +41,8 @@ COMMAND-LINE-SOURCES=command-line.scm util-proc.import.scm
|
||||||
|
|
||||||
command-line.o: command-line.import.scm
|
command-line.o: command-line.import.scm
|
||||||
command-line.import.scm: $(COMMAND-LINE-SOURCES)
|
command-line.import.scm: $(COMMAND-LINE-SOURCES)
|
||||||
|
|
||||||
|
TEXTS-SOURCES=texts.scm
|
||||||
|
|
||||||
|
texts.o: texts.import.scm
|
||||||
|
texts.import.scm: $(TEXTS-SOURCES)
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
(import frontend)
|
(import frontend
|
||||||
|
command-line
|
||||||
|
texts)
|
||||||
|
|
||||||
|
(command-line
|
||||||
|
print-help
|
||||||
|
(-h () "This help"
|
||||||
|
(print banner-line)
|
||||||
|
(newline)
|
||||||
|
(print "Command-line options:")
|
||||||
|
(print-help)
|
||||||
|
(newline)
|
||||||
|
(exit 0))
|
||||||
|
(-license () "Show licensing terms"
|
||||||
|
(print banner-line)
|
||||||
|
(newline)
|
||||||
|
(print license)
|
||||||
|
(exit 0))
|
||||||
|
""
|
||||||
|
"Configuration options:"
|
||||||
|
)
|
||||||
|
|
||||||
(display "brminv")
|
(display "brminv")
|
||||||
(newline)
|
(newline)
|
||||||
|
|
64
backend/texts.scm
Normal file
64
backend/texts.scm
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
;;
|
||||||
|
;; texts.scm
|
||||||
|
;;
|
||||||
|
;; Textual content.
|
||||||
|
;;
|
||||||
|
;; ISC License
|
||||||
|
;;
|
||||||
|
;; Copyright 2023-2025 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-line
|
||||||
|
license
|
||||||
|
)
|
||||||
|
|
||||||
|
(import scheme
|
||||||
|
(chicken base)
|
||||||
|
(chicken string)
|
||||||
|
(chicken format))
|
||||||
|
|
||||||
|
;; Short banner
|
||||||
|
(define banner-line "BrmInv 0.0 (c) 2023-2025 Brmlab, z.s.")
|
||||||
|
|
||||||
|
;; 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.
|
||||||
|
")
|
||||||
|
|
||||||
|
)
|
|
@ -1,3 +1,27 @@
|
||||||
|
;;
|
||||||
|
;; schemify-tree.scm
|
||||||
|
;;
|
||||||
|
;; Converts directory tree into assoc dictionary.
|
||||||
|
;;
|
||||||
|
;; ISC License
|
||||||
|
;;
|
||||||
|
;; Copyright 2025 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 process-context)
|
(import (chicken process-context)
|
||||||
srfi-4
|
srfi-4
|
||||||
(chicken file)
|
(chicken file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue