forked from jarun/googler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
googler.1
198 lines (198 loc) · 4.43 KB
/
googler.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
.TH "GOOGLER" "1" "Apr 2016" "Version 2.3" "User Commands"
.SH NAME
googler \- Google from the command-line
.SH SYNOPSIS
.B googler
.RI [ OPTIONS ]
.I KEYWORD [KEYWORD ...]
.SH DESCRIPTION
.B googler
is a command-line tool to search Google (Web & News) from the terminal. Google site search works too. \fBgoogler\fR shows the title, URL and text context for each result. Results are fetched in pages. Next or previous page navigation is possible using keyboard shortcuts. Results are indexed and a result URL can be opened in a browser using the index number. There is no configuration file as aliases serve the same purpose for this utility. Supports sequential searches in a single instance.
.SH OPTIONS
.TP
.BI "-s, --start=" N
Start at the \fIN\fRth result.
.TP
.BI "-n, --count=" N
Show \fIN\fR results (default 10).
.TP
.BI "-N, --news"
Show results from news section.
.TP
.BI "-c, --tld=" TLD
Country-specific search with top-level domain \fI.TLD\fR, e.g., \fBin\fR for India (refer \fIhttps://en.wikipedia.org/wiki/List_of_Google_domains\fR for a full list of TLDs).
.TP
.BI "-l, --lang=" LANG
Search for the language \fILANG\fR, e.g., \fBfi\fR for Finnish.
.TP
.B "-x, --exact"
Disable automatic spelling correction. Search exact keywords.
.TP
.B "-C, --nocolor"
Disable color output.
.TP
.B "-j, --first, --lucky"
Open the first result in a web browser. Feeling Lucky?
.TP
.BI "-t, --time=" dN
Time limit search [h5 (5 hrs), d5 (5 days), w5 (5 weeks), m5 (5 months), y5 (5 years)].
.TP
.BI "-w, --site=" SITE
Search a site using Google.
.TP
.BI "-d, --debug"
Enable debugging.
.SH OMNIPROMPT KEYS
.TP
.BI g " keywords"
Initiate a new Google search for \fIkeywords\fR with original options.
.TP
.BI "n, p"
Fetch next or previous set of search results.
.TP
.BI "1-N"
Open the Nth result index in browser.
.TP
.BI "q, Enter"
Exit googler.
.TP
.BI *
Any other string initiates a new search with original options.
.TP
.BI "?"
Show omniprompt help.
.SH ENVIRONMENT
.TP
.BI BROWSER
Overrides the default browser. Ref:
.I http://docs.python.org/library/webbrowser.html
.SH EXAMPLES
.PP
.IP 1. 4
Google \fBhello world\fR:
.PP
.EX
.IP
.B googler hello world
.EE
.PP
.IP 2. 4
Fetch \fB15 results\fR updated within last \fB14 months\fR, starting from the \fB3rd result\fR for the string \fBcmdline utility\fR in \fBsite\fR tuxdiary.com:
.PP
.EX
.IP
.B googler -n 15 -s 3 -t m14 -w tuxdiary.com cmdline utility
.EE
.PP
.IP 3. 4
Read recent \fBnews\fR on gadgets:
.PP
.EX
.IP
.B googler -N gadgets
.EE
.PP
.IP 4. 4
Fetch results on IPL cricket from \fBGoogle India\fR server in \fBEnglish\fR:
.PP
.EX
.IP
.B googler -c in -l en IPL cricket
.EE
.PP
.IP 5. 4
Search quoted text e.g. \fBit's a "beautiful world" in spring\fR:
.PP
.EX
.IP
.B googler it\(rs's a \(rs\(dqbeautiful world\(rs\(dq in spring
.EE
.PP
.IP 6. 4
Search for a \fBspecific file type\fR:
.PP
.EX
.IP
.B googler instrumental filetype:mp3
.EE
.PP
.IP 7. 4
Disable \fBautomatic spelling correction\fR, e.g. fetch results for \fIgoogler\fR instead of \fIgoogle\fR:
.PP
.EX
.IP
.B googler -x googler
.EE
.PP
.IP 8. 4
\fBI'm feeling lucky\fR search:
.PP
.EX
.IP
.B googler -j leather jackets
.EE
.PP
.IP 9. 4
\fBWebsite specific\fR search:
.PP
.EX
.IP
.B googler -w tuxdiary.com hello world
.EE
.PP
.IP "" 4
Site specific search continues at omniprompt. Use the \fBg\fR key to run a regular Google search.
.EE
.PP
.IP 10. 4
Alias to find \fBdefinitions of words\fR:
.PP
.EX
.IP
.B alias define='googler -n 2 define'
.EE
.PP
.IP 11. 4
Look up \fBn\fR, \fBp\fR, \fBq\fR, \fBg keywords\fR or a number at the \fBomniprompt\fR: As the omniprompt recognizes \fBn\fR, \fBp\fR, \fBq\fR, \fBg\fR or numbers as commands, you need to prefix them with \fBg\fR, e.g.,
.PP
.EX
.PD 0
.IP
.B g n
.IP
.B g g keywords
.IP
.B g 1984
.PD
.EE
.PP
.IP 12. 4
Input and output \fBredirection\fR:
.PP
.EX
.IP
.B googler -C hello world < input > output
.EE
.PP
.IP "" 4
Note that \fI-C\fR is required to avoid printing control characters (for colored output).
.PP
.IP 13. 4
\fBPipe\fR output:
.PP
.EX
.IP
.B googler -C hello world | tee output
.EE
.SH AUTHOR
Written by Henri Hakkinen. Modified (2015) by Arun Prakash Jana <[email protected]>.
.SH HOME
.I https://github.com/jarun/googler
.SH REPORTING BUGS
.I https://github.com/jarun/googler/issues
.SH COPYRIGHT
Copyright \(co 2008 Henri Hakkinen.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.PP
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.