[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Html/JS help on a local debian package search page



Tong wrote:
Hi,
Sorry, this Html/JS question is completely off the topic. But I don't know
where is the most appropriate place to ask. Just hoping if somebody here
can give me a hand.
What I want to know is a bit complicated, so I'll explain with an example.
I want to make a local search page for debian packages, so I don't need to burden and wait for the remote site just to enter the search string.
All that I want on the search page is:

a input box "search" _______

a radio box says:

( ) stable
( ) testing
( ) unstable

The radio box determine which string to prefix the search string. For
example, if "testing" is selected, the prefix string would be:
"http://packages.debian.org/cgi-bin/search_contents.pl?searchmode=searchword&case=insensitive&version=testing&arch=i386&word=";,
so if "media player" is entered in search box, the whole url would be
http://packages.debian.org/cgi-bin/search_contents.pl?searchmode=searchword&case=insensitive&version=testing&arch=i386&word=media+player

Then the local search page is refreshed as the new url above.

How can I do this? A sanity check of not-selecting any radio option would
also be greatly appreciated. Thanks a lot!

tong

Looks like you want to use the apt-cache command.

$apt-cache search solitaire
ace-of-penguins - Solitaire-games with penguin-look
freecell-solver-bin - Library for solving Freecell games
gnome-games - games for the GNOME desktop
jester - board game similar to Othello
junior-games-card - Debian Jr. Card Games
kpat - KDE solitaire patience game
libfreecell-solver-dev - Library for solving Freecell games (Development files)
libfreecell-solver0 - Library for solving Freecell games
mah-jong - The original Mah-Jong game
oonsoo - A solitaire game for X
pysol - X11 solitaire game written in Python
pysol-cardsets - Additional card graphics for Pysol
spider - A two deck solitaire game for the X Window System
vgacardgames - Four SVGAlib card games
xmahjongg - tile-based solitaire game
xpuyopuyo - A puzzle game similar to tetris, played with colored blobs
xsol - X Solitaire

For more details, read man apt-cache. Other useful commands in that category are

apt-cache show packagename
apt-file update
apt-file search filename

raju



Reply to: