[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generate some html from directory content
From: |
Matthew Huggett |
Subject: |
Re: generate some html from directory content |
Date: |
Fri, 21 Jan 2005 19:44:52 +0900 (JST) |
> From: sebastien.kirche@free.fr
> Newsgroups: gnu.emacs.help
> Date: Fri, 21 Jan 2005 11:13:17 +0100
>
> i am looking for an elisp package or routine that could help me to
> generate a list or a table of <a> tags in a html file corresponding
> to the content of a directory.
>
> The directory consist mainly of elisp files with few binaries and
> pics.
>
> I would use such a helper to generate a index file of files and
> then to document that list.
The function 'directory-files' might be useful. It takes the name of
a directory and returns a list of file names.
This needs cleaning up (html header etc.), but just as an example:
(defun html-dir-list (dir)
(interactive "DDirectory name: ")
(set-buffer (get-buffer-create "html directory listing"))
(dolist (x (directory-files dir t))
(insert (concat "<a>" x "</a>"))
(newline)))
Regards,
Matthew