adjust for changes to the tree, also Rackety
This commit is contained in:
parent
0487bce0ae
commit
2f6b5962a6
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*~
|
||||
lang.dot
|
||||
compiled/
|
|
@ -1,20 +1,7 @@
|
|||
#lang scheme
|
||||
(require scheme/generator
|
||||
scheme/system
|
||||
racket/draw)
|
||||
|
||||
(define (in-files base [reg #f])
|
||||
(in-generator
|
||||
(let loop ([dir/file base])
|
||||
(cond
|
||||
[(directory-exists? dir/file)
|
||||
(for-each (λ (x) (loop (build-path dir/file x)))
|
||||
(directory-list dir/file))]
|
||||
[(file-exists? dir/file)
|
||||
(when (or (not reg)
|
||||
(regexp-match reg (path->string dir/file)))
|
||||
(yield dir/file))]))))
|
||||
|
||||
#lang racket
|
||||
(require racket/system
|
||||
racket/draw
|
||||
racket/runtime-path)
|
||||
|
||||
(define (get-language i)
|
||||
(and (or (regexp-match #rx"scrbl$" (path->string i))
|
||||
|
@ -121,7 +108,7 @@
|
|||
|
||||
|
||||
(define ht (make-hash))
|
||||
(for ((i (in-files (simplify-path (build-path (collection-path "racket") 'up)))))
|
||||
(for ((i (in-directory (simplify-path (build-path (collection-path "racket") 'up)))))
|
||||
(let ([lang (get-language i)])
|
||||
(when lang
|
||||
(hash-set! ht lang (cons i (hash-ref ht lang '()))))))
|
||||
|
@ -220,13 +207,13 @@
|
|||
(new-color lang 0 0 0)]))))
|
||||
|
||||
(define (new-color lang r g b)
|
||||
(let ([new-color (string-append
|
||||
"#"
|
||||
(to-hex r)
|
||||
(to-hex g)
|
||||
(to-hex b))])
|
||||
(hash-set! colors lang new-color)
|
||||
new-color))
|
||||
(define new-color (string-append
|
||||
"#"
|
||||
(to-hex r)
|
||||
(to-hex g)
|
||||
(to-hex b)))
|
||||
(hash-set! colors lang new-color)
|
||||
new-color)
|
||||
|
||||
(define orig-colors
|
||||
#hash((blue . ((0 0 255) (0 0 240) (0 0 220) (0 0 205) (0 0 190) (0 0 160)
|
||||
|
@ -235,7 +222,7 @@
|
|||
(green . ((0 255 0) (0 230 0) (0 200 0) (0 175 0) (0 150 0) (0 125 0) (0 100 0)))
|
||||
(red . ((255 0 0) (230 0 0) (200 0 0) (175 0 0) (150 0 0) (125 0 0) (100 0 0)))
|
||||
(yellow . ((255 255 0)))
|
||||
(orange . ("orange" "darkorange"))
|
||||
(orange . ("orange" "darkorange" "gold"))
|
||||
(gray . ((240 240 240) (220 220 220) (200 200 200) (180 180 180) (160 160 160) (130 130 130) (100 100 100) (70 70 70) (50 50 50) (30 30 30)))
|
||||
(pink . ("pink" "lightpink" "fuchsia"))
|
||||
(purple . ("orchid" "purple" "darkviolet"))
|
||||
|
@ -283,9 +270,10 @@
|
|||
(to-dot)))
|
||||
#:exists 'truncate)
|
||||
|
||||
(call-with-output-file "lang-colors.ss"
|
||||
(define-runtime-path lang-colors.rkt "lang-colors.rkt")
|
||||
(call-with-output-file lang-colors.rkt
|
||||
(λ (port)
|
||||
(pretty-print
|
||||
(pretty-write
|
||||
(sort (hash-map colors list)
|
||||
string<=?
|
||||
#:key car)
|
||||
|
@ -295,4 +283,7 @@
|
|||
(printf "calling twopi\n")
|
||||
(void
|
||||
(parameterize ([current-input-port (open-input-string "")])
|
||||
(system "/usr/bin/twopi -Tplain lang.dot > lang.plain")))
|
||||
(system (format "~a -Tplain lang.dot > lang.plain"
|
||||
(if (file-exists? "/usr/local/bin/twopi")
|
||||
"/usr/local/bin/twopi"
|
||||
"/usr/bin/twopi")))))
|
43
lang-colors.rkt
Normal file
43
lang-colors.rkt
Normal file
|
@ -0,0 +1,43 @@
|
|||
(("#%kernel" "#3232ff")
|
||||
("at-exp racket/base" "#ff0000")
|
||||
("deinprogramm/DMdA" "#00ff00")
|
||||
("env-lang.rkt" "#000000")
|
||||
("framework/private/decode" "#000000")
|
||||
("frtime" "#f0f0f0")
|
||||
("frtime/frtime-lang-only" "#c8c8c8")
|
||||
("frtime/lang-utils" "#dcdcdc")
|
||||
("htdp/asl" "#00c800")
|
||||
("htdp/bsl" "#00e600")
|
||||
("htdp/isl+" "#00af00")
|
||||
("lang-utils.rkt" "#000000")
|
||||
("meta/web" "#da70d6")
|
||||
("mzscheme" "#000046")
|
||||
("one off language" "#000000")
|
||||
("pre-base.rkt" "#000000")
|
||||
("r5rs" "#ffb6c1")
|
||||
("r6rs" "#ffc0cb")
|
||||
("racket" "#0000f0")
|
||||
("racket/base" "#0000a0")
|
||||
("racket/gui" "#0000dc")
|
||||
("racket/load" "#000064")
|
||||
("racket/private" "#0000cd")
|
||||
("racket/private/base" "#5050ff")
|
||||
("racket/private/provider" "#0000ff")
|
||||
("racket/signature" "#000082")
|
||||
("racket/unit" "#6464ff")
|
||||
("scribble/base/reader" "#960000")
|
||||
("scribble/doc" "#c80000")
|
||||
("scribble/lp" "#af0000")
|
||||
("scribble/manual" "#e60000")
|
||||
("setup/infotab" "#ffff00")
|
||||
("slideshow" "#0000be")
|
||||
("srfi/provider" "#ff00ff")
|
||||
("string-constant-lang.rkt" "#000000")
|
||||
("swindle/base" "#000000")
|
||||
("swindle/turbo" "#000000")
|
||||
("syntax/module-reader" "#843c24")
|
||||
("typed-racket/minimal" "#ffa500")
|
||||
("typed/racket" "#ff8c00")
|
||||
("typed/racket/base" "#ffd700")
|
||||
("web-server" "#9400d3")
|
||||
("web-server/insta" "#a020f0"))
|
|
@ -1,43 +0,0 @@
|
|||
(("#%kernel" "#0000cd")
|
||||
("at-exp racket/base" "#960000")
|
||||
("at-exp scheme/base" "#7d0000")
|
||||
("deinprogramm/DMdA" "#00af00")
|
||||
("env-lang.rkt" "#000000")
|
||||
("framework/private/decode" "#000000")
|
||||
("frtime" "#f0f0f0")
|
||||
("frtime/frtime-lang-only" "#dcdcdc")
|
||||
("frtime/lang-utils" "#c8c8c8")
|
||||
("htdp/asl" "#00c800")
|
||||
("htdp/bsl" "#00ff00")
|
||||
("htdp/isl+" "#00e600")
|
||||
("lang-utils.ss" "#000000")
|
||||
("meta/web" "#a020f0")
|
||||
("mzscheme" "#000046")
|
||||
("one off language" "#000000")
|
||||
("pre-base.rkt" "#000000")
|
||||
("r5rs" "#ffc0cb")
|
||||
("r6rs" "#ffb6c1")
|
||||
("racket" "#000064")
|
||||
("racket/base" "#0000f0")
|
||||
("racket/gui" "#6464ff")
|
||||
("racket/load" "#0000dc")
|
||||
("racket/private" "#000082")
|
||||
("racket/private/base" "#0000be")
|
||||
("racket/private/provider" "#0000ff")
|
||||
("racket/signature" "#3232ff")
|
||||
("racket/unit" "#0000a0")
|
||||
("scribble/base/reader" "#e60000")
|
||||
("scribble/doc" "#af0000")
|
||||
("scribble/lp" "#ff0000")
|
||||
("scribble/manual" "#c80000")
|
||||
("setup/infotab" "#ffff00")
|
||||
("slideshow" "#5050ff")
|
||||
("srfi/provider" "#ff00ff")
|
||||
("string-constant-lang.ss" "#000000")
|
||||
("swindle/base" "#000000")
|
||||
("swindle/turbo" "#000000")
|
||||
("syntax/module-reader" "#843c24")
|
||||
("typed-scheme/minimal" "#ffa500")
|
||||
("typed/racket" "#ff8c00")
|
||||
("web-server" "#da70d6")
|
||||
("web-server/insta" "#9400d3"))
|
|
@ -3,7 +3,7 @@
|
|||
(require "draw-plain.ss"
|
||||
slideshow slideshow/code
|
||||
scheme/runtime-path)
|
||||
(define-runtime-path lang-colors.ss "lang-colors.ss")
|
||||
(define-runtime-path lang-colors.rkt "lang-colors.rkt")
|
||||
|
||||
(define (color->name c)
|
||||
(let-values ([(r g b) (split-out-color c)])
|
||||
|
@ -43,7 +43,7 @@
|
|||
(color-name->index n2))])))
|
||||
|
||||
(define lang-colors
|
||||
(sort (call-with-input-file lang-colors.ss read)
|
||||
(sort (call-with-input-file lang-colors.rkt read)
|
||||
color<=?
|
||||
#:key cadr))
|
||||
|
||||
|
|
6842
lang.plain
6842
lang.plain
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user