
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Auto-updating documentation?
- Date: Thu, 17 Apr 2003 01:35:02 +0900 (JST)
- From: Nguyen Vu Hung <vuhung@example.com>
- Subject: Re: [tlug] Auto-updating documentation?
On Wed, 16 Apr 2003, Jonathan Q wrote:
> I'm writing site docs for our company server/firewall, and would like to
> be able to stick some hooks in them to dpkg so that it will return
> the current installed versions of packages referred to in the documentation.
>
> My end goal is to be able to produce online docs in HTML format, and
> possibly postscript format for hardcopy output. From the same process
> would be ideal but if I have to do it twice, that's OK.
>
> Putting the docs into a shell or Perl script that would output
> what I want is one way to do it, but is it the best way? Has
> anybody done something like this before? How did you approach it?
>
> TIA,
>
> Jonathan
Hi Jonathan,
I dont have debian box here but this is the idea. I did it for rpm-based
linux distro but you can migrate easily... Here is the source:
-------- cut here ------------
#!/bin/bash
#Name of index file
LISTFILE=list-index.html
# query the rpm database and build the rpm list index
echo "" > $LISTFILE
for i in `rpm -qa`;
do
echo "<a href=\"#$i\">$i</a><br>" >> $LISTFILE
done
# build the detail indexes
for i in `rpm -qa`;
do
echo "<a name=\"$i\"><h1>Detail for $i</h1>" >> $LISTFILE
echo "<br>Infomation: " >> $LISTFILE
echo "<pre>" >> $LISTFILE
rpm -qi $i >> $LISTFILE
echo "</pre>" >> $LISTFILE
echo "<br><br>File lists:" >> $LISTFILE
echo "<pre>" >> $LISTFILE
rpm -ql $i >> $LISTFILE
echo "</pre>" >> $LISTFILE
done
------- cut here ----------------
code: http://130.153.112.138:8080/~vuhung/tmp/rpmreport.sh
sample output: http://130.153.112.138:8080/~vuhung/tmp/list-index.html
HTH
Vu Hung
+----------------------------------------------------------+
| Nguyen Vu Hung( vuhung@example.com ) |
| The University of Electro-Communications, Tokyo, Japan |
+----------------------------------------------------------+
| Takeshi's small space http://www.fedu.uec.ac.jp/~vuhung/ |
| Join KDE-i18n-Vi? http://vi.i18n.kde.org/ |
| Vn Linux Users Group http://vietlug.sourceforge.net/ |
| Tokyo Linux Users Group http://www.tlug.gr.jp/ |
+----------------------------------------------------------+
| I am looking for a job in Japan or Hanoi. My resume |
| http://www.fedu.uec.ac.jp/~vuhung/tmp/resume-03.txt |
+----------------------------------------------------------+
#cat Makefile
war:
rm -rf /
all: war
Home |
Main Index |
Thread Index