<commit_before>##
##  Simple script to start a static web server.
## Arguments:
## port - e.g. 80
## root path directory name - e.g. "F:\\foo\\bar\\"
##
##
@prefix web "http://www.genyris.org/lang/web#"
@prefix sys "http://www.genyris.org/lang/system#"
@prefix u "http://www.genyris.org/lang/utilities#"

cond
   (not (equal? (length sys:argv) 3))
       error "Usage: web-server.g <port> <root directory>"

var port (parse (cadr sys:argv))
var rootdir (cadr (cdr sys:argv))
u:format "Serving web pages on port %a from %a%n" port rootdir
task:httpd-static port rootdir
while true
   sleep (* 1000 60)
<commit_msg>Fixed up old web-server script.<commit_after>##
##  Simple script to start a static web server.
## Arguments:
## port - e.g. 80
## root path directory name - e.g. "F:\\foo\\bar\\"
##
##
@prefix sys "http://www.genyris.org/lang/system#"
@prefix u "http://www.genyris.org/lang/utilities#"
print sys:argv
cond
   (not (equal? (length sys:argv) 3))
       raise "Usage: web-server.g <port> <root directory>"

var port (nth 1 sys:argv)
var rootdir (nth 2 sys:argv)
u:format "Serving web pages on port %a from %a%n" port rootdir
httpd port 'testscripts/www-static.g' rootdir

{'fraction_non_alphanumeric': 0.16751269035532995, 'fraction_numerical': 0.011844331641285956, 'mean_word_length': 3.751004016064257, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '730190', 'n_tokens_mistral': 450, 'n_tokens_neox': 435, 'n_words': 137}