* generate some html from directory content
@ 2005-01-21 10:13 Sébastien Kirche
2005-01-21 10:44 ` Matthew Huggett
2005-01-21 15:20 ` Drew Adams
0 siblings, 2 replies; 4+ messages in thread
From: Sébastien Kirche @ 2005-01-21 10:13 UTC (permalink / raw)
Hi,
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.
Thanks for some pointers.
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: generate some html from directory content
2005-01-21 10:13 generate some html from directory content Sébastien Kirche
@ 2005-01-21 10:44 ` Matthew Huggett
2005-01-21 15:20 ` Drew Adams
1 sibling, 0 replies; 4+ messages in thread
From: Matthew Huggett @ 2005-01-21 10:44 UTC (permalink / raw)
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: generate some html from directory content
2005-01-21 10:13 generate some html from directory content Sébastien Kirche
2005-01-21 10:44 ` Matthew Huggett
@ 2005-01-21 15:20 ` Drew Adams
1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2005-01-21 15:20 UTC (permalink / raw)
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.
My library `mkhtml.el' (Make HTML) does just that. It uses Hrvoje Niksic's
`htmlize.el', which creates HTML files from fontified buffers. `htmlize.el'
does not create HTML links from Emacs links (mouse-2 in Dired, to open a
file, for instance). `mkhtml.el' extends `htmlize.el' to recognize such
Emacs mouse links and convert them to HTML links. That sounds like what you
want to do, at least for a Dired buffer.
The only problem is that I have not had a chance to update `mkhtml.el' in a
number of years, and it will not work with the newer versions of
`htmlize.el'. You will have to find an old version of `htmlize.el' (I don't
know which one) to use with it. Also `mkhtml.el' works with Emacs 20; it has
not been updated to work with Emacs 21.
You can find `mkhtml.el' here: http://www.emacswiki.org/elisp/mkhtml.el.
Perhaps you can find an old copy of `htmlize.el' or perhaps you can update
`mkhtml.el' to work with a recent version (and with Emacs 21, if that's what
you have). At the least, you may be able to create what you want using some
of the `mkhtml.el' code as a guide. The Dired part of `mkhtml.el' is quite
simple, if I remember right (the Info part is more complex - see P.S.).
HTH,
Drew
P.S. `mkhtml.el' also does the same thing for Info buffers: It creates an
HTML page or set of HTML pages that correspond to Info buffers, complete
with hypertext links. You can also ask it to merge a set of Info nodes
together, to put them on the same Info page.
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.14439.1106321685.27204.help-gnu-emacs@gnu.org>]
* Re: generate some html from directory content
[not found] <mailman.14439.1106321685.27204.help-gnu-emacs@gnu.org>
@ 2005-01-21 16:19 ` Sébastien Kirche
0 siblings, 0 replies; 4+ messages in thread
From: Sébastien Kirche @ 2005-01-21 16:19 UTC (permalink / raw)
Le 21 Jan 2005, Drew Adams a formulé :
> My library `mkhtml.el' (Make HTML) does just that. It uses Hrvoje Niksic's
> `htmlize.el', which creates HTML files from fontified buffers.
Thank you for your suggestion, it sounds interesting. I will take a look
tonight.
Until now, i was suggested different solutions. Maybe it could be helpful to
someone else if i expose them ?
Simple ones :
- Matthew Huggett directory-file solution in the current thread
- viewing the directory with a browser then saving the buffer (eg: lynx
-source for doing programatically)
Otherwise the best solution i was told is not in elisp but with a
tiny-but-powerfull shell script from a fr.comp.application.emacs contributor
(Matthieu Moy): htmllist.sh (here : http://www-verimag.imag.fr/~moy/utils/)
Thank you for your contributions :)
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-21 16:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-21 10:13 generate some html from directory content Sébastien Kirche
2005-01-21 10:44 ` Matthew Huggett
2005-01-21 15:20 ` Drew Adams
[not found] <mailman.14439.1106321685.27204.help-gnu-emacs@gnu.org>
2005-01-21 16:19 ` Sébastien Kirche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).