From a67b338deac93131bd68a48bf5de5114d6bf2404 Mon Sep 17 00:00:00 2001 From: Kefei Lu Date: Mon, 2 Apr 2018 11:18:26 -0700 Subject: [PATCH] remove unused tool --- README.md | 13 +++++------ tools/transform_source.rkt | 45 -------------------------------------- 2 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 tools/transform_source.rkt diff --git a/README.md b/README.md index f7a3d44..4bf29a9 100644 --- a/README.md +++ b/README.md @@ -101,13 +101,12 @@ straightfoward: simply run `msbuild` in `src/`, or use your favorite IDE. The project structure looks like so: ├───doc - ├───src - │ ├───schemy // the core schemy interpreter (schemy.dll) - │ ├───examples - │ │ ├───command_server // loading command handlers from schemy scripts - │ │ └───repl // an interactive interpreter (REPL) - │ └───test - └───tools + └───src + ├───schemy // the core schemy interpreter (schemy.dll) + ├───examples + │ ├───command_server // loading command handlers from schemy scripts + │ └───repl // an interactive interpreter (REPL) + └───test ## Embedding and Extending Schemy diff --git a/tools/transform_source.rkt b/tools/transform_source.rkt deleted file mode 100644 index 4b1b3eb..0000000 --- a/tools/transform_source.rkt +++ /dev/null @@ -1,45 +0,0 @@ -#| -This script evaluates a script file to transform input file content. The transformed output -is displayed to stdout. - -This is currently broken because racket IO APIs doesn't strip BOM at the beginning of the file -|# - -#lang at-exp racket - -(require web-server/templates - racket/cmdline) - -(define template-file (make-parameter "")) -(define input-file (make-parameter "")) - -(command-line - #:once-each - [("-t" "--template") template - "template file to use. `FILENAME` and `INPUT` variables are available to the template" - (template-file template)] - #:args (input) - (input-file input)) - -#| -(define (read-content fn) - (define lines (port->lines (open-input-file #:mode 'text (input-file)))) - (string-join lines "\n")) -|# - -(define (read-content fn) - (port->string (open-input-file fn)) - ) - -(define INPUT (read-content (input-file))) -(define FILENAME (path->string (file-name-from-path (input-file)))) - -(define ns (make-base-namespace)) -(namespace-set-variable-value! 'INPUT INPUT #f ns) -(namespace-set-variable-value! 'FILENAME FILENAME #f ns) - -(void - (write-string - (eval - (read - (open-input-file (template-file))) ns))) \ No newline at end of file