schemedoc search functionality - 1
This commit is contained in:
parent
831b1d9e94
commit
1e5b4fdd6d
|
@ -1,2 +1,2 @@
|
|||
A pretty printing system
|
||||
-- Johan
|
||||
A search utility which reads perl pod directories.
|
||||
Eventually scheme sod directories.
|
||||
|
|
|
@ -51,6 +51,25 @@
|
|||
(set! SCHEMEDOCITEMS (append SCHEMEDOCITEMS (list (schemedoc-parser-grep (car l2)))))
|
||||
)))
|
||||
|
||||
(display "Your search is in the variable SCHEMEDOCITEMS list.")(newline)
|
||||
(display "You can regexp it if you want.")(newline)
|
||||
(display "Your search is in the variable SCHEMEDOCITEMS list variable.")
|
||||
(newline)
|
||||
(display "You can regexp it if you want.")
|
||||
(newline)
|
||||
|
||||
(define (schemedoc-search)
|
||||
(display "Do you want to search for something ? (type y/n)")
|
||||
(let ((s (read)))
|
||||
(newline)
|
||||
(cond ((and (symbol? s)(eq? s 'y))
|
||||
(display "What do you want to search for ?")
|
||||
(let ((s (read)))
|
||||
(newline)
|
||||
(let ((itemtexts (schemedoc-parser-get-items s SCHEMEDOCITEMS)))
|
||||
(display "Do you want me to print the items of your search ?")
|
||||
(let ((s (read)))
|
||||
(newline)
|
||||
(cond ((and (symbol? s)(eq? s 'y))
|
||||
(display itemtexts))
|
||||
(else (schemedoc-search)))))))
|
||||
(else (schemedoc-search)))))
|
||||
(schemedoc-search)
|
||||
|
|
|
@ -120,4 +120,12 @@
|
|||
(set! directories (append directories (list directory)))
|
||||
(set! directory "")))
|
||||
(set! directory (string-append directory (string (string-ref SCHEMEDOCDIR i)))))
|
||||
directories))
|
||||
directories))
|
||||
|
||||
(define (schemedoc-parser-get-items keyword itemtexts)
|
||||
(let ((returntext ""))
|
||||
(do ((l itemtexts (cdr l)))
|
||||
((null? l)0)
|
||||
(cond ((string<=? keyword (car l))
|
||||
(set! returntext (string-append returntext (car l))))))
|
||||
returntext))
|
Loading…
Reference in New Issue