c/sampler renamed to Ghetto-SoundSystem ;-)
[mirrors/Programs.git] / bash / arch-wiki / arch-wiki.bash
CommitLineData
21c4e167
H
1#!/bin/bash
2#arch-wiki-docs-search
3#requires arch-wiki-docs package
4
5wiki_title='Archers Guide to Galaxy - DO NOT PANIC!';
6html_docs='/usr/share/doc/arch-wiki/html/';
7
8search="harvie";
9search=$(zenity --entry --title="$wiki_title" --text='Enter regular expression to search');
10
11file=$(
12 fgrep -Ri "$search" "$html_docs" | cut -d ':' -f 1 | sort -u | while read file; do
13 title=$(fgrep -m 1 -i '<title>' "$file" | head -n 1 | cut -d '>' -f 2- | cut -d '<' -f 1);
14 echo -ne "FALSE\x00$title\x00$file\x00";
15 done | xargs -0 zenity --width=800 --height=300 --list --title="$wiki_title" --text='Select page to view' --radiolist --column 'X' --column 'Page' --column 'File' --print-column=3;
16);
17
18echo retu: $?;
19echo file: $file;
20
21
This page took 0.138554 seconds and 4 git commands to generate.