(load (string-append laml-dir "laml.scm"))

(style "simple-html4.0-loose")

; ----------------------------------------------------------------------------------------
; Read bookmarks from data file

In bookmarks: Link from page-title to it's cross reference table entry 
(define page-title "Kurt Nørmark's Bookmarks") In bookmarks: Link from bookmarks to it's cross reference table entry 2.2. The left frame
(define bookmarks (file-read (string-append (startup-directory) "bookmarks-1.lsp"))) ; ---------------------------------------------------------------------------------------- ; Common functions In bookmarks: Link from bookmark-categories to it's cross reference table entry 
(define (bookmark-categories bookmark-list) (bookmark-categories-iterate bookmark-list '())) ; Selectors In bookmarks: Link from bookmark-title-of to it's cross reference table entry 2.1. Boomark selectors and constructor
(define bookmark-title-of (make-selector-function 2)) In bookmarks: Link from bookmark-url-of to it's cross reference table entry 2.1. Boomark selectors and constructor
(define bookmark-url-of (make-selector-function 3)) In bookmarks: Link from bookmark-category-of to it's cross reference table entry 2.1. Boomark selectors and constructor 2.2. The left frame
(define bookmark-category-of (make-selector-function 4)) In bookmarks: Link from bookmark-comment-of to it's cross reference table entry 2.1. Boomark selectors and constructor
(define bookmark-comment-of (make-selector-function 5)) In bookmarks: Link from bookmark-title-of-non-blank to it's cross reference table entry 
(define (bookmark-title-of-non-blank bm) (let ((bmt (bookmark-title-of bm))) (if (blank-string? bmt) "?" bmt))) ; Constructor In bookmarks: Link from make-bookmark to it's cross reference table entry 2.1. Boomark selectors and constructor
(define (make-bookmark ttl url cat com) (list 'bookmark ttl url cat com)) ; ---------------------------------------------------------------------------------------- ; ; The list of frame widths In bookmarks: Link from frame-width-list to it's cross reference table entry 1.1. The frameset page
(define frame-width-list '(200 *)) In bookmarks: Link from frameset-page to it's cross reference table entry 1.1. The frameset page
;; Write the index file (write-text-file (html (con (head ; A linked program source marker to section 1.1:
'The frameset page'
Mark char: a (title "Bookmark Browser") ; A linked program source marker to section 1.1:
'The frameset page'
Mark char: b ) (frameset (con ; A linked program source marker to section 1.1:
'The frameset page'
Mark char: c (frame 'name "bookmark-categories" 'src "categories.html" 'scrolling "auto") (frame 'name "bookmark-main" 'src "bookmarks.html" 'scrolling "auto") ) 'cols (list-to-string (map as-string frame-width-list) ",") ; A linked program source marker to section 1.1:
'The frameset page'
Mark char: d ))) (full-source-path-with-extension "html") ; A linked program source marker to section 1.1:
'The frameset page'
Mark char: e ) ; A procedure that makes an empty x page. In bookmarks: Link from make-empty-page! to it's cross reference table entry 1.1. The frameset page
(define (make-empty-page! x) (write-text-file (page x (h3 x)) (string-append x "." "html"))) (make-empty-page! "categories") (make-empty-page! "bookmarks") ; ---------------------------------------------------------------------------------------- ; THE LEFT HAND PAGE. In bookmarks: Link from present-categories to it's cross reference table entry 2.2. The left frame
(define (present-categories bml) (let* ((cat-list (map bookmark-category-of bml)) ; A linked program source marker to section 2.2:
'The left frame'
Mark char: a (cat-list-unique (remove-duplicates cat-list)) ; A linked program source marker to section 2.2:
'The left frame'
Mark char: b ) (list-to-string ; A linked program source marker to section 2.2:
'The left frame'
Mark char: d (map ; A linked program source marker to section 2.2:
'The left frame'
Mark char: c (lambda (cat) (a-tag-target (string-append "bookmarks.html" "#" cat) cat "bookmark-main") ) (sort-list (map downcase-string cat-list-unique) string<=?)) (br)))) In bookmarks: Link from left-frame-page to it's cross reference table entry 2.2. The left frame
;; Write the left frame. (write-text-file (page "Bookmark Categories" (con (font-1 4 red (b "Bookmark categories")) (p) (present-categories bookmarks) (p) (font-1 1 red (when-generated)) ) white black blue blue) "categories.html" ) ; ---------------------------------------------------------------------------------------- ; THE RIGHT HAND PAGE. In bookmarks: Link from sentinel-bookmark to it's cross reference table entry 3.1. The right frame
(define sentinel-bookmark (make-bookmark "" "" 'empty "")) In bookmarks: Link from present-bookmarks to it's cross reference table entry 3.1. The right frame
(define (present-bookmarks bml) (let* ((sorted-bookmarks ; A linked program source marker to section 3.1:
'The right frame'
Mark char: a (sort-list bml (lambda (bm1 bm2) (string<=? (downcase-string (bookmark-category-of bm1)) (downcase-string (bookmark-category-of bm2))))))) (present-bookmarks-1 ; A program source marker WITHOUT a link to the documentation sorted-bookmarks ; A linked program source marker to section 3.1:
'The right frame'
Mark char: c (cons sentinel-bookmark (butlast sorted-bookmarks)) ; A linked program source marker to section 3.1:
'The right frame'
Mark char: d ) ) ) In bookmarks: Link from present-bookmarks-1 to it's cross reference table entry 3.1. The right frame
(define (present-bookmarks-1 bml prev-bml) (list-to-string (map2 (lambda (bm bm-prev) (if (not ; A linked program source marker to section 3.1:
'The right frame'
Mark char: a (equal? (bookmark-category-of bm) (bookmark-category-of bm-prev))) (con (a-name (bookmark-category-of bm)) (h3 (bookmark-category-of bm)) (present-a-bookmark bm)) (present-a-bookmark bm))) bml prev-bml) (br))) In bookmarks: Link from present-a-bookmark to it's cross reference table entry 3.1. The right frame
(define (present-a-bookmark bm) (let ((comment (bookmark-comment-of bm))) (con (a 'href (bookmark-url-of bm) 'title comment ; A program source marker WITHOUT a link to the documentation (bookmark-title-of-non-blank bm))))) In bookmarks: Link from right-frame-page to it's cross reference table entry 3.1. The right frame
;; Write the right frame. (write-text-file (page "Bookmarks" (con (font-1 6 red (b page-title)) (p) (present-bookmarks bookmarks) (vertical-space 25)) white black blue blue) "bookmarks.html" )