So I took a first shot on processing the metadata that Lassi created here - code (for Gauche) is appended below. For now that's just picking to metadata values from an implementation-specific metadata file and using that information to build two Scheme functions - most simple thing to do was to just return the URL of the Scheme's index page plus one to query for documentation for symbol-at-point.
I'm not sure what you're ideas would be how to process the metadata, my thoughts were:
--- Gauche-scheme:
;; Gauche:
(use file.util)
(use sxml.sxpath)
(use util.match)
;; default helper functions with reasonable URLs to generic
documentation:
(define scheme-index-url
(lambda ()
"https://practical-scheme.net/wiliki/schemexref.cgi?R7RS"))
(define scheme-query-url
(lambda (arg)
"https://practical-scheme.net/wiliki/schemexref.cgi?"))
(define (read-meta-data implementation-name)
(define-syntax make-nullary
(syntax-rules ()
[(_ symbol-to-bind)
(lambda (child) (set! symbol-to-bind (lambda () child)))]))
(define-syntax make-unary
(syntax-rules ()
[(_ symbol-to-bind)
(lambda (child) (set! symbol-to-bind (lambda (query-arg)
(string-append child
query-arg))))]))
(define (try-set-match! form path set-child!)
;; Prepend *TOP*, so that we can add the car of the metadata
from to the sxpath.
(let ((child ((sxpath path) (cons '*TOP* form))))
(when (and child (not (null? child)))
(set-child! (car child)))))
(call-with-input-file (string-append implementation-name ".scm")
(lambda (p)
(let loop ((form (read p)))
(unless (eof-object? form)
(begin
(try-set-match! form '(// documentation web-url
*text*) (make-nullary scheme-index-url))
(try-set-match! form '(// documentation search-url
*text*) (make-unary scheme-query-url))
(loop (read p))))))))
(read-meta-data "gauche")
;; most simply debug output:
(display (list (and scheme-index-url (scheme-index-url))
(and scheme-query-url (scheme-query-url
"define"))))