;;; dir.skb -- The Skribe directory ;;; ;;; Copyright 2001, 2002, 2003, 2004 Manuel Serrano ;;; ;;; ;;; This file is part of Skribilo. ;;; ;;; Skribilo is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation, either version 3 of the License, or ;;; (at your option) any later version. ;;; ;;; Skribilo is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with Skribilo. If not, see . ;*---------------------------------------------------------------------*/ ;* The Skribe documentation style */ ;*---------------------------------------------------------------------*/ (skribe-load "web-book.skr") (skribe-load "skr/env.skr") (skribe-load "skr/manual.skr") (skribe-load "skr/api.skr") ;*---------------------------------------------------------------------*/ ;* Html configuration */ ;*---------------------------------------------------------------------*/ (let ((he (find-engine 'html))) (engine-custom-set! he 'web-book-main-browsing-extra (lambda (n e) (table :width 100. :border 0 :cellspacing 0 :cellpadding 0 (tr (td :align 'left :valign 'top (bold "Skribe: ")) (td :align 'right :valign 'top (ref :url *skribe-user-doc-url* :text "User Manual"))))))) ;*---------------------------------------------------------------------*/ ;* The global index */ ;*---------------------------------------------------------------------*/ (define *sui-index* (make-index "sui")) ;*---------------------------------------------------------------------*/ ;* index-sui ... */ ;*---------------------------------------------------------------------*/ (define (index-sui sui dir) (sui-filter sui (lambda (s) (and (pair? s) (eq? (car s) 'marks))) (lambda (e) (let ((f (memq :file e)) (k (memq :mark e)) (c (memq :class e))) (when (and (pair? f) (pair? k) (pair? c) (string=? (cadr c) "public-definition")) (index :index *sui-index* :url (format "~a/~a#~a" dir (cadr f) (cadr k)) (cadr k))) #f)))) ;*---------------------------------------------------------------------*/ ;* Intern all the sui files */ ;*---------------------------------------------------------------------*/ (define extensions '()) (let loop ((files (directory->list "html"))) (when (pair? files) (if (string=? (suffix (car files)) "sui") (let* ((f (string-append "html/" (car files))) (sui (load-sui f))) (if (not (string=? (car files) "user.sui")) (set! extensions (cons sui extensions))) (index-sui sui (dirname (car files))))) (loop (cdr files)))) (let loop ((files (directory->list "."))) (when (pair? files) (if (string=? (suffix (car files)) "sui") (let* ((f (car files)) (sui (load-sui f))) (if (not (string=? (car files) "user.sui")) (set! extensions (cons sui extensions))) (index-sui sui (dirname f)))) (loop (cdr files)))) ;*---------------------------------------------------------------------*/ ;* The document */ ;*---------------------------------------------------------------------*/ (document :title "Skribe directory" :author (list (author :name "Erick Gallesio" :affiliation "Université de Nice - Sophia Antipolis" :address '("930 route des Colles, BP 145" "F-06903 Sophia Antipolis, Cedex" "France") :email (mailto "eg@essi.fr")) (author :name "Manuel Serrano" :affiliation "Inria Sophia-Antipolis" :address `("2004 route des Lucioles - BP 93" "F-06902 Sophia Antipolis, Cedex" "France") :url (ref :url *serrano-url*) :email (mailto *serrano-mail*))) (linebreak 1) ;;; extensions (if (pair? extensions) (section :title "Installed extensions" :number #f (itemize (map (lambda (e) (item :key (ref :url (sui-file e) :text (sui-title e)) (let ((d (sui-key e :description))) (if d (list ": " d) #f)))) extensions)))) ;;; global Index (section :title "Global Markup Index" :number #f (mark "global index") (the-index :column 3 *sui-index*)))