1 File Loading
1.1 lispblock0
2 File Execution
2.1 systemout
Version: 5.3.1

Scribfile: File and Operating System related Scribble Functionality

Grant Rettke <grettke@acm.org>

1 File Loading

1.1 lispblock0

syntax

(lispblock0 options ... path)

Responsible for creating a codeblock0 form using the contents of a file containing a LISPy programming language. See codeblock0 for documentation on the options; path is a string.

If you want to use Scribble for non-Racket languages, this is a decent substitute; you get the power of Scribble with only a little loss of functionality. For example, to load some JESS code, the following:

@lispblock0{sample.clp}

results in:

; account for anything
(watch all)
(reset)
(defrule do-anything
  "A rule for anything."
  ?ne <- (anything)
  =>
  (printout t "Someone did something.")
  (retract ?ne))
(assert (anything))
(run)
 

2 File Execution

2.1 systemout

syntax

(systemout command)

Responsible for creating a verbatim form by capturing the STDOUT and STDERR of the process created by calling system on command, a string.

If you want to capture the results of arbitrary commands, then this is a simple way to do it. For example on Linux:

@systemout["uname -a"]

results in:

Linux stargate 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux