aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--TODO.md1
-rw-r--r--doc/mans/bindletools-urldesc.1.in196
-rw-r--r--doc/mans/bindletools.1.in8
4 files changed, 205 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 70ff5fb..c5e10f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,6 +83,7 @@ man_MANS = doc/mans/bindletools.1 \
83 doc/mans/bindletools-base64.1 \ 83 doc/mans/bindletools-base64.1 \
84 doc/mans/bindletools-crockfordbase32.1 \ 84 doc/mans/bindletools-crockfordbase32.1 \
85 doc/mans/bindletools-pctenc.1 \ 85 doc/mans/bindletools-pctenc.1 \
86 doc/mans/bindletools-urldesc.1 \
86 doc/mans/bindle_array.3 \ 87 doc/mans/bindle_array.3 \
87 doc/mans/bindle_basename_r.3 \ 88 doc/mans/bindle_basename_r.3 \
88 doc/mans/bindle_bindex.3 \ 89 doc/mans/bindle_bindex.3 \
@@ -142,6 +143,7 @@ EXTRA_DIST = $(doc_DATA) \
142 doc/mans/bindletools-base64.1.in \ 143 doc/mans/bindletools-base64.1.in \
143 doc/mans/bindletools-crockfordbase32.1.in \ 144 doc/mans/bindletools-crockfordbase32.1.in \
144 doc/mans/bindletools-pctenc.1.in \ 145 doc/mans/bindletools-pctenc.1.in \
146 doc/mans/bindletools-urldesc.1.in \
145 doc/mans/bindle_array.3.in \ 147 doc/mans/bindle_array.3.in \
146 doc/mans/bindle_basename_r.3.in \ 148 doc/mans/bindle_basename_r.3.in \
147 doc/mans/bindle_bindex.3.in \ 149 doc/mans/bindle_bindex.3.in \
@@ -303,6 +305,9 @@ doc/mans/bindletools-crockfordbase32.1: Makefile $(srcdir)/doc/mans/bindletools-
303doc/mans/bindletools-pctenc.1: Makefile $(srcdir)/doc/mans/bindletools-pctenc.1.in 305doc/mans/bindletools-pctenc.1: Makefile $(srcdir)/doc/mans/bindletools-pctenc.1.in
304 @$(do_subst_dt) 306 @$(do_subst_dt)
305 307
308doc/mans/bindletools-urldesc.1: Makefile $(srcdir)/doc/mans/bindletools-urldesc.1.in
309 @$(do_subst_dt)
310
306doc/mans/bindle_array.3: Makefile $(srcdir)/doc/mans/bindle_array.3.in 311doc/mans/bindle_array.3: Makefile $(srcdir)/doc/mans/bindle_array.3.in
307 @$(do_subst_dt) 312 @$(do_subst_dt)
308 313
diff --git a/TODO.md b/TODO.md
index 3eaca3c..779f982 100644
--- a/TODO.md
+++ b/TODO.md
@@ -10,7 +10,6 @@ All rights reserved.
10#### documentation 10#### documentation
11 * bindletools Man Pages 11 * bindletools Man Pages
12 - write bindletools-expand.1 12 - write bindletools-expand.1
13 - write bindletools-urldesc.1
14 * libbindle Man Pages 13 * libbindle Man Pages
15 - write bindle_debug.3 14 - write bindle_debug.3
16 - write bindle_get_option.3 15 - write bindle_get_option.3
diff --git a/doc/mans/bindletools-urldesc.1.in b/doc/mans/bindletools-urldesc.1.in
new file mode 100644
index 0000000..6834ac7
--- /dev/null
+++ b/doc/mans/bindletools-urldesc.1.in
@@ -0,0 +1,196 @@
1.\"
2.\" Bindle Binaries Tools
3.\" Copyright (C) 2022 David M. Syzdek <david@syzdek.net>.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions are
8.\" met:
9.\"
10.\" * Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" * Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" * Neither the name of David M. Syzdek nor the
16.\" names of its contributors may be used to endorse or promote products
17.\" derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20.\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.TH "BINDLETOOLS" "1" "@RELEASE_MONTH@" "@PACKAGE_NAME@" "User Commands"
32.SH NAME
33bindletools-urldesc - parses URL
34
35.SH SYNOPSIS
36.nf
37\fBbindletools urldesc\fR [OPTIONS] \fIurl\fR
38.sp
39\fBbindletools-urldesc\fR [OPTIONS] \fIurl\fR
40.sp
41\fBurldesc\fR [OPTIONS] \fIurl\fR
42.fi
43
44.SH DESCRIPTION
45\fBbindletools-urldesc\fR parses general URL (Uniform Resource Locators) or
46URI (Uniform Resource Identifier) strings and prints the URL components. The
47syntax of a URI is defined as:
48.sp
49.RS 4
50.nf
51URI = \fIscheme\fR ":" ["//" authority] \fIpath\fR ["?" \fIquery\fR] ["#" \fIfragment\fR]
52authority = [\fIuserinfo\fR "@"] \fIhost\fR [":" \fIport\fR]
53.fi
54.RE
55.PP
56where:
57.RS 4
58.PD 0
59.TP 9
60\fIscheme\fR
61is the specification to use for the URI. The \fIscheme\fR is stored as a
62string to \fIbud_scheme\fR.
63.TP 9
64\fIuserinfo\fR
65is the optional username and password. \fIuserinfo\fR is stored as a string
66to \fIbud_userinfo\fR.
67.TP 9
68\fIhost\fR
69is the host providing the resource. \fIhost\fR is stored as a string to
70\fIbud_host\fR.
71.TP 9
72\fIport\fR
73is the numeric port number or service name on the \fIhost\fR providing the
74service. \fIport\fR is stored as a string to \fIbud_service\fR and stored as
75an integer to \fIbud_port\fR if \fIport\fR is a numeric value.
76.TP 9
77\fIpath\fR
78is the path to the resource. \fIpath\fR is stored as a string to \fIbud_path\fR.
79.TP 9
80\fIquery\fR
81is the non-hierarchical data identifying the resource. \fIquery\fR is stored
82as a string to \fIbud_query\fR.
83.TP 9
84\fIfragment\fR
85is a section of the resource or a secondary resource. \fIfragment\fR is stored
86as a string to \fIbud_fragment\fR.
87.RE
88.PD
89.PP
90Examples:
91.RS 4
92.nf
93https://example.com:8443/demo/
94https://example/demo/#bindletools
95https://example/demo/?q=example
96ftp://jdoe@example.com/pub/demo.txt
97file:/pub/demo.txt
98http://jdoe:cred@example.com:8080/demo/?q=example#bindletools
99.fi
100.RE
101
102.SH OPTIONS
103
104.TP 25
105\fB-4\fR
106resolve IPv4 address of host
107
108.TP 25
109\fB-6\fR
110resolve IPv6 address of host
111
112.TP 25
113\fB-D\fR \fIlevel\fR, \fB--debug\fR=\fIlevel\fR
114set debug level
115
116.TP 25
117\fB-f\fR, \fB--fragment\fR
118print URL fragment
119
120.TP 25
121\fB-H\fR, \fB--host\fR
122print URL host
123
124.TP 25
125\fB-h\fR, \fB--help\fR
126print this usage information and exit
127
128.TP 25
129\fB-n\fR, \fB--dryrun\fR
130do not resolve hostname
131
132.TP 25
133\fB-P\fR, \fB--path\fR
134print URL path
135
136.TP 25
137\fB-p\fR, \fB--port\fR
138print URL port number if \fIservice\fR is a numeric value or if resolving the
139hostname of the URL.
140
141.TP 25
142\fB-Q\fR, \fB--query\fR
143print URL query
144
145.TP 25
146\fB-q\fR, \fB--quiet\fR, \fB--silent\fR
147do not print messages
148
149.TP 25
150\fB-r\fR, \fB--resolve\fR
151resolve hostname and service name
152
153.TP 25
154\fB-S\fR, \fB--service\fR
155print URL service
156
157.TP 25
158\fB-s\fR, \fB--scheme\fR
159print URL scheme
160
161.TP 25
162\fB-u\fR, \fB--userinfo\fR
163print URL userinfo
164
165.TP 25
166\fB-V\fR, \fB--version\fR
167print version number and exit
168
169.TP 25
170\fB-v\fR, \fB--verbose\fR
171print verbose messages
172
173.TP 25
174\fB--all\fR
175print all values, even if empty
176
177.TP 25
178\fB--shell\fR
179print components as shell variables
180
181.TP 25
182\fB--short\fR
183print only component values
184
185.SH SEE ALSO
186.BR bindletools (1),
187.BR bindle_urldesc (3)
188
189.SH AUTHOR
190David M. Syzdek <david@syzdek.net>
191
192.SH ACKNOWLEDGEMENTS
193\fB@PACKAGE_NAME@\fR is developed and maintained by David M. Syzdek
194<david@syzdek.net>.
195
196.\" end of man page
diff --git a/doc/mans/bindletools.1.in b/doc/mans/bindletools.1.in
index ea7e71d..9e7449e 100644
--- a/doc/mans/bindletools.1.in
+++ b/doc/mans/bindletools.1.in
@@ -93,13 +93,13 @@ expand
93expand tokens within string 93expand tokens within string
94 94
95.TP 20 95.TP 20
96expand
97expand tokens within string
98
99.TP 20
100pctenc 96pctenc
101encode/decode percent-encoding/URL encoding string 97encode/decode percent-encoding/URL encoding string
102 98
99.TP 20
100urldesc
101parse URL string
102
103.SH SEE ALSO 103.SH SEE ALSO
104.BR bindletools-base16 (1), 104.BR bindletools-base16 (1),
105.BR bindletools-base32 (1), 105.BR bindletools-base32 (1),