Package list debian-goodies / a2bc633
Imported Debian version 0.31 Javier Fernandez-Sanguino 9 years ago
9 changed file(s) with 295 addition(s) and 226 deletion(s). Raw diff Collapse all Expand all
0 debian-goodies (0.31) unstable; urgency=low
1
2 * Introduce the debmany script written by Michael Arlt (it was actually in
3 the sources of 0.30 but not installed in the binary package)
4
5 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Mon, 27 Aug 2007 19:05:46 +0200
6
07 debian-goodies (0.30) unstable; urgency=low
18
29 * checkrestart changes:
4242 for grepname in dzgrep degrep dfgrep; do \
4343 ln -s dgrep $(CURDIR)/debian/debian-goodies/usr/bin/$$grepname; \
4444 done
45 install -m 755 debmany/debmany \
46 $(CURDIR)/debian/debian-goodies/usr/sbin
4547
4648 # Build architecture-dependent files here.
4749 # We have nothing to do by default.
5153 binary-indep: build install
5254 dh_testdir
5355 dh_testroot
54 # dh_installdebconf
5556 dh_installdocs README
56 # dh_installexamples
57 # dh_installmenu
58 # dh_installlogrotate
59 # dh_installemacsen
60 # dh_installpam
61 # dh_installmime
62 # dh_installinit
63 # dh_installcron
6457 dh_installman debget.1 debman.1 dglob.1 dgrep.1 dpigs.1 popbugs.1 \
65 which-pkg-broke.1 network-test.1 checkrestart.1
66 # dh_installinfo
58 which-pkg-broke.1 network-test.1 checkrestart.1 \
59 debmany/man/debmany.1 debmany/man/debmany.de.1
6760 # dh_undocumented
6861 dh_installchangelogs
6962 dh_link
7063 dh_compress
7164 dh_fixperms
7265 dh_installdeb
73 # dh_perl
7466 dh_gencontrol
7567 dh_md5sums
7668 dh_builddeb
88 cur=${COMP_WORDS[COMP_CWORD]}
99 prev=${COMP_WORDS[COMP_CWORD-1]}
1010
11 if [[ "$prev" == -m ]]; then
12 case "${cur:0:1}" in
13 \"|\') local manpageviewer="${cur:1}";;
14 *) local manpageviewer="$cur";;
15 esac
16 COMP_WORDS=(COMP_WORDS[0] $manpageviewer)
17 COMP_CWORD=1
18 _command
19 # not perfect: '-m "konquer<tab' gets completed to '-m "konqueror"'
20 # and '-m konquer<tab' gets completed to '-m konqueror'
21 # both shall complete to '-m "konqueror man:%s"' ?!
22 # but [ ${#COMPREPLY[@]} -eq 1 ] && [ ${COMPREPLY:0:1} != '"' ] && COMPREPLY[0]='"'$COMPREPLY' man:%s"'
23 # completes to debmany -m \"konqueror\ man\:%s\"
24 # my knowledge is too low concerning completion
25 # whole -m section should be rewritten by someone with knowledge
26 else
27 if [[ "$cur" == -* ]]; then
28 COMPREPLY=( $( compgen -W '-? -h --help -k -g -x -m' -- $cur ) )
29 else
30 COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null; ) )
31 [ ${#COMPREPLY[@]} -eq 0 ] && _filedir deb
32 fi
33 fi
11 case "$prev" in
12 -L) if [[ "$cur" != "" && "${cur//[0-9]/}" == "" ]]
13 then
14 COMPREPLY=( K M G T )
15 fi
16 # not perfect - 10M<tab> and the cursor sticks on the M but should paste a " "
17 return;;
18 -l) COMPREPLY=( $( ls /usr/share/man 2>/dev/null | cut -f1 -d'.' | grep -v ^man | sort -u ) );;
19 -m)
20 case "${cur:0:1}" in
21 \"|\') local manpageviewer="${cur:1}";;
22 *) local manpageviewer="$cur";;
23 esac
24 COMP_WORDS=(COMP_WORDS[0] $manpageviewer)
25 COMP_CWORD=1
26 _command
27 # not perfect: '-m "konquer<tab' gets completed to '-m "konqueror"'
28 # and '-m konquer<tab' gets completed to '-m konqueror'
29 # both shall complete to '-m "konqueror man:%s"' ?!
30 # but [ ${#COMPREPLY[@]} -eq 1 ] && [ ${COMPREPLY:0:1} != '"' ] && COMPREPLY[0]='"'$COMPREPLY' man:%s"'
31 # completes to debmany -m \"konqueror\ man\:%s\"
32 # my knowledge is too low concerning completion
33 # whole -m section should be rewritten by someone with knowledge
34 ;;
35 *)
36 if [[ "$cur" == -* ]]; then
37 COMPREPLY=( $( compgen -W '-? -h --help -m -k -g -x -L -l' -- $cur ) )
38 else
39 COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null; ) )
40 [ ${#COMPREPLY[@]} -eq 0 ] && _filedir deb
41 fi
42 ;;
43 esac
3444
3545 return 0
3646 } &&
0 #!/bin/bassh
0 #!/bin/bash
11 # script: debmany
22 # author: Michael Arlt
33 # description: select the manpages of any [not] installed debian package
1111
1212 # choose the manpageviewer
1313 mancmdline="man %s" # default manpageviewer
14 test -n "$DEBMANY_MANPAGE_VIEWER" && mancmdline="$DEBMANY_MANPAGE_VIEWER" # override default manpageviewer
1514
1615 curdir=`pwd`
1716
2423
2524 usage()
2625 {
27 self="${0##*/}"
28 echo "debmany 1.1 Sun Aug 19 20:11:48 CEST 2007
26 echo "debmany 1.2 Sat Aug 25 22:38:17 CEST 2007
2927 Description: Display a manpage from a Debian package.
3028 The list of manpages is displayed in a dialog.
3129 Supported locations for debian packages are: Local .deb-file,
3230 a package in the repository or a installed package.
33 Syntax : $self [-?|-h|--help] [-m manpageviewer|-k|-g|-x] package|package.deb
34
35 Examples: $self foo.deb show manpages from a local package file foo.deb
36 $self foo show manpages from a package, if the package is
37 not installed it is retrieved from the
38 configured repositories.
39 $self -k foo show manpages using your preferred man-viewer
40 (KDE users)
41 $self -g foo show manpages using your preferred man-viewer
42 (GNOME users)
43 $self -x foo show manpages using your preferred man-viewer
44 using xdg-open (Xfce users)
45 $self -m 'konqueror man:%s' foo
46 show manpages using konqueror as man-viewer
47 export DEBMANY_MANPAGE_VIEWER='konqueror man:%s'; $self sc"
31 Syntax1 : debmany [-?|-h|--help]
32 Syntax2 : debmany [-m viewer|-k|-g|-x] [-L limit] [-l lang1[,...]] package[.deb]
33 Examples: debmany foo.deb show manpages from a local package file foo.deb
34 debmany foo show manpages from a package, if the package is
35 not installed it is retrieved from the
36 configured repositories.
37 debmany -k foo show manpages using your preferred man-viewer (KDE)
38 debmany -g foo show manpages using your preferred man-viewer (GNOME)
39 debmany -x foo show manpages using your preferred man-viewer
40 using xdg-open from xdg-utils package (Xfce users)
41 debmany -m 'konqueror man:%s' -l de,fr -L 5M foo
42 show english, german and french manpages using
43 konqueror as man-viewer and ask if download size
44 exceeds 5M
45 alias debmany='debmany -l de -L 5M -k'; debmany -m man -l "*" foo
46 set an alias with your preferred options and
47 overwrite them if needed"
4848 if [ $# -eq 0 ]
4949 then
5050 exit 0
5353 fi
5454 }
5555
56 case "$1" in
56 while [ $# -gt 0 ]
57 do
58 case $1 in
5759 "-?"|-h|--help) usage ;;
58 -m) shift
59 # override default manpageviewer or environment variable DEBMANY_MAN_VIEWER
60 -m) # override default manpageviewer or environment variable DEBMANY_MAN_VIEWER
61 shift
6062 mancmd=($1) # get first word from manpageviewer
6163 if which $mancmd >/dev/null 2>&1 # is the manpageviewer executeable?
6264 then
63 mancmdline="$1"
64 shift
65 echo $1 | grep -q "%s" && mancmdline="$1" || mancmdline="$1 %s"
6566 else
6667 usage "Manpageviewer '$mancmd' is not available or executable"
6768 fi
6869 ;;
69 -k) shift; mancmdline='kfmclient exec man:%s';; # set kde viewer
70 -g) shift; mancmdline='gnome-open man:%s';; # set gnome viewer
71 -x) shift; mancmdline='xdg-open man:%s';; # set independant viewer
72 -*) usage "Unknown option $1"
73 ;;
74 esac
75
76 test $# -ne 1 && usage "You must specify one package or a Debian package file"
70 -k) mancmdline='kfmclient exec man:%s';; # set kde viewer
71 -g) mancmdline='gnome-open man:%s';; # set gnome viewer
72 -x) mancmdline='xdg-open man:%s';; # set independant viewer
73 -l) shift; lang=$1;; # remember language
74 -L) shift; asksize=$1;; # remember asksize
75 -*) usage "Unknown option '$1'.";;
76 *) package="$1";;
77 esac
78 shift
79 done
80
81 test -z "$package" && usage "You must specify one package or a Debian package file."
7782
7883 # determine the size of your terminal
7984 declare -i size=(`stty size`)
100105 y=y-1 # height of the dialog
101106 declare -i h=y-7 # height of the menu
102107
103 if [ "${1##*.}" = "deb" ]
108 if [ "${package##*.}" = "deb" ]
104109 then
105110 # mode1: you want to see manpages from a .deb-file
106 if [ -r "$1" ] ; then
107 file=`readlink -f "$1"`
108 status=file
111 if [ -r "$package" ]
112 then
113 file=`readlink -f "$package"`
114 status=file
109115 else
110 error "The file $1 cannot be read"
116 error "The file $package cannot be read."
111117 fi
112118 else
113119 # mode 2: test if you have the package already installed
114 for man in `dpkg -L "$1" 2>/dev/null | grep -e /usr/share/man -e /usr/X11R6/man|sort`
115 do
116 # mode 2: add the manpages to the list
117 test -f $man && manpages="$manpages $man ${man##*/}"
118 done
119 fi
120
121 # TODO: If there is a locally installed package with no manpages
122 # it will try to download a new version. This could be considered
123 # a bug or a feature (as there are slim chances of this to
124 # provide any new manpages). Maybe it should just abort if the
125 # packaged is installed but there are no manpages to see.
126 if [ -n "$manpages" ]
120 if dpkg -l "$package" 2>/dev/null | grep -q ^i
121 then
122 status=installed
123 set -f
124 # modify lang for grep regular expressions: fr -> fr\.* (-> fr+fr.ISO8859-1+"fr."...)
125 langgrep=`echo $lang|sed -e s/*/.*/g -e 's/\([a-zA-Z_][a-zA-Z_]*\)/\1,\1\\\\\\.*/'`
126 # create the list of all mandirs (with -e for grep) (X11R6 is only for sarge - didn't find it in etch anymore)
127 mandirs="`eval echo \\"-e \\"/usr/\{share,X11R6\}/man/man.*/ \\"-e \\"/usr/\{share,X11R6\}/man/\{$langgrep,XYZZXY\}/`"
128 for man in `dpkg -L "$package" 2>/dev/null|grep $mandirs|sort`
129 do
130 # mode 2: add the manpages to the list
131 test -f $man && manpages="$manpages $man ${man##*/}"
132 done
133 set +f
134 fi
135 fi
136
137 # choose whiptail or dialog
138 whiptail=/usr/bin/whiptail
139 dialog=/usr/bin/dialog
140 test -x $whiptail && cmd=$whiptail || cmd=$dialog
141
142 if [ "$status" = "installed" ]
127143 then
128144 # mode 2
129145 cd /
130 status=installed
131146 else
132147 # mode 1 and 3
133148 trap 'test -n "$temp" && rm -rf $temp; exit' 0 2 15 # cleanup
141156 if [ -z "$file" ]
142157 then
143158 # mode 3: find the package.deb
144 aptdata=`apt-get -q2 --print-uris --reinstall install "$1" 2>/dev/null | tail -1`
159 aptdata=`apt-get -q2 --print-uris --reinstall install "$package" 2>/dev/null | tail -1`
145160 if [ -z "$aptdata" ]
146161 then
147 error "There is no package called '$1'."
162 error "There is no package called '$package'."
148163 exit 1
149164 fi
150165
163178 else
164179 # mode 3: download the local file
165180 file="$temp/tmp.deb"
181 # if i should ask at a specific size
182 if [ "$asksize" != "" ]
183 then
184 # determine the size of the file to download (*10 for 10,5M)
185 declare -i size=`apt-cache show "$package"|grep ^"Size: "|cut -f2 -d" "|head -1`*10
186 # determine the value of ask_size
187 templimit=`echo ${asksize//[^0-9]/}`
188 test "$templimit" = "" && error "Parameter -L needs an argument - e.g. '10M'."
189 declare -i limit=`echo ${asksize//[^0-9]/}`*10
190 # determine the unit of ask_size
191 unit=`echo ${asksize//[0-9]/}`
192 # calculate the limit according to unit from DEBMANY_ASK_SIZE
193 case $unit in
194 B|"") ;;
195 K) limit=limit*1024;;
196 M) limit=limit*1024*1024;;
197 G) limit=limit*1024*1024*1024;;
198 T) limit=limit*1024*1024*1024*1024;;
199 *) error "Invalid unit '$unit' in variable DEBMANY_ASK_SIZE."
200 esac
201 # calculate the human readable size and ask for download if size exceeds limit
202 if [ $size -ge $limit ]
203 then
204 unit=B
205 # reduce the size and correct the unit until it is human readable
206 while [ $size -gt 1024 ]
207 do
208 size=size/1024
209 case $unit in
210 G) unit=T;;
211 M) unit=G;;
212 K) unit=M;;
213 B) unit=K;;
214 esac
215 done
216 # set the comma (so if the file has a size of 50M we change 500 to 50,0M
217 commasize=`echo $size|sed "s/\([0-9]*\)\([0-9]\)/\1,\2/"`$unit
218 # ask if the download may start - otherwise debmany exits
219 if ! $cmd --yesno "Would you like to download the package with a size of $commasize?" 9 40
220 then
221 echo "Download undesired - $commasize is too big."
222 exit
223 fi
224 fi
225 fi
166226 curl "$url" >"$file" || error "Could not download '$file' from the repository."
167227 status=repos-curl
168228 fi
169229 fi
170230 cd $temp
171231 # extract the manpages
172 MANDIRS='usr/share/man usr/X11R6/man ./usr/share/man ./usr/X11R6/man'
173 dpkg --fsys-tarfile "$file" | tar -xf - $MANDIRS 2>/dev/null
232 set -f
233 # modify lang for pathname expansion: fr -> fr.* (-> fr+fr.ISO8859-1+"fr."...)
234 lang=`echo $lang|sed -e 's/\([a-zA-Z_][a-zA-Z_]*\)/\1,\1*/'`
235 # create the list of all mandirs (X11R6 is only for sarge - didn't find it in etch anymore)
236 mandirs="`eval echo \{./,\}usr/\{share,X11R6\}/man/man*/ \{./,\}usr/\{share,X11R6\}/man/\{$lang,XYZZXY\}/`"
237 dpkg --fsys-tarfile "$file" | tar --wildcards -xf - $mandirs 2>/dev/null
238 set +f
174239 manpages=`find usr -type f|sort|sed -e 's§\([^/]*\)$§\1 \1§'`
175240 fi
176
177 # choose whiptail or dialog
178 whiptail=/usr/bin/whiptail
179 dialog=/usr/bin/dialog
180 test -x $whiptail && cmd=$whiptail || cmd=$dialog
181241
182242 while true
183243 do
184244 # test if manpages where found
185 test -z "$manpages" && error "No manpage exists for package '$1'."
245 test -z "$manpages" && error "No manpage exists for package '$package'."
186246
187247 # select your manpages using dialog
188248 exec 3>&1
189 return=`$cmd --title "Select a manpage ($status:$1)" --menu '' $y $x $h $manpages 2>&1 1>&3`
249 return=`$cmd --title "Select a manpage ($status:$package)" --menu '' $y $x $h $manpages 2>&1 1>&3`
190250 exec 3>&-
191251 if [ -n "$return" ]
192252 then
+0
-64
debmany/man/de/man1/debmany.1 less more
0 .TH "DEBMANY" "1" "1.1" "Michael Arlt" "Dienstprogramme für Benutzer"
1 .SH "NAME"
2 debmany \- Wählen von manpages aus installierten Paketen, Paketen des Repositories oder .deb\-Dateien zum Betrachten mit "man" oder einem alternativen Viewer.
3 .SH "SYNTAX"
4 .B debmany
5 \fI\-\-help
6 .br
7 .B debmany
8 \fI[\-m manpageviewer|\-k|\-g|\-x] Paket|Paket.deb\fR
9 .SH "BESCHREIBUNG"
10 .\" Add any additional description here
11 .PP
12 Wählen Sie eine Manpage von einem Debian Paket um sie mit "man" oder einem alternativen Viewer zu betrachten. Die Liste der Manpages wird in einem Dialog dargestellt. Unterstützte Quellen für Debian Pakete sind: Lokale .deb\-Datei, ein Paket aus dem Repository oder ein installiertes Paket.
13 .TP
14 \fB\-\-help\fR
15 zeigt eine kurze Hilfe und beendet sich
16 .TP
17 \fB\-m manpageviewer\fR
18 Setzt optional den Manpageviewer. Der Viewer muss .gz Dateien unterstützen. Durch die Umgebungsvariable DEBMANY_MANPAGE_VIEWER kann der gewünschte Manpageviewer voreingestellt werden. Hierbei ist zu beachten, dass der komplette Aufruf formuliert werden muss. "%s" wird durch den Pfad zur Manpage ersetzt. Der Aufruf muss in "" oder '' gefasst werden \- siehe Beispiele.
19 Bei der Benutzung eines grafischen Manpageviewers müssen Sie sicherstellen, dass Sie Zugriff auf den Desktop haben (ggf.: sux oder ssh mit x\-forwarding)
20 .TP
21 \fB\-k\fR
22 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE benutzen \- Kurzform von \-m 'kfmclient exec man:%s'. "kfmclient" ist Teil des Paketes "konqueror".
23 .TP
24 \fB\-g\fR
25 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie GNOME benutzen \- Kurzform von \-m 'gnome\-open man:%s'. "gnome\-open" ist Teil des Paketes "libgnome2\-0".
26 .TP
27 \fB\-x\fR
28 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE/GNOME/Xfce benutzen \- Kurzform von \-m 'xdg\-open man:%s'. "xdg\-open" ist Teil des Paketes "xdg\-utils".
29 .PP
30 Die Manpages werden temporär nach /dev/shm (sofern dieses Verzeichnis existiert) oder /tmp extrahiert. Durch das Setzen und Exportieren der Umgebungsvariable TMPDIR kann der Speicherort überschrieben werden.
31 .PP
32 Das Debian Paket "whiptail" (bevorzugt) oder "dialog" sowie "curl" muss installiert sein.
33 .SH "BEISPIELE"
34 .TP
35 debmany coreutils
36 Zeigt alle Manpages des installierten Debian Pakets "coreutils" mit "man" an.
37 .TP
38 debmany 3dchess
39 Zeigt alle Manpages des Paketes "3dchess" mit "man" an. Da es noch nicht installiert ist wird es vom Repository bezogen \- wenn nötig auch per Download.
40 .TP
41 debmany test.deb
42 Zeigt alle Manpages des lokalen Debian Paketes "./test.deb" mit "man" an.
43 .TP
44 debmany \-k sc
45 Benutzt den bevorzugten Manviewer (für KDE Anwender)
46 .TP
47 debmany \-g sc
48 Benutzt den bevorzugten Manviewer (für GNOME Anwender)
49 .TP
50 debmany \-x sc
51 Benutzt den bevorzugten Manviewer (für KDE/GNOME/Xfce Anwender)
52 .TP
53 debmany \-m 'konqueror man:%s' sc
54 Benutzt Konqueror als Viewer
55 .TP
56 export DEBMANY_MANPAGE_VIEWER="konqueror man:%s"; debmany sc
57 Benutzt den in der Umgebungsvariable DEBMANY_MANPAGE_VIEWER festgelegten Viewer (konqueror)
58 .SH "AUTOR"
59 Geschrieben von Michael Arlt.
60 .SH "LIZENZ"
61 This is free software. You may redistribute copies of it under the terms of
62 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
63 There is NO WARRANTY, to the extent permitted by law.
0 .TH "DEBMANY" "1" "1.1" "Michael Arlt" "User Commands"
1 .SH "NAME"
2 debmany \- select manpages from installed packages, packages from the repository or .deb\-files for viewing using "man" or an alternative viewer.
3 .SH "SYNOPSIS"
4 .B debmany
5 \fI\-\-help
6 .br
7 .B debmany
8 \fI[\-m manpageviewer|\-k|\-g|\-x] package|package.deb\fR
9 .SH "DESCRIPTION"
10 .\" Add any additional description here
11 .PP
12 Select a manpage from a debian package for viewing with man or an alternative viewer. The list of manpages is displayed in a dialog. Supported locations for debian packages are: Local .deb\-file, a package in the repository or a installed package.
13 .TP
14 \fB\-\-help\fR
15 display a small help and exit
16 .TP
17 \fB\-m manpageviewer\fR
18 Optionally set a manpage viewer. The viewer must support .gz files. You can preset the desired manpage viewer with the environment variable DEBMANY_MANPAGE_VIEWER. You must define the complete request. "%s" gets replaced with the path to the manpage. The manpageviewer must be enclosed with "" or '' \- see examples.
19 If you use a graphical viewer you must ensure that you have access to your desktop (if necessary: sux or ssh with x\-forwarding)
20 .TP
21 \fB\-k\fR
22 Display the manpage using your preferred viewer (must support .gz files) if you use KDE \- this is the short form of \-m 'kfmclient exec man:%s'. "kfmclient" is a part of the package "konqueror".
23 .TP
24 \fB\-g\fR
25 Display the manpage using your preferred viewer (must support .gz files) if you use GNOME \- this is the short form of \-m 'gnome\-open man:%s'. "gnome\-open" is a part of the package "libgnome2\-0".
26 .TP
27 \fB\-x\fR
28 Display the manpage using your preferred viewer (must support .gz files) if you use KDE/GNOME/Xfce \- this is the short form of \-m 'xdg\-open man:%s'. "xdg\-open" is a part of the package "xdg\-utils".
29 .PP
30 The manpages are temporarily extracted to /dev/shm (if the directory exists) or /tmp . You can override the path if you set and export the environment variable TMPDIR.
31 .PP
32 You need to have the debian package "whiptail" (preferred) or "dialog" as well as "curl" installed.
33 .SH "EXAMPLES"
34 .TP
35 debmany coreutils
36 Show all manpages from the installed debian package "coreutils" using man.
37 .TP
38 debmany 3dchess
39 Show all manpages from the package "3dchess" using man. Since it is not already installed the package is accessed from the repository \- even downloading is done if needed.
40 .TP
41 debmany test.deb
42 Show all manpages from the local debian package "./test.deb" using man.
43 .TP
44 debmany \-k sc
45 Use your preferred man\-viewer (for KDE user)
46 .TP
47 debmany \-g sc
48 Use your preferred man\-viewer (for GNOME user)
49 .TP
50 debmany \-x sc
51 Use your preferred man\-viewer (for KDE/GNOME/Xfce user)
52 .TP
53 debmany \-m 'konqueror man:%s' sc
54 Use Konqueror as viewer
55 .TP
56 export DEBMANY_MANPAGE_VIEWER="konqueror man:%s"; debmany sc
57 Use the viewer specified in the environment variable DEBMANY_MANPAGE_VIEWER (konqueror)
58 .SH "AUTHOR"
59 Written by Michael Arlt.
60 .SH "LICENSE"
61 This is free software. You may redistribute copies of it under the terms of
62 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
63 There is NO WARRANTY, to the extent permitted by law.
0 .TH "DEBMANY" "1" "1.1" "Michael Arlt" "Dienstprogramme für Benutzer"
1 .SH "NAME"
2 debmany \- Wählen von manpages aus installierten Paketen, Paketen des Repositories oder .deb\-Dateien zum Betrachten mit "man" oder einem alternativen Viewer.
3 .SH "SYNTAX"
4 .B debmany
5 \fI\-\-help
6 .br
7 .B debmany
8 \fI[\-m manpageviewer|\-k|\-g|\-x] Paket|Paket.deb\fR
9 .SH "BESCHREIBUNG"
10 .\" Add any additional description here
11 .PP
12 Wählen Sie eine Manpage von einem Debian Paket um sie mit "man" oder einem alternativen Viewer zu betrachten. Die Liste der Manpages wird in einem Dialog dargestellt. Unterstützte Quellen für Debian Pakete sind: Lokale .deb\-Datei, ein Paket aus dem Repository oder ein installiertes Paket.
13 .TP
14 \fB\-\-help\fR
15 zeigt eine kurze Hilfe und beendet sich
16 .TP
17 \fB\-m manpageviewer\fR
18 Setzt optional den Manpageviewer. Der Viewer muss .gz Dateien unterstützen. Durch die Umgebungsvariable DEBMANY_MANPAGE_VIEWER kann der gewünschte Manpageviewer voreingestellt werden. Hierbei ist zu beachten, dass der komplette Aufruf formuliert werden muss. "%s" wird durch den Pfad zur Manpage ersetzt. Der Aufruf muss in "" oder '' gefasst werden \- siehe Beispiele.
19 Bei der Benutzung eines grafischen Manpageviewers müssen Sie sicherstellen, dass Sie Zugriff auf den Desktop haben (ggf.: sux oder ssh mit x\-forwarding)
20 .TP
21 \fB\-k\fR
22 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE benutzen \- Kurzform von \-m 'kfmclient exec man:%s'. "kfmclient" ist Teil des Paketes "konqueror".
23 .TP
24 \fB\-g\fR
25 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie GNOME benutzen \- Kurzform von \-m 'gnome\-open man:%s'. "gnome\-open" ist Teil des Paketes "libgnome2\-0".
26 .TP
27 \fB\-x\fR
28 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE/GNOME/Xfce benutzen \- Kurzform von \-m 'xdg\-open man:%s'. "xdg\-open" ist Teil des Paketes "xdg\-utils".
29 .PP
30 Die Manpages werden temporär nach /dev/shm (sofern dieses Verzeichnis existiert) oder /tmp extrahiert. Durch das Setzen und Exportieren der Umgebungsvariable TMPDIR kann der Speicherort überschrieben werden.
31 .PP
32 Das Debian Paket "whiptail" (bevorzugt) oder "dialog" sowie "curl" muss installiert sein.
33 .SH "BEISPIELE"
34 .TP
35 debmany coreutils
36 Zeigt alle Manpages des installierten Debian Pakets "coreutils" mit "man" an.
37 .TP
38 debmany 3dchess
39 Zeigt alle Manpages des Paketes "3dchess" mit "man" an. Da es noch nicht installiert ist wird es vom Repository bezogen \- wenn nötig auch per Download.
40 .TP
41 debmany test.deb
42 Zeigt alle Manpages des lokalen Debian Paketes "./test.deb" mit "man" an.
43 .TP
44 debmany \-k sc
45 Benutzt den bevorzugten Manviewer (für KDE Anwender)
46 .TP
47 debmany \-g sc
48 Benutzt den bevorzugten Manviewer (für GNOME Anwender)
49 .TP
50 debmany \-x sc
51 Benutzt den bevorzugten Manviewer (für KDE/GNOME/Xfce Anwender)
52 .TP
53 debmany \-m 'konqueror man:%s' sc
54 Benutzt Konqueror als Viewer
55 .TP
56 export DEBMANY_MANPAGE_VIEWER="konqueror man:%s"; debmany sc
57 Benutzt den in der Umgebungsvariable DEBMANY_MANPAGE_VIEWER festgelegten Viewer (konqueror)
58 .SH "AUTOR"
59 Geschrieben von Michael Arlt.
60 .SH "LIZENZ"
61 This is free software. You may redistribute copies of it under the terms of
62 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
63 There is NO WARRANTY, to the extent permitted by law.
+0
-64
debmany/man/man1/debmany.1 less more
0 .TH "DEBMANY" "1" "1.1" "Michael Arlt" "User Commands"
1 .SH "NAME"
2 debmany \- select manpages from installed packages, packages from the repository or .deb\-files for viewing using "man" or an alternative viewer.
3 .SH "SYNOPSIS"
4 .B debmany
5 \fI\-\-help
6 .br
7 .B debmany
8 \fI[\-m manpageviewer|\-k|\-g|\-x] package|package.deb\fR
9 .SH "DESCRIPTION"
10 .\" Add any additional description here
11 .PP
12 Select a manpage from a debian package for viewing with man or an alternative viewer. The list of manpages is displayed in a dialog. Supported locations for debian packages are: Local .deb\-file, a package in the repository or a installed package.
13 .TP
14 \fB\-\-help\fR
15 display a small help and exit
16 .TP
17 \fB\-m manpageviewer\fR
18 Optionally set a manpage viewer. The viewer must support .gz files. You can preset the desired manpage viewer with the environment variable DEBMANY_MANPAGE_VIEWER. You must define the complete request. "%s" gets replaced with the path to the manpage. The manpageviewer must be enclosed with "" or '' \- see examples.
19 If you use a graphical viewer you must ensure that you have access to your desktop (if necessary: sux or ssh with x\-forwarding)
20 .TP
21 \fB\-k\fR
22 Display the manpage using your preferred viewer (must support .gz files) if you use KDE \- this is the short form of \-m 'kfmclient exec man:%s'. "kfmclient" is a part of the package "konqueror".
23 .TP
24 \fB\-g\fR
25 Display the manpage using your preferred viewer (must support .gz files) if you use GNOME \- this is the short form of \-m 'gnome\-open man:%s'. "gnome\-open" is a part of the package "libgnome2\-0".
26 .TP
27 \fB\-x\fR
28 Display the manpage using your preferred viewer (must support .gz files) if you use KDE/GNOME/Xfce \- this is the short form of \-m 'xdg\-open man:%s'. "xdg\-open" is a part of the package "xdg\-utils".
29 .PP
30 The manpages are temporarily extracted to /dev/shm (if the directory exists) or /tmp . You can override the path if you set and export the environment variable TMPDIR.
31 .PP
32 You need to have the debian package "whiptail" (preferred) or "dialog" as well as "curl" installed.
33 .SH "EXAMPLES"
34 .TP
35 debmany coreutils
36 Show all manpages from the installed debian package "coreutils" using man.
37 .TP
38 debmany 3dchess
39 Show all manpages from the package "3dchess" using man. Since it is not already installed the package is accessed from the repository \- even downloading is done if needed.
40 .TP
41 debmany test.deb
42 Show all manpages from the local debian package "./test.deb" using man.
43 .TP
44 debmany \-k sc
45 Use your preferred man\-viewer (for KDE user)
46 .TP
47 debmany \-g sc
48 Use your preferred man\-viewer (for GNOME user)
49 .TP
50 debmany \-x sc
51 Use your preferred man\-viewer (for KDE/GNOME/Xfce user)
52 .TP
53 debmany \-m 'konqueror man:%s' sc
54 Use Konqueror as viewer
55 .TP
56 export DEBMANY_MANPAGE_VIEWER="konqueror man:%s"; debmany sc
57 Use the viewer specified in the environment variable DEBMANY_MANPAGE_VIEWER (konqueror)
58 .SH "AUTHOR"
59 Written by Michael Arlt.
60 .SH "LICENSE"
61 This is free software. You may redistribute copies of it under the terms of
62 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
63 There is NO WARRANTY, to the extent permitted by law.
00 copy bash_completion to ~/.bash_completion
11 it uses functions from /etc/bash_completion
22 completion is done for
3 parameters (-m is not handled very good),
3 parameters (-m is not handled very good and -l could be improved, too),
44 packages,
55 filenames ending with .deb and
66 folders